0

I've got a mini server running (L)ubuntu 14.04.3, kernel 3.4.39. Every once in a while, the process kswapd0 will use 100% of my CPU power, even though I only use about ~20% of my RAM at that time. There is no reason for kswapd0 to be running, let alone use that much of my CPU. I've already tried putting my vm.swappiness = 1, but unfortunately that didn't help.

There is a lot stuff on google about this problem, some dating back as far as 2010, but no real answer. What should I try?

Thanks in advance!

Foxtrot
  • 11
  • 2
  • How much RAM/swap do you have? – Wilf Dec 06 '15 at 21:00
  • @Wilf, I have 1GB of RAM, and as far as I know no swap memory. Here is a picture of the output of the `top` commmand. In the top you can see how much RAM and swap I have. [Picture](http://i.imgur.com/sc3VJ70.png) – Foxtrot Dec 07 '15 at 16:02

2 Answers2

1

Alright I found the answer, it turns out that most of my RAM was full of cached memory. If you set up a cronjob to clear cached memory every hour or so kswapd0 never appears again.

Foxtrot
  • 11
  • 2
0

It still has a process to check if there's any swap. To reduce it, you'll need to set your swappiness -

edit /etc/sysctl.conf as root, then change (or add)

vm.swappiness = 0
Zanna
  • 69,223
  • 56
  • 216
  • 327