From: Andreas Dilger <adilger@clusterfs.com>
To: Christian Kujau <evil@g-house.de>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: how to find out it's a memory leak?
Date: Sun, 21 Nov 2004 19:22:59 -0700 [thread overview]
Message-ID: <20041122022259.GR1974@schnapps.adilger.int> (raw)
In-Reply-To: <41A11F50.6060501@g-house.de>
On Nov 22, 2004 00:05 +0100, Christian Kujau wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> during the last weeks i've encounterd some OOM situation here on my little
> server machine. that happened with some 2.6.9 and 2.6.10 kernels but i
> never found out what the reason was. the machine was running for 2 or 3
> weeks and constantly taking up more and more swap until the OOM killer did
> his job and killed some task. i decided to reboot then, once i *had* to
> reboot because the machine has locked up.
> so i suspect a "memory leak" somewhere. knowing nothing about VM and
> knowing the term "memory leak" only from hearsay, i just want to know
>
> 1) does a memory leak always occur in kernel space? or could some
> userspace application take up more and more swapspace too?
> 2) where can i look for the process to blame?
>
> i've already thought about it and i really think a userspace app can also
> be the bad one here, but "top" and "ps" won't tell me who's to blame.
> perhaps somewhere under /proc, but i don't know where. can someone tell me
> where to look for?
If you run "top" and press 'M' it sorts processes by memory used. The
other Mem numbers printed are also of interest, "active" and "inactive"
are cached data pages, "buff" are metadata buffers. Also, /proc/slabinfo
will show memory allocated by kernel processes. Any gigantic numbers in
there are generally a sign of memory leak or imbalance in the kernel.
Also include the output of /proc/meminfo if it isn't a user process.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://members.shaw.ca/adilger/ http://members.shaw.ca/golinux/
prev parent reply other threads:[~2004-11-23 22:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-21 23:05 Christian Kujau
2004-11-22 2:22 ` Andreas Dilger [this message]
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=20041122022259.GR1974@schnapps.adilger.int \
--to=adilger@clusterfs.com \
--cc=evil@g-house.de \
--cc=linux-kernel@vger.kernel.org \
/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®