5

I have run GNU/Linux since 0.99, and it is only in the most recent years that I have seen kswapd use any serious CPU-time.

In ye olde days the swapsystem would be waiting for the disk and hardly use any CPU time while waiting for the disk to respond.

What changed, so that kswapd now happily eats almost a full core?

What is kswapd doing that is so CPU heavy?

Stephen Kitt
  • 434,908
Ole Tange
  • 35,514

1 Answers1

0

One of my systems uses zswap, and that can explain why kswapd uses CPU on that system: It compresses RAM, which obviously will take serious CPU time. I have see it use 800% CPU on that.

But I have the feeling this is not the only thing that costs serious CPU time.

Ole Tange
  • 35,514
  • Why does anyone have swap enabled these days when RAM is so affordable? – Vlastimil Burián May 11 '20 at 11:08
  • 1
    An upgrade from 0.5T to 1T would on my R815-server costs around 2500 USD. I paid less than 1000 USD for the full 0.5T server. The server does not support more than 1T RAM, so I will be hitting that limit anyway; not all the time but now and then. My laptop is even worse: It does not even support 0.5T, so it would be impossible to install 0.5T in it. Thus zswap + swap seems to be the only option. – Ole Tange May 11 '20 at 11:32
  • @LinuxSecurityFreak https://unix.stackexchange.com/questions/32857/is-swap-an-anachronism – Kusalananda May 11 '20 at 14:53