Skip to content

Commit 032e1cd

Browse files
authored
update benchmark in 2.0.x (#873)
1 parent 55ac29f commit 032e1cd

File tree

8 files changed

+1092
-622
lines changed

8 files changed

+1092
-622
lines changed

src/UserGuide/Master/Table/Tools-System/Benchmark.md

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -40,50 +40,51 @@ Figure 1-2 *IoT-benchmark Modular Design*
4040

4141
Currently, IoT-benchmark supports the following time series databases, versions and connection methods:
4242

43-
| Database | Version | Connection mmethod |
44-
| :-------------- | :-------------- | :------------------------------------------------------- |
45-
| InfluxDB | v1.x v2.0 | SDK |
46-
| TimescaleDB | -- | JDBC |
47-
| OpenTSDB | -- | HTTP Request |
48-
| QuestDB | v6.0.7 | JDBC |
49-
| TDengine | v2.2.0.2 | JDBC |
50-
| VictoriaMetrics | v1.64.0 | HTTP Request |
51-
| KairosDB | -- | HTTP Request |
52-
| IoTDB | v2.0 v1.x v0.13 | JDBC, SessionByTablet, SessionByRecord, SessionByRecords |
43+
| Database | Version | Connection mmethod |
44+
| :-------------- |:-----------| :------------------------------------------------------- |
45+
| IoTDB | v1.x v2.x | JDBC, SessionByTablet, SessionByRecord, SessionByRecords |
46+
| InfluxDB | v1.x v2.x | SDK |
47+
| TimescaleDB | -- | JDBC |
48+
| OpenTSDB | -- | HTTP Request |
49+
| QuestDB | v6.0.7 | JDBC |
50+
| TDengine | v2.2.0.2 | JDBC |
51+
| VictoriaMetrics | v1.64.0 | HTTP Request |
52+
| KairosDB | -- | HTTP Request |
53+
5354

5455
## 2. **Installation and Operation**
5556

56-
#### **Prerequisites**
57+
### 2.1 **Prerequisites**
5758

5859
1. Java 8
5960
2. Maven 3.6+
6061
3. The corresponding appropriate version of the database, such as Apache IoTDB 2.0
6162

62-
#### **How to Obtain**
63+
### 2.2 **How to Obtain**
6364

6465
- **B****inary package****:** Visit https://github.com/thulab/iot-benchmark/releases to download the installation package. Extract the compressed file into a desired folder for use.
6566

66-
- **Source Code** **Compilation (for** **Apache** **IoTDB 2.0 testing):**
67+
- **Source Code** **Compilation (for** **Apache** **IoTDB 2.0 testing):**
6768

68-
- **Compile the latest IoTDB Session package:** Download the IoTDB source code from https://github.com/apache/iotdb/tree/rc/2.0.1 and run the following command in the root directory to compile the latest IoTDB Session package:
69+
- **Compile the latest IoTDB Session package:** Download the IoTDB source code from https://github.com/apache/iotdb/tree/rc/2.0.5 and run the following command in the root directory to compile the latest IoTDB Session package:
6970

70-
```Bash
71-
mvn clean package install -pl session -am -DskipTests
72-
```
71+
```Bash
72+
mvn clean package install -pl session -am -DskipTests
73+
```
7374

74-
- **Compile the IoT-benchmark test package:** Download the source code from https://github.com/thulab/iot-benchmark and run the following command in the root directory to compile the Apache IoTDB 2.0 test package:.
75+
- **Compile the IoT-benchmark test package:** Download the source code from https://github.com/thulab/iot-benchmark and run the following command in the root directory to compile the Apache IoTDB 2.0 test package:.
7576

76-
```Bash
77-
mvn clean package install -pl iotdb-2.0 -am -DskipTests
78-
```
77+
```Bash
78+
mvn clean package install -pl iotdb-2.0 -am -DskipTests
79+
```
7980

80-
- The compiled test package will be located at:
81+
- The compiled test package will be located at:
8182

82-
```Bash
83-
./iotdb-2.0/target/iotdb-2.0-0.0.1/iotdb-2.0-0.0.1
84-
```
83+
```Bash
84+
./iotdb-2.0/target/iotdb-2.0-0.0.1/iotdb-2.0-0.0.1
85+
```
8586

86-
#### **Test Package Structure**
87+
### 2.3 **Test Package Structure**
8788

8889
The directory structure of the test package is shown below. The test configuration file is `conf/config.properties`, and the test startup scripts are `benchmark.sh` (Linux & MacOS) and `benchmark.bat` (Windows). The detailed usage of the files is shown in the table below.
8990

@@ -113,7 +114,7 @@ drwxr-xr-x. 2 root root 4096 Jan 10 01:38 lib
113114

114115

115116

116-
#### **Execution** **of** **Tests**
117+
### 2.4 **Execution** **of** **Tests**
117118

118119
1. Modify the configuration file (conf/config.properties) according to test requirements. For example, to test Apache IoTDB 2.0, set the following parameter:
119120

@@ -127,9 +128,7 @@ drwxr-xr-x. 2 root root 4096 Jan 10 01:38 lib
127128

128129
4. Upon completion, review the results and analyze the test process.
129130

130-
####
131-
132-
#### **Results Interpretation**
131+
### 2.5 **Results Interpretation**
133132

134133
All test log files are stored in the `logs` folder, while test results are saved in the `data/csvOutput` folder. For example, the following result matrix illustrates the test outcome:
135134

@@ -147,16 +146,14 @@ All test log files are stored in the `logs` folder, while test results are saved
147146

148147
## 3. **Main** **Parameters**
149148

150-
#### IoTDB Service Model
149+
### 3.1 IoTDB Service Model
151150

152151
The `IoTDB_DIALECT_MODE` parameter supports two modes: `tree` and `table`. The default value is `tree`.
153152

154153
- **For IoTDB 2.0 and later versions**, the `IoTDB_DIALECT_MODE` parameter must be specified, and only one mode can be set for each IoTDB instance.
155154
- **IoTDB_DIALECT_MODE = table:**
156155
- The number of devices must be an integer multiple of the number of tables.
157156
- The number of tables must be an integer multiple of the number of databases.
158-
- **IoTDB_DIALECT_MODE = tree:**
159-
- The number of devices must be greater than or equal to the number of databases.
160157

161158
Key Parameters for IoTDB Service Model
162159

@@ -167,7 +164,7 @@ Key Parameters for IoTDB Service Model
167164
| SENSOR_NUMBER | Integer | `10` | Controls the number of attribute columns in the table model. |
168165
| IoTDB_TABLE_NUMBER | Integer | `1` | Specifies the number of tables when using the table model. |
169166

170-
#### **Working** **M****ode**
167+
### 3.2 **Working** **Mode**
171168

172169
The `BENCHMARK_WORK_MODE` parameter supports four operational modes:
173170

@@ -185,7 +182,7 @@ Mode configurations are shown in the following below:
185182
| Single database correctness write mode | verificationWriteMode | Writes datasets for correctness verification. | `FILE_PATH` and `DATA_SET` |
186183
| Single database correctness query mode | verificationQueryMode | Queries datasets to verify correctness. | `FILE_PATH` and `DATA_SET` |
187184

188-
#### **Server** **Connection** **Information**
185+
### 3.3 **Server** **Connection** **Information**
189186

190187
Once the working mode is specified, the following parameters must be configured to inform IoT-benchmark of the target time-series database:
191188

@@ -199,7 +196,7 @@ Once the working mode is specified, the following parameters must be configured
199196
| DB_NAME | String | `test` | Name of the target time-series database. |
200197
| TOKEN | String | - | Authentication token (used for InfluxDB 2.0). |
201198

202-
#### **Write Scenario Parameters**
199+
### 3.4 **Write Scenario Parameters**
203200

204201
| **Parameter** | **Type** | **Example** | D**escription** |
205202
| :------------------------- | :-------------------- | :-------------------------- | :----------------------------------------------------------- |
@@ -217,7 +214,7 @@ Once the working mode is specified, the following parameters must be configured
217214
| LOOP | Integer | `86400` | Total number of write operations: Each type of operation will be divided according to the proportion defined by `OPERATION_PROPORTION` |
218215
| OPERATION_PROPORTION | Character | `1:0:0:0:0:0:0:0:0:0:0` | Ratio of operation types (write:Q1:Q2:...:Q10). |
219216

220-
#### **Query Scenario Parameters**
217+
### 3.5 **Query Scenario Parameters**
221218

222219
| Parameter | Type | Example | Description |
223220
| :------------------- | :-------- | :---------------------- | :----------------------------------------------------------- |
@@ -231,7 +228,7 @@ Once the working mode is specified, the following parameters must be configured
231228
| LOOP | Integer | `10` | Total number of query operations: Each type of operation will be divided according to the proportion defined by `OPERATION_PROPORTION` |
232229
| OPERATION_PROPORTION | Character | `0:0:0:0:0:0:0:0:0:0:1` | Ratio of operation types (`write:Q1:Q2:...:Q10`). |
233230

234-
#### **Query Types and Example SQL**
231+
### 3.6 **Query Types and Example SQL**
235232

236233
| Number | Query Type | IoTDB Sample SQL |
237234
| :----- | :----------------------------- | :----------------------------------------------------------- |
@@ -246,7 +243,7 @@ Once the working mode is specified, the following parameters must be configured
246243
| Q9 | Descending Range Query | `select v1 from root.sg.d1 where time > ? and time < ? order by time desc` |
247244
| Q10 | Descending Range with Filter | `select v1 from root.sg.d1 where time > ? and time < ? and v1 > ? order by time desc` |
248245
249-
#### **Test process and test result persistence**
246+
### 3.7 **Test process and test result persistence**
250247
251248
IoT-benchmark currently supports persisting the test process and test results through configuration parameters.
252249
@@ -279,9 +276,9 @@ IoT-benchmark currently supports persisting the test process and test results th
279276
2. Stores the test results after test completion.
280277
3. Created if it does not exist.
281278
282-
#### Automation Script
279+
### 3.8 Automation Script
283280
284-
##### One-Click Script Startup
281+
#### One-Click Script Startup
285282
286283
The `cli-benchmark.sh` script allows one-click startup of IoTDB, IoTDB Benchmark monitoring, and IoTDB Benchmark testing. However, please note that this script will clear all existing data in IoTDB during startup, so use it with caution.
287284
@@ -298,7 +295,7 @@ The `cli-benchmark.sh` script allows one-click startup of IoTDB, IoTDB Benchmark
298295
1. Check test-related logs in the `logs` folder.
299296
2. Check monitoring-related logs in the `server-logs` folder.
300297
301-
##### Automatic Execution of Multiple Tests
298+
#### Automatic Execution of Multiple Tests
302299
303300
Single tests are often insufficient without comparative results. Therefore, IoT-benchmark provides an interface for executing multiple tests in sequence.
304301
@@ -328,13 +325,13 @@ Then the test process with 3 LOOP parameters of 10, 20, and 50 is executed in se
328325
329326
- Changed parameters persist across subsequent tests unless explicitly reset.
330327
331-
1. **Start the Test:** After configuring the `routine` file, start multi-test execution using the following command
328+
2. **Start the Test:** After configuring the `routine` file, start multi-test execution using the following command
332329
333330
```Bash
334331
> ./rep-benchmark.sh
335332
```
336333
337-
2. Test results will be displayed in the terminal.
334+
Test results will be displayed in the terminal.
338335
339336
**Important Notes:**
340337

0 commit comments

Comments
 (0)