I have a mongodb 7.0.14. I am trying to increase the eviction threads .
this is my conf file
mongod.conf
for documentation of all options, see:
Where and how to store data.
storage:
dbPath: “C:\Program Files\MongoDB\Server\7.0\data”
where to write logging data.
systemLog:
destination: file
logAppend: true
path: C:\Program Files\MongoDB\Server\7.0\log\mongod.log
network interfaces
net:
port: 27017
bindIp: 0.0.0.0
#processManagement:
#security:
#operationProfiling:
replication:
replSetName: replocal
#sharding:
Enterprise-Only Options:
#auditLog:
when i add the set parameter the mongo doesn’t start. It starts if i remove the set parameter value.
db.adminCommand({
setParameter: 1,
wiredTigerEngineRuntimeConfig: “eviction=(threads_min=8,threads_max=16)”
}) this works however, if i restart the mongo the eviction thread goes to the default values, Can somebody help me with this. I am very new to mongo
I think you’re trying to increase the eviction threads in MongoDB 7.0.14 by setting the wiredTigerEngineRuntimeConfig
parameter. While the db.adminCommand()
command works temporarily, it does not persist across restarts. This happens because the setParameter
command is not stored in the configuration file by default. To make these changes persist, you’ll need to modify the MongoDB configuration file (mongod.conf
) directly.
Here’s how you can do this:
- Edit the
mongod.conf
file: Add the wiredTigerEngineRuntimeConfig
setting directly under the storage
section. This will make the setting persistent across restarts.Your updated mongod.conf
should look like this:
storage:
dbPath: "C:\\Program Files\\MongoDB\\Server\\7.0\\data"
wiredTiger:
engineConfig:
eviction:
threads_min: 8
threads_max: 16
systemLog:
destination: file
logAppend: true
path: C:\\Program Files\\MongoDB\\Server\\7.0\\log\\mongod.log
net:
port: 27017
bindIp: 0.0.0.0
replication:
replSetName: replocal
Verify the Changes: After restarting, you can check if the eviction threads have been applied by connecting to MongoDB and running the following command:
db.adminCommand({ getParameter: 1, wiredTigerEngineRuntimeConfig: 1 })
Hope this helps… let us know.
1 Like