[rhelv6-list] Kernel memory leak?

Fajar A. Nugraha list at fajar.net
Sat Nov 5 13:56:48 UTC 2011


Micky Martin <mickylmartin at ...> writes:

> 
> John Haxby <john.haxby at ...> writes:
> 
> > 
> > 
> > On 13 September 2011 15:01, MickyMartin <mickylmartin <at> gmail.com> wrote:
> > [...] 3 out of 8GB consumed in cache. [...]
> > 
> > 
> >  Do you mean consumed by dentry_cache (as shown in slabtop)?    (Which is 
what
> everyone else was talking about.)  Or do you really mean the cache as reported
> by free(1)?jch
> > 
> > 
> > 
> 
> Yup, same like others.
> 
> But hold on, cause later I stumbled upon some of the centos unreleased kernels
> and using those I cannot replicate the leak. I am still testing them and will
> post back the results here.
> 

For anyone that's still having the same problem: 
http://rackerhacker.com/2008/12/03/reducing-inode-and-dentry-caches-to-keep-oom-
killer-at-bay/

My system is a simple web-server with about 300GB static content on ext4 
(noatime), 1GB memory. With RHEL6's kernel-2.6.32-131.17.1.el6.x86_64 I still 
had large memory usage problem. However:

- If I don't set anything, after some time (about 1 day) memory usage (as 
reported by htop) will climb close to all available memory, and http access will 
be dreadfully slow.
- If I use "echo 2 > /proc/sys/vm/drop_caches" every hour or so, memory usage 
would always stay around 100-130 MB (about same amount just after boot), and 
http access is fast
- If I set /proc/sys/vm/vfs_cache_pressure at 1000 (via sysctl.conf), memory 
usage would usually hover around 700-900MB, but if anything needs lots of memory 
(e.g. copying lots amount of data to tmpfs) it's usage would drop back to around 
100-130MB mark. http access remains fast. This is the solution I'm using now, as 
it still allows memory to be used for cache when it's not needed for anything 
else.

-- 
Fajar




More information about the rhelv6-list mailing list