[SERVER-14777] Option to limit physical memory used by a MongoD process Created: 04/Aug/14 Updated: 04/Aug/14 Resolved: 04/Aug/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Sharding, Stability |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin J. Rice | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
Add rss memory-limit option to mongod (via conf file and/or command line), specifying the maximum amount of physical memory that a mongod instance will keep resident (RSS size). MongoD instances will use all available memory on a machine, requesting as much as possible and paging it in as necessary. On servers with multiple additional processes, having a mongod process gobble up all available memory is not "playing well with peers", as they say in kindergarten. This limit would specify the maximum memory allotment to keep resident in either megabytes or gigabytes. NOTE that technically Linux has a ulimit -m for RSS size, this limit is completely ignored as of Linux kernel version 2.4.x. If the solution is implementing Linux 'control groups' (supposedly to be standard in RHEL 7.x), this might be a documentation problem. However, until then, and for people running pre RHEL-7.x, a documentation solution or a mongod startup option solution is required. |
| Comments |
| Comment by Thomas Rueckstiess [ 04/Aug/14 ] |
|
Hi Kevin, This feature request has been discussed before, see Regards, |
| Comment by Kevin J. Rice [ 04/Aug/14 ] |
|
Note 1. this applies to all MongoDB installations running on a physical server instead of on a VM or 'in the cloud' situation. Note 2. Postgresql, MySQL, and most other DB's allow configuration of how much physical memory (RSS) is used by Postgres. Granted MongoDB is not a SQL database, but it plays in the same application space. |