Thread (10 messages) read the whole thread 10 messages, 3 authors, 2007-08-24

Re: Drop caches - is this safe behavior?

From: Chris Snook <hidden>
Date: 2007-08-24 05:17:18

Dave Kleikamp wrote:
On Thu, 2007-08-23 at 21:36 -0400, Chris Snook wrote:
quoted
If you think the system is doing the wrong thing (and it doesn't sound 
like it is) you should be tweaking the vm.swappiness sysctl.  The 
default is 60, but lower values will make it behave more like you think 
it should be behaving, though you'll still probably see a tiny bit of 
swap usage.  Of course, if your webservers are primarily serving up 
static content, you'll want a higher value, since swapping anonymous 
memory will leave more free for the pagecache you're primarily working with.
swappiness deals with page cache, whereas writing "2" to drop_caches
cleans out the inode and dentry caches.  Mike may be better off writing
a high number (say 10000) to /proc/sys/vm/vfs_cache_pressure.  This
would cause inode and dentry cache to be reclaimed sooner than other
memory.
Thanks, I was confusing this with dropping pagecache.

Mike --

	Try Dave's suggestion to increase vm.vfs_cache_pressure.  drop_pages 
should never be needed, regardless of which caches you're dropping.

	-- Chris

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help