-
Type:
Improvement
-
Resolution: Won't Do
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Engines - Transactions
-
SE Transactions - 2026-11-20
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Background:
When one setParameter command carries several parameters, mongod applies them in alphabetical order by name, not in the order you wrote them. The parameters are collected into a
std::map<std::string, BSONElement>
(parameters.cpp:379) and applied by iterating it (line 425). The client can't change this, and
db.adminCommand
has no option to control it.
Context:
Mongotune eviction policy would like to use mongod level configuration for wiredTigerEvictionThreadsMin & wiredTigerEvictionThreadsMax }}instead of {{wiredTigerEngineRuntimeConfig
This change will faciliatate the atlas settings conflict management to manage the eviction workers configuration at desired granular level.
Mongotune eviction policy could change the configuration setting from
db.adminCommand({
setParameter: 1,
wiredTigerEngineRuntimeConfig: "eviction=(threads_min=12,threads_max=12)"
})
to
db.adminCommand({setParameter: 1, wiredTigerEvictionThreadsMax: 12, wiredTigerEvictionThreadsMin: 12})
to increase the number of eviction workers, change the max first and min as second parameter change
db.adminCommand({setParameter: 1, wiredTigerEvictionThreadsMin: 8, wiredTigerEvictionThreadsMax: 8})
to decrease the number of eviction workers, change the min first and max as second parameter change
As configuration parameters are always set in sorted order,
the command to decrease the eviction workers
db.adminCommand({setParameter: 1, wiredTigerEvictionThreadsMin: 8, wiredTigerEvictionThreadsMax: 8})
will be converted as
db.adminCommand({setParameter: 1, wiredTigerEvictionThreadsMax: 8, wiredTigerEvictionThreadsMin: 8})
If first ThreadsMax is set and if the value is less than existing ThreadsMin then error will be returned.
Solution #1:
db.adminCommand({setParameter: 1, applyInOrder: true,
wiredTigerEvictionThreadsMin: 4, wiredTigerEvictionThreadsMax: 4})
A new option applyInOrder can be specified by user, whether to retain the configuration parameter order or not, with the default value as false, preserving the backward compatability.
If applyInOrder=true is specified then configuration parameters are applied in the same order passed with out sorting them.
Solution #2:
Mongotune sets two configuration parameters in two different commands in the desired order.
db.adminCommand({setParameter: 1, wiredTigerEvictionThreadsMin: 8})
db.adminCommand({setParameter: 1, wiredTigerEvictionThreadsMax: 8})
Eviction policy has to handle complexity of one command success and the other failure.
This will also trigger the WT internal eviction worker scaling which is deprecated as regression were observed.
- is related to
-
SERVER-137936 To have a single configuration parameter to set WiredTiger eviction workers at runtime
-
- Needs Scheduling
-