Skip to main content
Version: 2.3.x

CnosDB vs OpenTSDB

CnosDB 2.3.4.4 vs OpenTSDB 2.4.1

Comparisons between CnosDB 2.3.4.4 and OpenTSDB 2.4.1 are made, followed by test conclusions and test details.

Conclusion

CnosDB is better than OpenTSDB for writing, query and compression

Pre-test

1. Test Environment Preparedness

CPU:64 CPUs x Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz

Memory: 256 GB

Disk: SSD NVMe Protocol

2. Test case preparation

  1. The db environment of the corresponding machine is installed in advance to ensure proper connectivity.

  2. Install CnosDB:

    Refer to the deployment document: Install CnosDB

  3. Install OpenTSDB

    First, install HBase, refer to the official website: HBase

    Next, download and install OpenTSDB 2.4.1

3) Configuration Check & Modify

CnosDB and OpenTSDB have both modified the storage folder path, and require CPU cores to be 8, and Memory size to be 32G/64G.

4. Dataset preparation

  1. 50GB, about 110 billion data points
  2. Time span: 2018/01-2018/06
  3. Data distribution: average distribution

Test medium term

Testing Tool

Generate data seed: 654147269

  1. Start CnosDB
nohup ./target/release/cnosdb run --config ./config/config_8902.toml -M singleton &
  1. Start OpenTSDB
Create OpenTSDB table in HBase: env COMPRESSION=NONE /usr/share/opentsdb/tools/create_table.sh
Start OpenTSDB: /usr/shard/opentsdb/bin/tsdb tsd

Write Test Results

CPU/MemoryCnosDB 2.3.4.4OpenTSDB 2.4.1
8C32G20K20K
8C64G250K22K

Query Test Results

SQLCnosDB 2.3.4.4OpenTSDB 2.4.1
Maximum usage_user value per minute for 5 months: select date_bin(INTERVAL '1' MINUTE,time, TIMESTAMP '2018-01-01T00:00:00'), max(usage_user) from cpu where hostname = 'host_0' and time >= '2018-01-01T00:00:00Z' and time <= '2018-06-01T00:00:00Z' group by date_bin(INTERVAL '1' MINUTE,time, TIMESTAMP '2018-01-01T00:00:00') limit 10;19ms1845ms
Maximum usage_user value per minute for 2 months: select date_bin(INTERVAL '1' MINUTE,time, TIMESTAMP '2018-01-01T00:00:00'), max(usage_user) from cpu where hostname = 'host_0' and time >= '2018-01-01T00:00:00Z' and time <= '2018-03-01T00:00:00Z' group by date_bin(INTERVAL '1' MINUTE,time, TIMESTAMP '2018-01-01T00:00:00') limit 10;17ms269ms

Compression Ratio Test Result

CnosDB 2.3.4.4OpenTSDB 2.4.1
Original Data50G50G
Data written to disk after being written4.8G26G
Compression ratio10.41.9