xinbo_qiu
(xinbo qiu)
October 7, 2023, 9:18am
1
Since the cache_size and threads_min parameter values are set to a small value, consider increasing them and use the following method to set them, but it does not work.
shard1:PRIMARY> db.adminCommand({“setParameter”: 1, “wiredTigerEngineRuntimeConfig”: “cache_size=5G”})
{
“was” : “”,
“ok” : 1,
“$gleStats” : {
“lastOpTime” : Timestamp(0, 0),
“electionId” : ObjectId(“xxxxxx”)
}
}
shard1:PRIMARY> db.adminCommand({getParameter: 1, wiredTigerEngineRuntimeConfig: 1})
{
“wiredTigerEngineRuntimeConfig” : “”,
“ok” : 1,
“$gleStats” : {
“lastOpTime” : Timestamp(0, 0),
“electionId” : ObjectId(“xxxxxx”)
}
}
Hi @xinbo_qiu ,
I premise that I have never set it via administrative command, so I will make some observations.
I didn’ t find command in the documentation for the version 3.4:
MongoDB Server Parameters — MongoDB Manual
For example, instead in version 7.0 it is present:
The command seems to have been correctly applied, because you were returned ok: “1,” as is also said by the documentation:
xinbo_qiu:
shard1:PRIMARY> db.adminCommand({“setParameter”: 1, “wiredTigerEngineRuntimeConfig”: “cache_size=5G”})
{
“was” : “”,
“ok” : 1,
“$gleStats” : {
“lastOpTime” : Timestamp(0, 0),
“electionId” : ObjectId(“xxxxxx”)
}
}
From the following command you can find the value “maximum bytes configured” which should correspond to the value you are trying to set :
db.serverStatus().wiredTiger.cache
I, personally would set it in the configuration file so that the change is persistent. From the documentation:
Configuration File Options — MongoDB Manual
I hope it is useful!
Regards
xinbo_qiu
(xinbo qiu)
October 8, 2023, 2:33am
5
I find command in the documentation for the version 3.4:
db.serverStatus().wiredTiger.cache display the “maximum bytes configured” set is successful
“maximum bytes configured” : 5368709120,
1 Like
Hi @xinbo_qiu ,
You’re right.
Perfect!
So, I think you can flag the solution.
Regards