Why kswapd0 consumes CPU time without any swap activity?
Issue
kswapd process is in charge with running in the background and making free pages available to the memory allocator (by evicting user pages).
mm/vmscan.c:
2171 /*
2172 * The background pageout daemon, started as a kernel thread
2173 * from the init process.
2174 *
2175 * This basically trickles out pages so that we have _some_
2176 * free memory available even if there is no other activity
2177 * that frees anything up. This is needed for things like routing
2178 * etc, where we otherwise might have all activity going on in
2179 * asynchronous contexts that cannot page things out.
2180 *
2181 * If there are applications that are active memory-allocators
2182 * (most normal use), this basically shouldn't matter.
2183 */
2184 static int kswapd(void *p)
So basically kswapd can be "loaded" even if swapping is not happening.
Environment
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.