4 ms·
Note that its pretty much a must if you plan to have a MongoDB server as part of your dev environment on your home box - Mongo by design eats all the RAM it can
by FiReaNG3L 16y ago
Note that its pretty much a must if you plan to have a MongoDB server as part of your dev environment on your home box - Mongo by design eats all the RAM it can find to map files to, and if you have Apache, Solr and MySQL running on the same box, things can get ugly :)
- someone_here 16y agoWhy do applications think they can manage my memory better than my kernel?
- aaronblohowiak 16y agoBecause your kernel is general-purpose and has been tuned with certain balance between latency, throughput, and memory usage (memory management takes memory!) If your application deals with things < 4kb in size, has different performance needs &c, then it may achieve higher performance than just leaving everything up to the kernel.
- mathias_10gen 16y agoActually, MongoDB does leave memory management to the kernel by using MMAP to access data files. Most kernels will allocate a lot of memory to the disk cache, which can make it look like mongo is eating all of your ram.
- wanderr 16y agoThis. It's one of the brilliant things about mongo. The downside is that after a reboot it's up to you to get the OS to warm those caches back up.
- runningdogx 16y agoIf all you want to do is limit memory usage, process control groups can do that with less overhead than a VM. kernel/Documentation/cgroups/memory.txt circa line 255