From: "Pekka Enberg" <penberg@cs.helsinki.fi>
To: sancelot@free.fr
Cc: linux-kernel@vger.kernel.org, "Christoph Lameter" <clameter@sgi.com>
Subject: Re: detecting kernel mem leak
Date: Tue, 29 Apr 2008 15:46:42 +0300 [thread overview]
Message-ID: <84144f020804290546h666983aci77fbb08eb507e777@mail.gmail.com> (raw)
In-Reply-To: <1209462094.4816ed4e93977@imp.free.fr>
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
next prev parent reply other threads:[~2008-04-29 12:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 9:41 sancelot
2008-04-29 12:46 ` Pekka Enberg [this message]
2008-04-29 16:58 ` Christoph Lameter
[not found] ` <4821C526.8030901@free.fr>
2008-05-07 17:21 ` Christoph Lameter
2008-05-13 8:50 ` Stéphane ANCELOT
2008-05-13 19:45 ` Pekka Enberg
2008-05-15 10:58 ` Stéphane ANCELOT
2008-05-15 17:38 ` Christoph Lameter
2008-05-16 8:58 ` Stéphane ANCELOT
2008-05-16 18:50 ` Christoph Lameter
2008-05-13 10:26 Tomasz Chmielewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84144f020804290546h666983aci77fbb08eb507e777@mail.gmail.com \
--to=penberg@cs.helsinki.fi \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sancelot@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®