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
Currently, elision compaction is triggered only when the ratio of NumDeletions to NumEntries exceeds a certain threshold. However, this condition is not always met, especially when range deletions are not used, causing elision compaction to not be triggered as expected.
One option could be to make the ratio configurable, allowing more flexibility in triggering elision compaction based on different system requirements.
Alternatively, another approach could be to extend the tombstone-density compaction logic to include L6, instead of limiting it to L0–L5, and if you think it’s unnecessary, removing elision compaction to avoid redundant operations.
Before applying the patch, I observed that the tombstone keys started at approximately 70,000 and increased in a nearly linear fashion over the span of 7 days, reaching about 650,000. The graph below illustrates this linear increase.
-> It is likely because it did not reach 10% of the number of entries.
After applying the patch, where tombstone-density compaction was extended to include L6, the tombstone count stabilized between 3,000 and 40,000 keys. This change was intended to ensure latency remained consistent by sacrificing some CPU and disk resources for more frequent compaction.
Conclusion
I would like the tombstone count in L6 to be kept consistent (at a ratio lower than 10%) depending on the option, but it seems that there is no current method to achieve this. Is there any aspect of the two suggestions that could be considered? If so, I will try to submit a related PR.
EDIT)
I also tested a version with the modified elision ratio, and as expected, it seems to show better resource usage compared to including tombstone-density up to L6 (if we use the number of compactions as a metric).
Pebble Options
Currently, elision compaction is triggered only when the ratio of NumDeletions to NumEntries exceeds a certain threshold. However, this condition is not always met, especially when range deletions are not used, causing elision compaction to not be triggered as expected.
pebble/compaction_picker.go
Lines 1432 to 1433 in 78d5345
One option could be to make the ratio configurable, allowing more flexibility in triggering elision compaction based on different system requirements.
Alternatively, another approach could be to extend the tombstone-density compaction logic to include L6, instead of limiting it to L0–L5, and if you think it’s unnecessary, removing elision compaction to avoid redundant operations.
Before applying the patch, I observed that the tombstone keys started at approximately 70,000 and increased in a nearly linear fashion over the span of 7 days, reaching about 650,000. The graph below illustrates this linear increase.
-> It is likely because it did not reach 10% of the number of entries.
After applying the patch, where tombstone-density compaction was extended to include L6, the tombstone count stabilized between 3,000 and 40,000 keys. This change was intended to ensure latency remained consistent by sacrificing some CPU and disk resources for more frequent compaction.
Conclusion
I would like the tombstone count in L6 to be kept consistent (at a ratio lower than 10%) depending on the option, but it seems that there is no current method to achieve this. Is there any aspect of the two suggestions that could be considered? If so, I will try to submit a related PR.
EDIT)
I also tested a version with the modified elision ratio, and as expected, it seems to show better resource usage compared to including tombstone-density up to L6 (if we use the number of compactions as a metric).
Jira issue: PEBBLE-316
The text was updated successfully, but these errors were encountered: