I'm developing a compute cluster and I'm trying to determine the maximum amount of RAM I can give to a single process. On a machine with 16GB of ram, the answer is that I can allocate (and touch) 15680MB before the out of memory killer is invoked (overcommit_memory=2, overcommit_ratio=0). That might seem halfway reasonable on a regular linux distro, but I've compiled my own minimal kernel (v 3.16), and my test app is running as sbin/init - IE there is absolutely nothing else in memory. If I simulate a machine with just 512MB of ram for comparison, I can allocate 468MB, an overhead of just 44MB, which seems very reasonable. So why is there so much more kernel memory on the 16gb machine?  Reading the kernel docs it would seem that some percent of memory is reserved for the kernel for safety, which can be tuned by /proc/sys/vm/. But I've found that changing admin_reserve_kbytes and user_reserve_kbytes makes absolutely no difference in when the OOM killer is invoked.Is there something else that grows proportionally to the amount of RAM Installed?
What proportion of memory does the Linux kernel use of the installed RAM?
linux kernel;memory
A fairly old (2006) paper discusses some of the kernel overhead that scales with memory size: http://halobates.de/memorywaste.pdfFrom it:page struct (keeps track of page allocation): 1.37%page tables: 0.5%Meanwhile, my 16GB test machine shows a total overhead of 4.3%so around 2% is still unaccounted for. Thus, the question is still not completely answered, and the answer is based on a very old kernel. But this is the closest by far that I've come to answering the question. 