thulab / iot-benchmark

IoT-benchmark is a tool for benchmarking TSDB in IoT scenario.
Apache License 2.0
179 stars 101 forks source link

[CHORE] iot-benmark uses a lot of cpu cores #397

Open Subsegment opened 7 months ago

Subsegment commented 7 months ago

Description

After I implemented Iot-benchmark support for CnosDB, I found that the iot-benmark itself had a very high cpu usage during testing.But in fact, the concurrency is not much, CnosDB itself has a relatively low CPU usage, is this my implementation problem?

Screenshot 2024-01-10 at 16 18 27

I also tested Influxdb and found a similar one for iot-benchmark-influxdb

Screenshot 2024-01-10 at 16 17 07

But when I tested iotdb, there was no problem with high cpu usage. Why?

Screenshot 2024-01-10 at 16 15 59

Config

here is my config

BENCHMARK_WORK_MODE=verificationWriteMode

FILE_PATH=/path/to/data
DEVICE_NUMBER=50
SENSOR_NUMBER=10
CLIENT_NUMBER=50
BATCH_SIZE_PER_WRITE=10000
OPERATION_PROPORTION=1:0:0:0:0:0:0:0:0:0:0
BIG_BATCH_SIZE=10
IS_COPY_MODE=true
liyuheng55555 commented 7 months ago

Perhaps you can use sampling tool (such as jprofile or arthas) to find out what function takes so much cpu when testing cnosdb and influxdb.

OneSizeFitsQuorum commented 7 months ago

You can use the testWithDefaultPath pattern directly, where verificationWriteMode checks the correctness of all data written, which is not needed for normal performance tests and can be CPU-expensive