IoTDB Performance Tuning

Scenario

You can increase IoTDB memory to improve IoTDB performance because read and write operations are performed in HBase memory.

Configuration

Log in to Manager, choose Cluster > Services > IoTDB, and click the Configurations tab and then All Configurations. Search the parameters and modify their values.

For details, see Table 1.

Table 1 Description

Parameter

Description

Default Value

Optimization Suggestion

SSL_ENABLE

Whether to encrypt the channel between the client and server using SSL

true

true indicates that SSL encryption is enabled, and false indicates that SSL encryption is disabled. Data encryption and decryption during transmission have a great impact on performance. The test result shows that the performance gap is 200%. Therefore, you are advised to disable SSL encryption during the performance test. The parameter for the ConfigNode and IoTDBServer roles must be both modified.

iotdb_server_kerberos_qop

Encrypted data transmission of each IoTDBServer instance in the cluster

auth-int

auth-int indicates that data transmission is encrypted, and auth indicates that data is authenticated only without being encrypted. Therefore, you are advised to set this parameter to auth. The parameter for the ConfigNode and IoTDBServer roles must be both modified.

GC_OPTS

Memory and garbage collection (GC) configuration parameters used by IoTDBServer

-Xms2G -Xmx2G -XX:MaxDirectMemorySize=512M -XX:+UseG1GC -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=1M -Djdk.tls.ephemeralDHKeySize=3072 (set this parameter as required.)

  • -Xms2G -Xmx2G indicates the IoTDB JVM heap memory. Set this parameter to a large value in the scenarios with a large number of time series and concurrent writes. You can adjust the parameter value based on the GC duration threshold alarm or heap memory threshold alarm. If an alarm is generated, increase the parameter value by 0.5 times. If this alarm is frequently generated, double the value. When you adjust HeapSize, set Xms and Xmx to the same value to avoid performance deterioration during dynamic heap size adjustment by JVM.

  • -XX:MaxDirectMemorySize indicates the IoTDB JVM direct memory. The recommended value is 1/4 of the heap memory. This parameter mainly affects the write performance. If the write performance deteriorates significantly, you can increase the parameter value by 0.5 times. Note that the sum of the heap memory and direct memory must be less than or equal to 80% of the available system memory. Otherwise, IoTDB fails to be started.

  • Query scenario optimization example: If the query range is large, for example, a single time series contains more than 10,000 data points, the quotient of 20% of the JVM memory allocated divided by the number of time series is recommended to be bigger than 160 KB for better performance of the storage engine in the default configuration.

write_read_schema_free_memory_proportion

Memory allocation ratio: write, read, schema, and free

4:3:1:2

You can adjust the memory based on the load.

  • A larger write memory means the better write throughput and single query performance.

  • A larger read memory means more supported concurrent queries.

  • A larger metadata memory means a lower probability of error message "IoTDB system load is too large".

  • A larger free memory means a lower probability of memory exhaustion.