Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I came across the following parameter in kernel settings (in sysctl):

vm.min_free_kbytes

This is the amount of free memory (RAM) that's always free no matter what. In my case, I have only 1 GiB of RAM, and this parameter was set to about 64MiB. I thought that's pretty high, so I lowered it to 8MiB so far. I don't know if I can lower it any further, or if lowering it to 8MiB can cause any troubles, so the question is what would happen if the amount of the free memory was too low? Can I safely lower the value to 1MiB?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Should be safe but can't guarentee it. From kernel docs:

min_free_kbytes:

This is used to force the Linux VM to keep a minimum number
of kilobytes free.  The VM uses this number to compute a
watermark[WMARK_MIN] value for each lowmem zone in the system.
Each lowmem zone gets a number of reserved free pages based
proportionally on its size.

Some minimal amount of memory is needed to satisfy PF_MEMALLOC
allocations; if you set this to lower than 1024KB, your system will
become subtly broken, and prone to deadlock under high loads.

Setting this too high will OOM your machine instantly.

Essentially if you set it to low you'll have problems with memory allocation.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.