This topic describes the test environment used to test the performance of LindormTSDB and how to use the corresponding test tool.
Requirements on the test environment
The OS used in the test is Alibaba Cloud Linux 3.2104 64-bit.
The stress testing client and LindormTSDB clusters are deployed in the same virtual private cloud (VPC).
The instance type of the machine on which the stress testing client runs is ecs.c6e.26xlarge. We recommend that you use a machine that has a specification of 32 cores and 128 GB of memory or higher.
Specifications of LindormTSDB clusters
Four LindormTSDB clusters of the following specifications are used for testing. All the four clusters use the Standard storage type.
Cluster 1: 3-node LindormTSDB cluster in which the specification of each node is 4 cores and 16 GB of memory
Cluster 2: 3-node LindormTSDB cluster in which the specification of each node is 8 cores and 32 GB of memory
Cluster 3: 3-node LindormTSDB cluster in which the specification of each node is 16 cores and 64 GB of memory
Cluster 4: 3-node LindormTSDB cluster in which the specification of each node is 32 cores and 128 GB of memory
The preceding specifications are available to the public.
The storage type of the clusters is Standard. You can use the Performance storage type for better performance.
The version of LindormTSDB that is used for the clusters is 3.4.9.
Introduction to the test tool
The test tool is developed to adapt Lindorm based on influxdb-comparisons that is widely used in the sphere of time series databases.
The Devops data model of the test tool is used as the data model in the stress testing. This data model is used in scenarios in which a set of servers report system metric values and application metric values at a specified interval. For example, a server samples 101 measurement values in the 9 subsystems at an interval of 10 seconds and reports the values to databases in LindormTSDB. The subsystems are the CPU, memory, disk, disk I/O, kernel, network, Redis, PostgreSQL, and Nginx subsystems.
Download the test tool
You can click the download link to download the compressed file of the stress testing tool. Before you perform stress testing, upload the file to your machine on which your stress testing client runs and decompress the file.
For more information about how to use the tool, see influxdb-comparisons. You can use the tool in the similar to way as influxdb-comparisons.
Data write test
Generate data that you want to write.
# ${scale}: the number of devices that generate data.
# ${data_file}: the name of the file that you want to generate to store the data.
# ${batch_size}: the size of a batch.
GOGC=500 ./bulk_data_gen -format lindormtsdbbatch -use-case devops -seed 100 -sampling-interval 10s -scale-var ${scale} -batchSize ${batchsize} > ${data_file}
Write the generated data.
# ${data_file}: the name of the generated file.
# ${add}: the endpoint of your LindormTSDB cluster. The endpoint is in the ip:port format. For example, you can specify ld-8vb458k154q7xxxx-proxy-tsdb.lindorm.rds.aliyuncs.com:8242 as the endpoint.
# ${wokers}: the number of concurrent threads for writing the data.
GOGC=500 ./bulk_load_lindormtsdb_batch -file ${data_file} -url ${add} -workers ${workers} -time-limit 10m
Data query test
Generate a file that contains your query statements.
# ${query_type}: the query type.
# ${scale}: the number of devices that are used to query.
# ${queryfile}: the name of the file that you generate to contain your query statements.
GOGC=500 ./bulk_query_gen -seed 123 -queries 100000 -format lindormtsdb -use-case devops -query-type ${query_type} -scale-var ${scale} > ${queryfile}
For more information about ${query_type}
, see Results of query tests.
Perform the queries.
# ${workers}: the number of concurrent threads for querying the data.
# ${add}: the endpoint of your LindormTSDB cluster. The endpoint is in the ip:port format. For example, you can specify ld-8vb458k154q7xxxx-proxy-tsdb.lindorm.rds.aliyuncs.com:8242 as the endpoint.
# ${queryfile}: the name of the generated file that contains the query statements.
GOGC=500 ./query_benchmarker_lindormtsdb -workers ${workers} -url ${add} -file ${queryfile}