public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* High CPU load with kswapd and heavy disk I/O
@ 2003-08-12 18:36 Ken Savage
  2003-08-12 19:44 ` Nuno Silva
  0 siblings, 1 reply; 7+ messages in thread
From: Ken Savage @ 2003-08-12 18:36 UTC (permalink / raw)
  To: linux kernel Mailing List

Short version:
----------------
kernels 2.4.17 --> 2.4.21
Dual Athlon SMP system
4GB RAM, 2GB swap
3ware RAID, filled with millions of files across thousands of directories.
reiserfs 3.6

The following command is guaranteed to lock out the box by activating
kswapd to >95% CPU, blocking out pings, everything.

    find /RAID/data/ -type f -mtime +180 | xargs rm

Details:
----------
Applying the rmap patch seems to prevent kswapd from hogging the CPU,
but causes it to freeze up for some other reason.  (The server is remote,
so I can't view the console.)  Likewise 2.6.0-test* causes freezeups.
Mind you, the server is under a fair bit of CPU and disk load -- hundreds
of processes/threads all actively running.  I suspect something in rmap
has made its way into 2.6 and our usage pattern is triggering the same
fault in both places.

It appears as though the system is unable to efficiently clean up disk
buffer memory when called on to do so.  In the Documentation/, there
is mention of a buffermem sysctl, but that's nowhere to be found.
It's obviously been removed/replaced...  Is there any way to limit the
amount of buffer memory used by the system, that way if/when kswapd
needs to reclaim it, there's very little work for it to do?

Admittedly, that's just masking the problem, as opposed to solving it.
Any idea why kswapd is having such a tough go??  Known solutions
for this problem?

TIA,

Ken


^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: High CPU load with kswapd and heavy disk I/O
@ 2003-08-13 15:34 HABBINGA,ERIK (HP-Loveland,ex1)
  0 siblings, 0 replies; 7+ messages in thread
From: HABBINGA,ERIK (HP-Loveland,ex1) @ 2003-08-13 15:34 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org',
	'kens1835@shaw.ca'

I regularly run the 2.4.21 kernel with 2GB of ram, and I've had to apply
Andrew Morton's patch from a year ago that "hunts down buffer heads and
kills them":

http://marc.theaimsgroup.com/?l=lse-tech&m=102083525007877&w=2

With this patch, kswapd never goes crazy for me anymore.  BTW, if you're
using NFS (you don't mention it), I've also had great luck improving NFS
performance by using Andrea's address space reconfiguration patch:

http://www.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.22pre7
aa1/00_3.5G-address-space-5

and selecting the CONFIG_2GB option.  This configuration along with 2GB of
ram gives me excellent NFS performance.  Increasing the system RAM to 4GB
with any memory address configuration hurts my performance.  The combination
of CONFIG_2GB and 2GB of ram has given me the best performance.  Note that
changing the address space configuration like I've mentioned violates the
ABI (http://stage.caldera.com/developer/devspecs/abi386-4.pdf   page 47), so
your applications might not work as expected.  I've also needed to use Neil
Brown's "remove the BKL from NFSD" patches, which can be found at:

http://cgi.cse.unsw.edu.au/~neilb/patches/linux-stable/?detail=2003-01-06:00

(patches 005 thru 011)

Erik

On Tue August 12 2003 16:49, Nuno Silva wrote: 


> My guess is that this is the cause. LOWMEM pressure because of very 
> large directories... Relating to this, linux-2.6.0-test3-mm1 has Ingo's 
> 4G/4G memory split. Can you try this kernel, enable 4G/4G feature, and 
> report back? 


Something about the 2.6 (and the rmap patched 2.4) kernels causes 
lockouts on the server -- for reasons OTHER than kswapd. The server 
running the delete-old-files process runs hundreds of other CPU and disk 
I/O intensive processes/threads, and it doesn't look like 2.6 is yet able 
to handle the load. Unfortunately, the server is a production environment 
machine at a remote site, so lockouts/reboots/kernel panics are baaaad :( 


I've seen other mentions of kswapd/kupdated problems in 2.4.xx, but 
few mentions of solutions. Have people just learned to avoid the 
situations that trigger the mad thrashes? 


Ken 



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-08-13 15:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-12 18:36 High CPU load with kswapd and heavy disk I/O Ken Savage
2003-08-12 19:44 ` Nuno Silva
2003-08-12 20:23   ` Ken Savage
2003-08-12 23:49     ` Nuno Silva
2003-08-13  0:14       ` Ken Savage
2003-08-13 15:36         ` Nuno Silva
  -- strict thread matches above, loose matches on Subject: below --
2003-08-13 15:34 HABBINGA,ERIK (HP-Loveland,ex1)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox