-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: lower score threshold for mvcc GC eligibility
Previously GC score which is calculated based on average garbage age and percentage of live data was set to 2 to avoid frequent GC invocations. Value was set high in abundance of caution. Lowering it to 1 would guarantee that we would always collect something and not cause unnecessary frequent GC runs. To protect against unexpected situations where GC would be firing too frequently, cooldown period of 2 hours is added. This cooldown will apply from gc score of 1 and is decreased proportionally as score reaches 2 (the old threshold value). Release note (performance improvement): GC score triggering mvcc GC run is lowered. GC Score is ratio is computed from mvcc stats and uses ratio of live objects and estimated garbage age to estimate collectability of old data. Reduced score will trigger GC earlier lowering interval between runs 3 times, giving 2 times reduced peak garbage usage at the expense of 30% increase of wasteful data scanning on constantly updated data.
- Loading branch information
1 parent
f9730bd
commit b013c84
Showing
2 changed files
with
76 additions
and
25 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