From: Koni <mhw6@cornell.edu>
To: linux-mm@kvack.org
Subject: kswapd consumes CPU
Date: 22 Jun 2003 12:47:15 -0400 [thread overview]
Message-ID: <1056300434.29768.206.camel@localhost.localdomain> (raw)
Hello Folks,
I've observed kswapd reach some kind of singularity on one of my
systems, I wonder if someone can help me understand how to fix it/tweak
it or suggest a newer kernel version.
The system is a 2 CPU 1GHz Pentium III, 2G RAM, running a stock redhat
kernel "2.4.18-24.7.xsmp #1" -- distributed as an update for redhat-7.2
What happens:
When I use "dump" to do a level 0 dump of a large filesystem (100+ GB)
to tape, kswapd starts eating 99.9% of one CPU and dump's performance
begins to crawl. Nothing else is actively running, and nearly all 2G of
memory is allocated to cache.
My guess is that dump is aggressively reading the disk and kswapd is
wasting time trying to intelligently figure out which page of cache to
forget to make space for the next block read by dump, but everything in
memory has roughly the same frequency and time of use, generating a
worst case scenario for a sort or something for an lru or lfu policy.
If I run a program which allocates and writes to memory, a page at time,
gobbling up the fs cache, let it eat up nearly 2G, and kill it, kswapd
goes back to sleep, dump returns to its normal performance.
Dump is not the only program which can cause this response from the
system, but it does so quite reliably. Unfortunately, there is no longer
a buffermem or freepages file in my /proc/sys/vm -- I don't understand
the files which are there or how to control the file caching of the
system. Can someone offer any advice? RTM comments welcome...
I don't know if my guess at the problem above is even close to the real
problem, but I'd prefer a stupid kswapd, which just defenestrates a page
a random rather than have a computational latency which exceeds the disk
latency. Perhaps this is just a bug in the kernel I am using. It's just
strange, the vm is effectively thrashing but the working set is probably
only a couple hundred kilobytes, less than one tenth one percent of the
RAM.
Any comments or suggestions for trying different kernels (rmap? 2.5-mm?)
would be greatly appreciated.
Cheers,
Koni
--
mhw6@cornell.edu
Koni (Mark Wright)
238B Emerson Hall - Cornell University
Solanaceae Genome Network http://www.sgn.cornell.edu/
Lightlink Internet http://www.lightlink.com/
"There are 3 kinds of people - those who can count and those who can't"
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next reply other threads:[~2003-06-22 16:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-22 16:47 Koni [this message]
2003-06-22 16:54 ` Martin J. Bligh
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=1056300434.29768.206.camel@localhost.localdomain \
--to=mhw6@cornell.edu \
--cc=linux-mm@kvack.org \
/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