All of lore.kernel.org
 help / color / mirror / Atom feed
* min_free_kbytes documentation, /proc/sys/vm docs
@ 2007-08-13 13:46 Pavel Machek
  2007-08-13 13:53 ` Peter Zijlstra
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2007-08-13 13:46 UTC (permalink / raw)
  To: Andrew Morton, kernel list; +Cc: andrea, npiggin, peterz

Hi!

min_free_kbytes documentation says:

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 pages_min
value for each lowmem zone in the system.  Each lowmem zone gets 
a number of reserved free pages based proportionally on its size.

...which is not too helpful :-(. In particular, should kernel survive
setting this to 0 and still work reliably? IOW is this
performance-only tweak, or does it correctness implications?

I guess it should also say something like "do not set this to more
than half of your physical RAM (or half of lowmem?) or you get an
instant OOM".

Plus, lowmem_reserve_ratio seems to be undocumented.
									Pavel
			(trying to come up with agressive settings, so
			that swap over ata over ethernet finally breaks).
			
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: min_free_kbytes documentation, /proc/sys/vm docs
  2007-08-13 13:46 min_free_kbytes documentation, /proc/sys/vm docs Pavel Machek
@ 2007-08-13 13:53 ` Peter Zijlstra
  2007-08-13 14:12   ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2007-08-13 13:53 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Andrew Morton, kernel list, andrea, npiggin

On Mon, 2007-08-13 at 15:46 +0200, Pavel Machek wrote:
> Hi!
> 
> min_free_kbytes documentation says:
> 
> 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 pages_min
> value for each lowmem zone in the system.  Each lowmem zone gets 
> a number of reserved free pages based proportionally on its size.
> 
> ....which is not too helpful :-(. In particular, should kernel survive
> setting this to 0 and still work reliably? IOW is this
> performance-only tweak, or does it correctness implications?

correctness

sort-of, since PF_MEMALLOC usage is currently un-bounded.

> I guess it should also say something like "do not set this to more
> than half of your physical RAM (or half of lowmem?) or you get an
> instant OOM".

yeah, lowmem, not sure on the oom part, it should work with quite high
limits, although I've never tried it with ridiculous numbers.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: min_free_kbytes documentation, /proc/sys/vm docs
  2007-08-13 13:53 ` Peter Zijlstra
@ 2007-08-13 14:12   ` Pavel Machek
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2007-08-13 14:12 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Andrew Morton, kernel list, andrea, npiggin

Hi!

> > min_free_kbytes documentation says:
> > 
> > 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 pages_min
> > value for each lowmem zone in the system.  Each lowmem zone gets 
> > a number of reserved free pages based proportionally on its size.
> > 
> > ....which is not too helpful :-(. In particular, should kernel survive
> > setting this to 0 and still work reliably? IOW is this
> > performance-only tweak, or does it correctness implications?
> 
> correctness
> 
> sort-of, since PF_MEMALLOC usage is currently un-bounded.

/me is scared. If this is for correctness... why is it different on
different machines? Should we specify some minimum value in the
documentation?

> > I guess it should also say something like "do not set this to more
> > than half of your physical RAM (or half of lowmem?) or you get an
> > instant OOM".
> 
> yeah, lowmem, not sure on the oom part, it should work with quite high
> limits, although I've never tried it with ridiculous numbers.

I did, and it indeed OOMs instantly.

Perhaps something like this should be applied?

Signed-off-by: Pavel Machek <pavel@suse.cz>

diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index a0ccc5b..e460c19 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -111,6 +111,12 @@ of kilobytes free.  The VM uses this num
 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 ammount 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.
+
 ==============================================================
 
 percpu_pagelist_fraction

								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-13 15:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-13 13:46 min_free_kbytes documentation, /proc/sys/vm docs Pavel Machek
2007-08-13 13:53 ` Peter Zijlstra
2007-08-13 14:12   ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.