From: "Theodore Ts'o" <tytso@mit.edu>
To: Dimitrios Apostolou <jimis@gmx.net>
Cc: Roland Eggner <edvx1@systemanalysen.net>,
linux-kernel@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: backing up ext4 fs, system unresponsive, thrashing like crazy even though swap is unused
Date: Mon, 3 Dec 2012 12:43:42 -0500 [thread overview]
Message-ID: <20121203174342.GB20260@thunk.org> (raw)
In-Reply-To: <alpine.LFD.2.02.1212030120090.1646@soupermouf>
On Mon, Dec 03, 2012 at 01:56:27AM +0200, Dimitrios Apostolou wrote:
>
> Please take a look at [2], it's what is called in that case. Via
> this call all slabs that have registered a shrinker, get actually
> shrinked. Other fs do, but I can't find whether ext4 actually
> registers a shrinker for its slabs.
The ext4 inode cache gets shrunk via the VFS layer, in
prune_icache_sb() in fs/inode.c. This is true for all file systems'
inode caches.
If you are under heavy memory pressure, or if you run echo 3 >
/proc/sys/vm/drop_caches, and the inodes aren't getting dropped, then
it's because the inodes are getting pinned for some reason --- i.e.,
they are referenced via some entry in the dentry cache, perhaps there
are files open, or processes are cd'ed into a directory, etc.
So an example of what happens with the ext4_inode_cache before and
after running "echo 3 > /proc/sys/vm/drop_caches":
ext4_inode_cache 183379 183379 1872 17 8 : tunables 0 0 0 : slabdata 10787 10787 0
ext4_inode_cache 1595 6120 1872 17 8 : tunables 0 0 0 : slabdata 360 360 0
(What's left is due to all of the executable files, shared libraries,
current directories, and open files for all my processes running on my
system --- which for context is Xfce plus Chrome, emacs, mutt, and a
bunch of terminal windows plus the usual assortment of system daemons.)
If you are seeing a large number of inodes still in the ext4 inode
cache after using drop_caches, then I'd look to see whether you have
something like SELinux or auditing enabled which is pinning a bunch of
dentries or inodes, or whether your backup program (or some other
program running on your system) is keeping lots of directories or
inodes open for some reason.
Hope this helps,
- Ted
next prev parent reply other threads:[~2012-12-03 17:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-25 15:03 backing up ext4 fs, system unresponsive, thrashing like crazy even though swap is unused Dimitrios Apostolou
2012-12-02 12:44 ` Dimitrios Apostolou
2012-12-02 22:50 ` Roland Eggner
2012-12-02 23:56 ` Dimitrios Apostolou
2012-12-03 17:43 ` Theodore Ts'o [this message]
2012-12-03 18:47 ` Eric Paris
2012-12-03 19:35 ` Dimitrios Apostolou
2012-12-03 20:00 ` Dimitrios Apostolou
2012-12-03 18:03 ` Roland Eggner
2012-12-03 19:25 ` Dimitrios Apostolou
[not found] <1353851735.22969.18.camel@soupermouf>
2012-11-25 19:30 ` Dimitrios Apostolou
2012-11-25 22:59 ` Roland Eggner
2012-11-25 23:56 ` Alan Cox
2012-11-26 3:11 ` Roland Eggner
2012-12-06 14:20 ` Jan Kara
2012-12-06 15:15 ` Dimitrios Apostolou
2012-12-06 16:43 ` Jan Kara
2012-12-07 15:26 ` Dimitrios Apostolou
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=20121203174342.GB20260@thunk.org \
--to=tytso@mit.edu \
--cc=catalin.marinas@arm.com \
--cc=edvx1@systemanalysen.net \
--cc=jimis@gmx.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.