From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Jan Kasprzak <kas@fi.muni.cz>
Cc: Andrew Morton <akpm@osdl.org>,
nickpiggin@yahoo.com.au, linux-kernel@vger.kernel.org,
bharata@in.ibm.com
Subject: Re: 2.6.14 kswapd eating too much CPU
Date: Mon, 28 Nov 2005 06:04:46 -0200 [thread overview]
Message-ID: <20051128080446.GA23516@logos.cnet> (raw)
In-Reply-To: <20051128131648.GG19307@fi.muni.cz>
On Mon, Nov 28, 2005 at 02:16:48PM +0100, Jan Kasprzak wrote:
> Andrew Morton wrote:
> : Marcelo Tosatti <marcelo.tosatti@cyclades.com> wrote:
> : >
> : > It does seem to scan SLABs intensively:
> : >
> : It might be worth trying the below. Mainly for the debugging check.
> :
> I have compiled a new kernel - 2.6.15-rc2 with the patch you
> recommended and with the slab statistics patch Marcelo mentioned.
> I have add the oprofile support, but apart from that it is the same
> kernel. It seems that the kswapd system time peaks has disappeared,
> or at least they are much lower - kswapd0 has eaten ~3 minutes from
> 11 hours of uptime (in one of my previous mails I found that it used
> to be 117 minutes after ~10 hours of uptime). On my MRTG graphs
> at http://www.linux.cz/stats/mrtg-rrd/cpu.html some _small_ peaks
> can be seen at 15 minutes after every odd-numbered hour. I have booted
> this kernel around 2am local time.
>
> I have no unusual error messages in dmesg output, so this must
> be this part of the patch:
>
> : + /*
> : + * Avoid risking looping forever due to too large nr value:
> : + * never try to free more than twice the estimate number of
> : + * freeable entries.
> : + */
> : + if (shrinker->nr > max_pass * 2)
> : + shrinker->nr = max_pass * 2;
Yep, great.
>
> The shrinker statistics displayed in /proc/slabinfo are
> # egrep '^(inode|dentry)_cache' /proc/slabinfo
> inode_cache 1338 1380 600 6 1 : tunables 54 27 8 : slabdata 230 230 0 : shrinker stat 261765504 16831100
> dentry_cache 40195 49130 224 17 1 : tunables 120 60 8 : slabdata 2890 2890 204 : shrinker stat 57946368 28877600
Interesting, the success/attempt reclaim ratio for the dentry cache is
about 1/2 (pretty good), while the inode cache ratio is 1/15 (not so good).
I wonder why prune_icache() does not move inodes with positive i_count
to inode_inuse list, letting iput() take care of moving to unused
once the count reaches zero.
inode = list_entry(inode_unused.prev, struct inode, i_list);
if (inode->i_state || atomic_read(&inode->i_count)) {
list_move(&inode->i_list, &inode_unused);
continue;
}
Couldnt it be
list_move(&inode->i_list, &inode_inuse);
?
next prev parent reply other threads:[~2005-11-28 13:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-22 12:59 2.6.14 kswapd eating too much CPU Jan Kasprzak
2005-11-23 0:35 ` Andrew Morton
2005-11-23 1:01 ` Jan Kasprzak
2005-11-23 2:19 ` Nick Piggin
2005-11-23 5:13 ` Jan Kasprzak
2005-11-23 13:14 ` Jan Kasprzak
2005-11-23 19:02 ` Andrew Morton
2005-11-23 20:24 ` Jan Kasprzak
2005-11-23 20:32 ` Jesper Juhl
2005-11-23 20:34 ` Jan Kasprzak
2005-11-23 20:35 ` Andrew Morton
2005-11-24 8:31 ` Jan Kasprzak
2005-11-27 8:42 ` Marcelo Tosatti
2005-11-27 20:39 ` Jan Kasprzak
2005-11-27 15:45 ` Marcelo Tosatti
2005-11-27 16:02 ` Marcelo Tosatti
2005-11-27 23:21 ` Andrew Morton
2005-11-28 13:16 ` Jan Kasprzak
2005-11-28 8:04 ` Marcelo Tosatti [this message]
2005-12-06 0:10 ` Jan Kasprzak
2005-12-06 18:14 ` Marcelo Tosatti
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=20051128080446.GA23516@logos.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=akpm@osdl.org \
--cc=bharata@in.ibm.com \
--cc=kas@fi.muni.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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.