kswapd 100% CPU usage and running out of memory without swap being used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
This bug closely resembles bug 1518457 and others, but is reported separately as the affected kernel versions do not match, see comments #45, #43 and #8 on 1518457.
The issue first occured on a production workload (JIRA running on Tomcat) on an EC2 t2.small instance after upgrading to 15.10. The issue happens when running out of memory, typicall during busy hours or when nightly Python backup script runs. To reproduce the issue, I use t2.micro (1GiB RAM) because the problem then arises just by starting the JIRA application. I do not see the problem on 14.04 or 15.05 on the same server.
Symptoms: kswapd0 falls into a busy loop and spins on 100% CPU usage and swap not being used/barely being used. The system can be recovered with `echo 1 > /proc/sys/
Swappiness has not been changed (vm.swappiness = 60). I can reproduce this consitently on Ubuntu AMIs (https:/
I've attached scripts and logs from an up to date 15.10 and 15.04 instance to compare results with and without the bug. Note that the CPU numbers in the vmstat output doesn't specify which process, but top has showed that the majority of user time is the java process and the majority of system time is the kswapd0 process.
ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: linux-image-
ProcVersionSign
Uname: Linux 4.2.0-23-generic x86_64
AlsaDevices:
total 0
crw-rw---- 1 root audio 116, 1 Jan 10 03:56 seq
crw-rw---- 1 root audio 116, 33 Jan 10 03:56 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
Date: Sun Jan 10 04:07:30 2016
Ec2AMI: ami-c4140aa8
Ec2AMIManifest: (unknown)
Ec2Availability
Ec2InstanceType: t2.micro
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
MachineType: Xen HVM domU
PciMultimedia:
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB: 0 xen
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware N/A
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
SourcePackage: linux
UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev'
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/07/2015
dmi.bios.vendor: Xen
dmi.bios.version: 4.2.amazon
dmi.chassis.type: 1
dmi.chassis.vendor: Xen
dmi.modalias: dmi:bvnXen:
dmi.product.name: HVM domU
dmi.product.
dmi.sys.vendor: Xen
Changed in linux (Ubuntu): | |
importance: | Undecided → Low |
This change was made by a bot.