[rhelv6-list] Kernel memory leak?

Stephen John Smoogen smooge at gmail.com
Wed Feb 2 04:56:44 UTC 2011


On Fri, Jan 21, 2011 at 21:06, Chris Adams <cmadams at hiwaay.net> wrote:
> Once upon a time, Stephen John Smoogen <smooge at gmail.com> said:
>> > I looked at "slabtop", and the dentry cache is the culprit:
>> >
>> >  OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME
>> > 3078900 3078900 100%    0.19K 153945       20    615780K dentry
>> >
>> > Anybody else seeing this?
>>
>> What is the box doing? How is it set up (ext3, ext4, ?). I haven't
>> really looked but would want to check with a system that is set up
>> similarly.
>
> It is running ext4 on LVM on md-raid1.  It is running Nagios, Apache,
> Quagga, Network UPS Tools (monitoring a couple of UPSes), and smstools.
> Quagga is running OSPF (to learn some routes to some of the
> Nagios-monitored devices) and BGP (to advertise some routes via BGP from
> a home-written "bad IP" monitor).
>
> The bad-IP monitor uses several perl scripts I wrote, one of which uses
> the Linux::Inotify2 module to watch a directory that gets log files
> added and removed for each bad IP.  The last few days have been rather
> busy for my bad IP detector; there are 1292 files in that directory
> right now for the last 48 hours.
>
> I wondered if the single inotify could be a trigger (as that's the only
> thing really unusual), but stopping that daemon doesn't free the RAM
> from the dentry cache.

My guess is that since the dentry cache is kernel space stopping user
space items would not have any effect on it. Actually reading some
older slides, dentries are cached heavily to make "user experience"
faster and are not freed until memory pressure from the kernel. Also
looking at various forums, there seem to be many questions about this
from around 2.6.27 so I would guess it is something between
2.6.18+patches and 2.6.32+patches which is changing how things work.


-- 
Stephen J Smoogen.
"The core skill of innovators is error recovery, not failure avoidance."
Randy Nelson, President of Pixar University.
"Let us be kind, one to another, for most of us are fighting a hard
battle." -- Ian MacLaren




More information about the rhelv6-list mailing list