forked from cockroachdb/pebble
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db: smoother thresholds for the delete pacer
The delete pacer has two heuristics to disable pacing altogether: one is when the free space drops below 16GB and one when the ratio of obsolete to live bytes goes over 20%. Disabling pacing altogether can lead to a very sudden burst of large deletions, causing large latency spikes. In particular the obsolete bytes heuristic can be triggered when a large table is deleted. In this change we make the transition smoother, using the idea that we want to get back to the desired thresholds within a given timeframe (10 seconds for the free bytes heuristic, 5 minutes for the obsolete bytes heuristic). Instead of effectively increasing the pacing rate to infinity, we increase it based on how many bytes are exceeding the threshold. Note that the previous status quo corresponds to setting infinitesimal timeframes (e.g. 1ns).
- Loading branch information
1 parent
02413ad
commit 7bb765e
Showing
2 changed files
with
82 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters