Messages in this thread | | | Date | Fri, 24 Sep 2010 15:02:17 +0200 | From | Pavel Machek <> | Subject | Re: [RFC][PATCH] update /proc/sys/vm/drop_caches documentation |
| |
Hi!
> There seems to be an epidemic spreading around. People get the idea > in their heads that the kernel caches are evil. They eat too much > memory, and there's no way to set a size limit on them! Stupid > kernel!
Its worse. IIRC android actually uses it in production. And, IIRC akpm told me that drop_caches does not include enough locking to be safe. If that's still the case, it should be documented.
> -As this is a non-destructive operation and dirty objects are not freeable, the > -user should run `sync' first. > +This is a non-destructive operation and will not free any dirty objects. > +To increase the number of objects freed by this operation, the user may run > +`sync' prior to writing to /proc/sys/vm/drop_caches. This will minimize the > +number of dirty objects on the system and create more candidates to be > +dropped. > + > +This file is not a means to control the growth of the various kernel caches > +(inodes, dentries, pagecache, etc...) These objects are automatically > +reclaimed by the kernel when memory is needed elsewhere on the system. > + > +Outside of a testing or debugging environment, use of > +/proc/sys/vm/drop_caches is not recommended.
-- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
| |