Rocksdb raises the CPU during pressure testing

19 views
Skip to first unread message

dana z

unread,
Jun 28, 2024, 10:45:33 AM (6 days ago) Jun 28
to rocksdb
Hello, I found a problem during the concurrent stress testing of Rocksdb, where the machine CPU is raised and the request method is also very simple. Each thread uses iterator seek to find a batch of specified keys repeatedly, and then uses these keys to single click get the value. And a flame chart was generated, and it was found that the CPU was mainly consumed in single point get and iterator seek, and there was an uncompress snap during the seek. I am a novice, and I would like to ask if each thread's actions are repeated. Theoretically, it will be cached in blockcache, but looking at the flame chart, it is not like this. It seems that iterator seek uncompresses snap every time. Do I need to adjust any parameters.

This is my blockcache related settings
```
@Override
    public ManagedColumnFamilyOptions getColumnFamilyOptions() {
      // Write Buffer Size -- set to 128 MB
      final long writeBufferSize = toLong(StorageUnit.MB.toBytes(128));

      ManagedColumnFamilyOptions managedColumnFamilyOptions = new ManagedColumnFamilyOptions();

      managedColumnFamilyOptions
          .setLevelCompactionDynamicLevelBytes(true)
          .setWriteBufferSize(writeBufferSize)
          .setTableFormatConfig(getBlockBasedTableConfig());

      return managedColumnFamilyOptions;
    }
```
20240628-224324.jpeg20240628-224338.jpeg
Reply all
Reply to author
Forward
0 new messages