public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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 B Rao <bharata@in.ibm.com>
Subject: Re: 2.6.14 kswapd eating too much CPU
Date: Sun, 27 Nov 2005 14:02:07 -0200	[thread overview]
Message-ID: <20051127160207.GE21383@logos.cnet> (raw)
In-Reply-To: <20051127203924.GE27805@fi.muni.cz>

Hi Jan,

> 	The task that probably triggers this problem is a cron job
> doing full-text indexing of mailing list archive, so it accesses lots
> of small files, and then recreates the inverted index, which is one big
> file. So maybe inode cache shrinking or something may be the problem there.
> However, the cron job does an incremental reindexing only, so I think it
> reads less than 100 files per each run.
> : 
> : Maybe you should also try profile/oprofile during the kswapd peeks?
> : 
> 	Do you have any details on it? I can of course RTFdocs of oprofile,
> but should I try to catch something special?

It does seem to scan SLABs intensively:

pgscan_kswapd_high 0
pgscan_kswapd_normal 940269891
pgscan_kswapd_dma 0
pgscan_direct_high 0
pgscan_direct_normal 13837131
pgscan_direct_dma 0
pginodesteal 11216563
slabs_scanned 160160350534400
kswapd_steal 909876526
kswapd_inodesteal 305039060
pageoutrun 30139677
allocstall 4067783

If you take the amont of scanned slabs and divide by the sum of
direct/kswapd pagescans:

160160350534400 / (940269891+13837131) = 167864

Which means that for each page scanned about 168000 slab entries are
scanned. Does not look very good.

Other than the profiling can you please also try Bharata's
shrinkable slab cache statistics patch?

http://lkml.org/lkml/2005/10/26/1



  parent reply	other threads:[~2005-11-27 21:42 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 [this message]
2005-11-27 23:21                         ` Andrew Morton
2005-11-28 13:16                           ` Jan Kasprzak
2005-11-28  8:04                             ` Marcelo Tosatti
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=20051127160207.GE21383@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox