From: Eric Sandeen <sandeen@redhat.com>
To: Don Porter <porterde@cs.utexas.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: ext3 leaking buffer_heads
Date: Mon, 23 Mar 2009 17:00:37 -0500 [thread overview]
Message-ID: <49C80685.9060800@redhat.com> (raw)
In-Reply-To: <49C7E959.4010000@cs.utexas.edu>
Don Porter wrote:
> Hi,
>
> It appears that the ext3 journal code has a slow leak of buffer_head
> structs. Try this simple script:
>
> perl -e 'while(1){ `sync`; }'
>
> and monitor the count of allocated buffer_head structs in
> /proc/slabinfo, and it seems to increase without bound. Even after this
> script is killed and the machine is left idle for several minutes, the
> count of buffer heads doesn't substantially decrease.
>
> Looking around at various machines I have access to, the count of
> allocated buffer_heads roughly correlates with uptime when using ext3.
> This is a slow leak - one would likely have to run this script for a day
> or more to drain enough lowmem to cause problems.
>
> Other info: I have only tried this on x86 machines, but I have tried
> both 2.6.22.6 and 2.6.28.8, and both have the problem. I am running
> Ubuntu 7.10 on top of these kernels, but the kernels were built directly
> from kernel.org tarballs.
>
> Any advice or help with this issue is greatly appreciated.
Without investigating too far yet, I did try this, and did indeed see
the buffer_head usage go up while the script runs.
However, if I did:
# echo 3 > /proc/sys/vm/drop_caches
before the script, and noted the total nr. of buffer heads in use, and
then did it again after the script had been running a while, I got back
to the same (low) count of buffer heads in use. So I don't think this
is a leak as in "the system has lost all accounting of these buffer
heads" at least... but it'd be interesting to know what the reason for
the increase is, I'm not sure offhand.
-Eric
next prev parent reply other threads:[~2009-03-23 22:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-23 19:56 ext3 leaking buffer_heads Don Porter
2009-03-23 22:00 ` Eric Sandeen [this message]
2009-03-24 22:43 ` Don Porter
2009-03-25 0:46 ` Theodore Tso
2009-03-25 7:04 ` Don Porter
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=49C80685.9060800@redhat.com \
--to=sandeen@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=porterde@cs.utexas.edu \
/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;
as well as URLs for NNTP newsgroup(s).