2

I have Windows Server 2012 Essentials running as a VM on KVM running on Ubuntu 14.04 LTS.

It performs very nicely after a reboot but after a while it starts slowing down and getting sluggish. This can be after a few hours or a day. I haven't found any obvious pattern between usage and when it slows down.

The Windows VM has three virtual disks, two are LVM and one is a 250 GB VMDK file on an LVM. I intend converting the VMDK file to direct LVM which will presumably help performance a bit but I don't think that is my current problem. We use the latest virtio drivers.

When it slows down, it gets quite bad. A right click on the task bar can take 5 seconds or more before the menu appears. VNC on the host or RDP to the Windows server perform much the same. File share access, DNS etc are all slow for the clients on our LAN.

A reboot of the Windows VM fixes the problem. I don't need to reboot the host.

There are no extra applications running on the Windows server except CloudBerry backup which checks for file changes every four hours. It doesn't seem to be that. It takes a few minutes to scan for changes but if I run it soon after a reboot, the server is still running quickly.

This server provides printing services to network attached printers.

CPU usage of the qemu process on the host creeps up when things slow down. It's always somewhat peaky but I think the peaks get higher and last longer. I don't notice anything particularly unusual in the Windows task manager.

I know Windows on KVM is, of course, not supported by Microsoft so it was always a bit of a gamble. Maybe it was a foolish idea but the installation and early performance has been absolutely perfect.

Any ideas or suggestions? What tools or methods should I be using to track down this problem?

1
  • I checked again and somehow I didn't have the latest virtio drivers as I thought. I've now updated from 0.1-74 to 0.1-81. Time will tell if it makes any difference. So far so good.
    – tetranz
    Jul 3, 2014 at 18:36

3 Answers 3

1

It seems that the issue was a result of a kernel bug in the 3.13 kernel that causes KSM to be a bit over eager when identifying memory to share. (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1341195)

We fixed this by setting KSM_ENABLED in /etc/default/qemu-kvm to 0. Alternatively, we could have upgraded to the 3.14 kernel.

0

This is not really worthy of being called an answer but ... in case anyone else has the same problem.

I can't explain it but the problem was solved by moving to different KVM host on different hardware but I don't think it was a real hardware problem.

We have two servers.

A Cisco which has 2 quad core procs. Linux shows 16 cpus. I guess that's with hyperthreading.

An HP DL360 with 2 dual core proces. Linux shows 8 cpus.

Both run Ubuntu 14.04 LTS with the latest updates.

The problem was with the Windows 2012 VM running on the Cisco. It would work absolutely fine after a reboot but then slowly go bad over the next day or so until it was pretty much unusable. I normally allocated 2 VCPUs to the VM. The problem would be less severe if I only allocated 1 VCPU but it would still be quite bad. Nothing else seemed to help. I could not find anything in any logs on either the guest or host.

Finally, on a hunch, I juggled our VMs around (we're a bit low on disk space) and moved the Windows 2012 to the HP. It's been working perfectly for a week. The reason that I don't think the Cisco is faulty is that the four Linux VMs we had on the HP are now working perfectly on the Cisco.

I only other change I made in addition to moving hosts was, for convenience in moving, to change the Windows C: drive from a Linux LVM to a qcow2 file. I guess it could have been that instead of the move. Disk performance is not an issue to us.

3
  • Not all workloads do well with hyperthreading. Aug 7, 2014 at 21:51
  • I've been having that exact same issue. Ubuntu running Server 2012 VMs on KVM. They already used qcow2 for storage. Symptoms are exactly the same. Aug 19, 2014 at 13:55
  • That's interesting. It's been working perfectly for me since I moved it to the HP. I suspect it has something to do with the number of processors and hyperthreading combination on the host. Good luck.
    – tetranz
    Aug 20, 2014 at 14:48
0

I had the same problem on one of my KVM servers, Ubuntu 14.04. I had 2 identical dell poweredge severs and on 1 of the machines I had this problem. This turned out to be caused by a BIOS setting where "Logical Processor" was enabled. Disabling this feature solved the slow performing Windows 2012 issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .