public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kswapd busy but not swapping
@ 2008-05-20 23:04 Christian Kujau
  2008-05-21  9:13 ` Peter Zijlstra
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Kujau @ 2008-05-20 23:04 UTC (permalink / raw)
  To: LKML; +Cc: kanoj

Hi,

I noticed that the [kswapd0] thread was eating 3-7% cpu time but no 
swapspace has been used yet. This is with a just booted 2.6.25.4 system,
currently with some disk i/o going on.

So I figured that kswapd might not be responsible for "swapping" after 
all, although the name suggests it. Grep'ing Documentation/ for kswapd did 
not reveal much. Is the paper from Kanoj[0] still valid for 2.6 kernels? 
The SGI page referenced in Documentation/kernel-docs.txt is down, but 
there's a .txt version on [1] which tells me:

   "When memory runs low, and a process can not find a free page, it wakes
    up kswapd, the memory stealer"

So, if I'd run low on memory, kswapd would be active. But I don't see that 
in free(1):

# free -m
              total       used       free     shared    buffers     cached
Mem:          2023       1662        360          0        820        315
-/+ buffers/cache:        526       1496
Swap:         1505          0       1505

If you're interested, there are more details at 
http://nerdbynature.de/bits/2.6.25.4/kswapd

Thanks,
Christian.

[0] http://reality.sgi.com/kanoj_engr/vm229.html
[1] http://www.cse.unsw.edu.au/~neilb/oss/linux-commentary/
-- 
BOFH excuse #197:

I'm sorry a pentium won't do, you need an SGI to connect with us.

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

* Re: kswapd busy but not swapping
  2008-05-20 23:04 kswapd busy but not swapping Christian Kujau
@ 2008-05-21  9:13 ` Peter Zijlstra
  2008-05-21 18:42   ` Christian Kujau
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2008-05-21  9:13 UTC (permalink / raw)
  To: Christian Kujau; +Cc: LKML, kanoj

On Wed, 2008-05-21 at 01:04 +0200, Christian Kujau wrote:
> Hi,
> 
> I noticed that the [kswapd0] thread was eating 3-7% cpu time but no 
> swapspace has been used yet. This is with a just booted 2.6.25.4 system,
> currently with some disk i/o going on.
> 
> So I figured that kswapd might not be responsible for "swapping" after 
> all, although the name suggests it. Grep'ing Documentation/ for kswapd did 
> not reveal much. Is the paper from Kanoj[0] still valid for 2.6 kernels? 
> The SGI page referenced in Documentation/kernel-docs.txt is down, but 
> there's a .txt version on [1] which tells me:
> 
>    "When memory runs low, and a process can not find a free page, it wakes
>     up kswapd, the memory stealer"
> 
> So, if I'd run low on memory, kswapd would be active. But I don't see that 
> in free(1):
> 
> # free -m
>               total       used       free     shared    buffers     cached
> Mem:          2023       1662        360          0        820        315
> -/+ buffers/cache:        526       1496
> Swap:         1505          0       1505

It could have been busy reclaiming pagecache.

kswapd is the generic reclaim thread - paging anonymous memory to the
swap is but one form thereof.


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

* Re: kswapd busy but not swapping
  2008-05-21  9:13 ` Peter Zijlstra
@ 2008-05-21 18:42   ` Christian Kujau
  0 siblings, 0 replies; 3+ messages in thread
From: Christian Kujau @ 2008-05-21 18:42 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: LKML, kanoj

On Wed, 21 May 2008, Peter Zijlstra wrote:
> It could have been busy reclaiming pagecache.
> kswapd is the generic reclaim thread - paging anonymous memory to the
> swap is but one form thereof.

Hm, OK, so it's "OK" I guess. It stopped after a few hours anyway, I think 
it was related to the disk IO (dd if=/dev/hdd of=/dev/null)....

Thanks for replying,
Christian.
-- 
BOFH excuse #75:

There isn't any problem

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

end of thread, other threads:[~2008-05-21 18:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-20 23:04 kswapd busy but not swapping Christian Kujau
2008-05-21  9:13 ` Peter Zijlstra
2008-05-21 18:42   ` Christian Kujau

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