MongoDB Server Param ==> tcmallocReleaseRate is not effective

Hello Team,

We are using the folloiwng param for clearing up memory which is unused.

tcmallocReleaseRate

doc ref : https://www.mongodb.com/docs/v6.0/reference/parameters/#mongodb-parameter-param.tcmallocReleaseRate

But we dont see this working. i have set this param in the following way.
we are using mongo DB community server 6.0.0

mongosh
use admin
db.adminCommand( { setParameter: 1, tcmallocReleaseRate: 5.0 } )

And this is not working in my local mac machine, getting following error ==>

**MongoServerError**: attempted to set unrecognized parameter [tcmallocReleaseRate], use help:true to see options

Is am missing anything here ?

thanks

Hi @Gangadhar_M,
Are you certain that the version of the instance you are currently using is correct? In my case, it is functioning properly. I am using MongoDB of version 6.0.9.

myrs [direct: primary] admin> db.adminCommand( { setParameter: 1, tcmallocReleaseRate: 5.0 } )

{
  was: 1,
  ok: 1,
  '$clusterTime': {
    clusterTime: Timestamp({ t: 1694601309, i: 1 }),
    signature: {
      hash: Binary(Buffer.from("0000000000000000000000000000000000000000", "hex"), 0),
      keyId: Long("0")
    }
  },
  operationTime: Timestamp({ t: 1694601309, i: 1 })
}
myrs [direct: primary] admin> db.version()
6.0.9

Thanks Jack_Yang1 for quick reply.

There are different issues in different ENVs for this issue. I am putting down things clear here.

  1. In my Test server (linux, Ubuntu 20.04.4 LTS), we are able to set the parameter, but i don’t see any clearing of memory happening. mongo db version here is 6.0.0 community edition. Here Replication in enabled with Primary and a single Secondary(with priority 0).

  2. in my local macOS (12.1), am getting following error. and no replication enabled in local. mongo version here is , 6.0.1 communitty ediition
    **MongoServerError**: attempted to set unrecognized parameter [tcmallocReleaseRate], use help:true to see options