Skip to content

Comment on Why You Should Be Using Virtualisation In Your Development Environmentparent

Comments

Why do applications think they can manage my memory better than my kernel?

Because 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.

Actually, 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.

This. 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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.