rocksdb
rocksdb copied to clipboard
Performance Regression Observed in DeleteRange and CompactRange Operations Post-Commit ca7367a
Expected Behavior:
The execution time of DeleteRange followed by CompactRange operations should remain consistent or improve across commits, maintaining optimal performance for key-range deletions and compactions.
Actual Behavior:
After commit ca7367a, a noticeable performance regression has been observed. The average execution time for the following sequence of operations increased ~2%:
- Deleting a range of keys using
DeleteRange. - Compacting a larger key range using
CompactRange.
Steps to Reproduce the Behavior:
- Fill 300000 key-value pairs into the Rocksdb database, while the key format is key$i, and value is a string of length from 10 to 99.
- Check out the commit immediately prior to ca7367a and run the following test code:
Measure the average execution time.rocksdb::Slice start_key("key300"), end_key("key500"); db->DeleteRange(rocksdb::WriteOptions(), db->DefaultColumnFamily(), start_key, end_key); rocksdb::Slice start_key1("key200"); rocksdb::Slice end_key2("key700"); rocksdb::CompactRangeOptions comp_options; db->CompactRange(comp_options, &start_key1, &end_key2); - Check out commit ca7367a or later and run the same test code, measuring the average execution time again.
- Compare the results. The post-ca7367a execution time should show a consistent increase in latency.
cc @jaykorean thoughts on this?
cc @cbi42