← Back to team overview

kernel-packages team mailing list archive

[Bug 1476211] Re: kswapd takes 100% CPU although there is no swap

 

I am on xbuntu 15.10 and this affected me after I upgraded.  I have 16GB
ram and kswapd kicks in, locks it up for 10 - 30 seconds multiple times
an hour.  vmstat 5 shows:

1  0 1208112 569056  69376 7019032    0    0    84   347 1634 2951 25  1 73  0  0
 2  0 1208072 164192   2212 6619100   14    6   163    10 2177 5029 26  3 70  0  0
 0 20 2366584 204456    316 6367792   48 234926 25103 235206 6928 2748  2  8  5 86  0
 1  5 3294060 151216    548 6413108 27001 193908 88306 193970 5196 6590  2 10 13 76  0
 2  1 4065264 172748   3172 6488812 72246 163202 106635 163531 8388 11018  2 22 43 33  0
 5  0 4806852 136160   4444 6469352 76391 153371 98650 154074 8352 9759  2 26 37 35  0
 1  1 5573372 145112    816 6440936 73558 157316 87340 157662 6802 8592  2 21 44 33  0
 0  4 6383744 168976   1800 6463780 74014 166143 88715 166679 6388 8669  2 27 41 31  0
 1  1 7024704 146832   1924 6466112 68409 135974 78778 136382 6356 8203  1 19 42 38  0
 2  0 7736084 181116   1928 6476672 56372 144775 64527 145122 8093 6853  1 16 41 43  0
 0  7 8381188 197892    432 6456988 74326 159450 87829 160040 8327 8744  4 23 45 28  0
 1  0 3944136 3240020   1400 6488888 9170   67 14278    74 2112 4084 22  3 69  6  0
 1  0 3926636 2819400   2060 6521132 3596    0  7028     0 1848 3374 25  3 71  1  0
 
So you can see when it kicks in.  I have made the following modifications and still have the problem:

/etc/sysctl.conf:
vm.swappiness=10

/etc/rc.local:
# Fix khugepaged issues (20150706)
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag

# Another fix for khugepaged issues (20151210)
echo madvise > /sys/kernel/mm/transparent_hugepage/enabled

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1476211

Title:
  kswapd takes 100% CPU although there is no swap

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  On a notebook with neither swap partition nor swap file (because of
  SSD and surplus of RAM), kswapd0 suddenly runs amok and takes 100% of
  CPU activity. When this happens, usually at most 5.5 of 8 GB RAM were
  in use, so there is no reason to swap.

  This happens so suddenly, that no user input is possible anymore, eg.
  I can barely switch to tty to kill processes that take most RAM. The
  processor becomes extremely hot and I can only turn the computer off
  and reboot. I  consider this as critical and harmful to my hardware.

  I noticed that Ubuntu installs by default with swappiness 60. Now I
  changed that to 10 because I would never encounter the case that 8GB
  are in use, but it didn't have an effect.

  Expected behavior:
  - on systems without RAM, kswapd should never attempt to swap
  - if there is not enough RAM, kernel should kill processes to free up RAM
  - no process should be able to claim so much CPU activity, that the computer becomes unresponsive (it should always be possible to control/stop/kill processes over tty)

  Actual behavior:
  - kswapd tries to swap although there is no swap space

  ProblemType: Bug
  DistroRelease: Ubuntu 15.04
  Package: linux-image-3.19.0-22-generic 3.19.0-22.22
  ProcVersionSignature: Ubuntu 3.19.0-22.22-generic 3.19.8-ckt1
  Uname: Linux 3.19.0-22-generic x86_64
  ApportVersion: 2.17.2-0ubuntu1.1
  Architecture: amd64
  AudioDevicesInUse:
   USER        PID ACCESS COMMAND
   /dev/snd/controlC1:  andreas    2368 F.... pulseaudio
   /dev/snd/controlC0:  andreas    2368 F.... pulseaudio
  CurrentDesktop: Unity
  Date: Mon Jul 20 12:49:24 2015
  EcryptfsInUse: Yes
  InstallationDate: Installed on 2015-06-06 (43 days ago)
  InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
  MachineType: LENOVO 20266
  ProcFB: 0 inteldrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-22-generic root=UUID=8a0dc2f3-fcf3-4e5b-8e23-1441bd36e3dc ro noprompt persistent quiet splash acpi_backlight=vendor vt.handoff=7 init=/sbin/upstart
  RelatedPackageVersions:
   linux-restricted-modules-3.19.0-22-generic N/A
   linux-backports-modules-3.19.0-22-generic  N/A
   linux-firmware                             1.143.1
  SourcePackage: linux
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 10/31/2013
  dmi.bios.vendor: LENOVO
  dmi.bios.version: 76CN31WW
  dmi.board.asset.tag: No Asset Tag
  dmi.board.name: Yoga2
  dmi.board.vendor: LENOVO
  dmi.board.version: 31900058STD
  dmi.chassis.asset.tag: No Asset Tag
  dmi.chassis.type: 10
  dmi.chassis.vendor: LENOVO
  dmi.chassis.version: Lenovo Yoga 2 Pro
  dmi.modalias: dmi:bvnLENOVO:bvr76CN31WW:bd10/31/2013:svnLENOVO:pn20266:pvrLenovoYoga2Pro:rvnLENOVO:rnYoga2:rvr31900058STD:cvnLENOVO:ct10:cvrLenovoYoga2Pro:
  dmi.product.name: 20266
  dmi.product.version: Lenovo Yoga 2 Pro
  dmi.sys.vendor: LENOVO

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1476211/+subscriptions


References