|
In addition, in my testing I found that in Ubuntu 12.04 and 14.04:
Adding a line such as "limit memlock 128 128" to /etc/init/mongod.conf did not increase the amount of locked memory as I expected.
Adding a line "limit -l 128" immediately prior to the "exec start-stop-daemon ..." line in that file also did not increase the mongod's memlock ulimit as I expected it to.
Increasing the memlock ulimit for the mongodb user in /etc/security/limits.conf also did not succeed.
However, bizarrely, adding "limit -l 128" to /etc/default/mongod" (which is sourced by /etc/init/mongod.conf) did cause the mongod memlock ulimit to be adjusted.
- EDIT: I got bitten by this stupidity in upstart. If I do "stop mongod" and "start mongod", then it picks up the adjusted "limit memlock" line as it should.
Se still likely need to investigate the most appropriate way of adjusting the memlock ulimit for each Linux distribution.
|