Bug 58406 - kswapd uses more than 50% of CPU
kswapd uses more than 50% of CPU
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-01-15 19:39 EST by David Kelertas
Modified: 2007-04-18 12:39 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-03-25 20:44:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Kelertas 2002-01-15 19:39:54 EST
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):

How reproducible:

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.

Additional info:

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.
Comment 1 Arjan van de Ven 2002-02-11 12:00:41 EST
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.
Comment 2 Need Real Name 2002-03-25 20:44:47 EST
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.

Please help! 
Comment 3 Arjan van de Ven 2002-09-05 06:33:44 EDT
should be fixed in 7.3 kernel

Note You need to log in before you can comment on or make changes to this bug.