You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Default configuration but with stats_dump_period_sec set (so you can see compaction stats) , redis-cli set a b, redis-cli compact.
What did you expect to see?
Because of how level_compaction_dynamic_level_bytes works, there should be only 1 compaction to L6 (the default bottom-most layer)
What did you see instead?
1 compaction on each layer and 2 compactions to L6
Anything Else?
I instrumented rocksdb code and this is because rocksdb::CompactRangeOptions.change_level is not compatible with level_compaction_dynamic_level_bytes.
When level_compaction_dynamic_level_bytes is set, set a b and compact will not compact to L1, it'll jump directly to the last layer (L6). And when change_level is set, it then moves this SST file from L6 back to L1.
Now when another periodic compaction comes along, it tries to move this file from L1->L2, L2->L3, ... This is why every layer has 1 compaction and the last layer has 2 compactions.
If you run a manual compaction at this time, since change_level is set, it'll move the SST file to L1 again, resulting in the same churn happening.
Obviously this is quite efficiently since these 2 options are trying to undo each other's work..
Are you willing to submit a PR?
I'm willing to submit a PR!
The text was updated successfully, but these errors were encountered:
Search before asking
Version
6b23c5a
Minimal reproduce step
Default configuration but with
stats_dump_period_sec
set (so you can see compaction stats) ,redis-cli set a b
,redis-cli compact
.What did you expect to see?
Because of how
level_compaction_dynamic_level_bytes
works, there should be only 1 compaction to L6 (the default bottom-most layer)What did you see instead?
1 compaction on each layer and 2 compactions to L6
Anything Else?
I instrumented rocksdb code and this is because
rocksdb::CompactRangeOptions.change_level
is not compatible withlevel_compaction_dynamic_level_bytes
.When
level_compaction_dynamic_level_bytes
is set,set a b
andcompact
will not compact to L1, it'll jump directly to the last layer (L6). And whenchange_level
is set, it then moves this SST file from L6 back to L1.Now when another periodic compaction comes along, it tries to move this file from L1->L2, L2->L3, ... This is why every layer has 1 compaction and the last layer has 2 compactions.
If you run a manual compaction at this time, since
change_level
is set, it'll move the SST file to L1 again, resulting in the same churn happening.Obviously this is quite efficiently since these 2 options are trying to undo each other's work..
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: