Skip to content

Commit ab48766

Browse files
author
Dianna Hohensee
committed
SERVER-42205 Raise the snapshot window's cache pressure threshold from 50 to 95
1 parent 5e6cf8a commit ab48766

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

jstests/noPassthrough/snapshotWindow_serverParameters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ testNumericServerParameter("maxTargetSnapshotHistoryWindowInSeconds",
2121
testNumericServerParameter("cachePressureThreshold",
2222
true /*isStartupParameter*/,
2323
true /*isRuntimeParameter*/,
24-
50 /*defaultValue*/,
24+
95 /*defaultValue*/,
2525
70 /*nonDefaultValidValue*/,
2626
true /*hasLowerBound*/,
2727
-1 /*lowerOutOfBounds*/,

src/mongo/db/snapshot_window_options.h

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace mongo {
4242
*/
4343
struct SnapshotWindowParams {
4444

45-
// maxTargetSnapshotHistoryWindowInSeconds (startup & runtime server paramter, range 0+).
45+
// maxTargetSnapshotHistoryWindowInSeconds (startup & runtime server parameter, range 0+).
4646
//
4747
// Dictates the maximum lag in seconds oldest_timestamp should be behind stable_timestamp.
4848
// targetSnapshotHistoryWindowInSeconds below is the actual active lag setting target.
@@ -64,30 +64,32 @@ struct SnapshotWindowParams {
6464
AtomicWord<int> targetSnapshotHistoryWindowInSeconds{
6565
maxTargetSnapshotHistoryWindowInSeconds.load()};
6666

67-
// cachePressureThreshold (startup & runtime server paramter, range [0, 100]).
67+
// cachePressureThreshold (startup & runtime server parameter, range [0, 100]).
6868
//
69-
// Dictates what percentage of cache in use is considered too high. This setting helps preempt
70-
// storage cache pressure immobilizing the system. Attempts to increase
71-
// targetSnapshotHistoryWindowInSeconds will be ignored when the cache pressure reaches this
72-
// threshold. Additionally, a periodic task will decrease targetSnapshotHistoryWindowInSeconds
73-
// when cache pressure exceeds the threshold.
74-
AtomicWord<int> cachePressureThreshold{50};
69+
// Compares against a storage engine cache pressure indicator that ranges from 0 to 100.
70+
// Currently, the only indicator is the WT lookaside score.
71+
//
72+
// This setting helps preempt storage cache pressure immobilizing the system. Attempts to
73+
// increase targetSnapshotHistoryWindowInSeconds will be ignored when the cache pressure reaches
74+
// this threshold. Additionally, a periodic task will decrease
75+
// targetSnapshotHistoryWindowInSecond when cache pressure exceeds the threshold.
76+
AtomicWord<int> cachePressureThreshold{95};
7577

76-
// snapshotWindowMultiplicativeDecrease (startup & runtime server paramter, range (0,1)).
78+
// snapshotWindowMultiplicativeDecrease (startup & runtime server parameter, range (0,1)).
7779
//
7880
// Controls by what multiplier the target snapshot history window setting is decreased when
7981
// cache pressure becomes too high, per the cachePressureThreshold setting.
8082
AtomicDouble snapshotWindowMultiplicativeDecrease{0.75};
8183

82-
// snapshotWindowAdditiveIncreaseSeconds (startup & runtime server paramter, range 1+).
84+
// snapshotWindowAdditiveIncreaseSeconds (startup & runtime server parameter, range 1+).
8385
//
8486
// Controls by how much the target snapshot history window setting is increased when cache
8587
// pressure is OK, per cachePressureThreshold, and we need to service older snapshots for global
8688
// point-in-time reads.
8789
AtomicWord<int> snapshotWindowAdditiveIncreaseSeconds{2};
8890

89-
// minMillisBetweenSnapshotWindowInc (startup & runtime server paramter, range 0+).
90-
// minMillisBetweenSnapshotWindowDec (startup & runtime server paramter, range 0+).
91+
// minMillisBetweenSnapshotWindowInc (startup & runtime server parameter, range 0+).
92+
// minMillisBetweenSnapshotWindowDec (startup & runtime server parameter, range 0+).
9193
//
9294
// Controls how often attempting to increase/decrease the target snapshot window will have an
9395
// effect. Multiple callers within minMillisBetweenSnapshotWindowInc will have the same effect
@@ -97,7 +99,7 @@ struct SnapshotWindowParams {
9799
AtomicWord<int> minMillisBetweenSnapshotWindowInc{500};
98100
AtomicWord<int> minMillisBetweenSnapshotWindowDec{500};
99101

100-
// checkCachePressurePeriodSeconds (startup & runtime server paramter, range 1+)
102+
// checkCachePressurePeriodSeconds (startup & runtime server parameter, range 1+)
101103
//
102104
// Controls the period of the task that checks for cache pressure and decreases
103105
// targetSnapshotHistoryWindowInSeconds if the pressure is above cachePressureThreshold. The

0 commit comments

Comments
 (0)