Random high latency with KSM enabled and multiple CPU sockets

Bug #1368439 reported by Lawrence Dudley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned
qemu-kvm (Ubuntu)
Expired
Low
Unassigned

Bug Description

If running a box with multiple CPU sockets and Ubuntu 14.04 Server 64-bit qemu-kvm with KSM enabled as by default, random high latency occurs on network connections for VMs, as high as 4000ms - 5000ms. The host also reports high IO wait times.

Disabling KSM fixed this for me.

I run the same setup on boxes with only 1 CPU socket and it's not an issue.

qemu-kvm version: Installed: 2.0.0+dfsg-2ubuntu1.3

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1368439] [NEW] Random high latency with KSM enabled and multiple CPU sockets

 affects: linux

Revision history for this message
Lawrence Dudley (m-lawrence) wrote :

I should add that to fix this while running you need to do, as root:

echo 2 > /sys/kernel/mm/ksm/run

This makes the pages duplicate, might take a second or two and disables KSM.

no longer affects: linux
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1368439

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Lawrence Dudley (m-lawrence) wrote :

I've looked through all the logs that are relevant and can't find any specific output that's relevant - marking as confirmed.

If you've got any logs in specific you need me to pull out I can do so.

Revision history for this message
Lawrence Dudley (m-lawrence) wrote :

Wait, someone else needs to mark it as confirmed.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Is this still an issue for you?

There were some actual KSM corruption bugs which were somewhat recently fixed.

KSM in general wil use more CPU in order to reduce memory contention, so your results are not necessarily unexpected. Aside from turning KSM off, you can also reduce the KSM frequency.

There are some other tuning hints at http://www.linux-kvm.org/page/Tuning_Kernel

Changed in qemu-kvm (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for qemu-kvm (Ubuntu) because there has been no activity for 60 days.]

Changed in qemu-kvm (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.