Red Hat Bugzilla – Bug 58406
kswapd uses more than 50% of CPU
Last modified: 2007-04-18 12:39:02 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)
Description of problem:
On RH 7.2 smp kernel, kswapd takes hold of the CPU
when the buffered and cache pages approaches the physical
RAM limit. Swap space although available is not used.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Boot up the RH 7.2 smp kernel on a dual cpu dell server
2. Run "dump 0f /dev/st0 /" (use a bigger file system instead)
3. Also happens when dumping to a file as well.
Actual Results: kswapd occupies most of the CPU and machine slows to a crawl.
Tape backup transfer rate goes from 5Mb/s down to 100k/s.
Expected Results: kswapd should not take hold of the CPU.
Occurs on a Dell PowerEdge 2550 Server with dual Pentium III 1266MHz
and 1GB of RAM using Hardware RAID 5 running RedHat Linux 7.2 smp
kernel. Does not happen on a single CPU machine running 7.2.
Did you try the 2.4.9-21 kernel?
It's not optimal yet and are working on fixing the kswapd thing even more, but
it should be better than the stock 7.2 kernel already.
I'm having the same problem too both with the 2.4.9-13 and 2.4.9-31 SMP
versions on a dual processor PIII with 4.0GB RAM.
Here's how it manifests itself - my application requests a huge amount of
memory (roughly 2GB) and then does a lot of IO. The free memory as shown by top
falls to 5M. At some point kswapd kicks in and starts swapping pages. This
happens even though there are no other process running and the total size of my
application is only 2.4G. Almost 1.6GB should have been available (probably in
either the page cache or the buffer cache) and should be made available. Yet,
it is kswapd that kicks in.
1) shouldn't it be kreclaimd that should be activated?
2) The memory in use (as shown by top) keeps going up with every run of the
application which causes paging to occur sooner and sooner until kswapd starts
running as soon as the application is started.
should be fixed in 7.3 kernel