lkml.org 
[lkml]   [2008]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: detecting kernel mem leak
On Tue, Apr 29, 2008 at 12:41 PM,  <sancelot@free.fr> wrote:
> I noticed the memory was growing without doing anything in my system ....after
> some investigations , it looks like some kernel components may be involved in
> this problem.
>
> I would like to know if there is a way to monitor activity of memory (de)alloc
> of the kernel in order to target which partof the system/kernel could do this..?

You can do

cat /proc/meminfo | grep Slab

and if that grows too much over time you can do

cat /proc/slabinfo

or use a tool such as slabtop to see where the memory is going. If the
memory is being leaked in the kmalloc caches, you can use
CONFIG_DEBUG_SLAB_LEAK which part of the kernel is doing all those
allocations (not really suitable for production machines).

Also remember to check that Active + Inactive + Buffers + Cached is
roughly the same size as MemTotal - MemFree; otherwise your kernel
might be leaking full pages.

Christoph, I suppose there's some option to
Documentation/vm/slabinfo.c that provides similar output to
CONFIG_DEBUG_SLAB_LEAK for SLUB?

Pekka


\
 
 \ /
  Last update: 2008-04-29 14:49    [W:0.060 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site