0

I am pretty new to Ubuntu, and want to change from my Windows enviroment, to a Linux Distro. Since most (consumer) Linux software is designed for Ubuntu, I chose this distribution. Everything works fine, but one of teh most important features, Virtual Machines, are experiencing some critical problems.

When I run a VM under high load, this does not get distributed evenly across all cores. I tried altering the CPU/core settings in the VM settings, and different hypervisors:

  • KVM
  • VM-Ware
  • VirtualBox

If I run a CPU stress test in Ubuntu, all cores run fine and synchronised. If I run a stress test in a VM, some cores get a 100% load, and other cores are at 10%. The loaded cores, and the amount of loaded cores change. So, one time, core1 and 3 have a 100% load, the other time only core4 has 100% load.

Under "software update" > "Additional drivers", the Intel Microcode device shows as "unknown". It seems to me that this plays part in the problem.

I am really stuck on how to troubleshoot or fix this, so any input is appreciated.

EDIT: I tested some more with VMware:

  • When I configure two cores, i get an vcpu error after a few minutes
  • When I configure only one core, only one core on the virtual host gets used When I configure four cores, all cores are used. However,
  • When I start a second VM with four cores configured, I get real
    strange, uneven and unstable core loads.

EDIT: So I updated my BIOS, reinstalled Ubuntu, no change. Updated my microcode from ftp.us.debian.org/debian/pool/non-free/i/intel-microcode, no change. Disabled hypertreading, no change. When I start two VM's, the cores slowly go out of sync, and after a while, core1 is at 100% and core2 at 20%.

EDIT: So, I tried it with the new Linux kernel of Ubuntu 16.10, no difference stock. Went in deeper by disabling the intel_pstate driver and changing the tlp config file, but all without success. It's not even the question of getting this to work, I just want to know how. Damn it Linux.

6
  • What CPU are you running? You are running microcode 0x80, which seems pretty recent (latest is 0x84 for Skylake CPUs, not sure about yours).
    – negusp
    Sep 26, 2016 at 12:44
  • I am currently running a Core i7 6500U, with HyperTreading enabled (2 cores, 4 threads). The result of cat/proc/cpuinfo is: paste.ubuntu.com/23233431
    – akkie3000
    Sep 26, 2016 at 12:49
  • 1
    Well, since you're running a dual core with HT, it may be that the VM is prioritizing primary core threads over the HT threads. It also may be that linux has terrible Skylake support. Even more, it seems that your microcode version is out of date. The latest version is 0x84. A BIOS update may help, as well.
    – negusp
    Sep 26, 2016 at 12:57
  • So I updated my BIOS, reinstalled Ubuntu, no change. Updated my microcode from ftp.us.debian.org/debian/pool/non-free/i/intel-microcode, no change. Disabled hypertreading, no change. When I start two VM's, the cores slowly go out of sync, and after a while, core1 is at 100% and core2 at 20%.
    – akkie3000
    Sep 26, 2016 at 18:02
  • Ok, try disabling Intel CPU C-states from here: stackoverflow.com/questions/22482252/…. This is really a last ditch option, as your power consumption will seriously increase. How vital is it to have full CPU power with your VM?
    – negusp
    Sep 26, 2016 at 19:02

2 Answers 2

0

In Virtualbox, you can designate how many processor cores to use. It's default is one. Setting it to two makes the VM work much better. It's generally not good for host performance to set it higher.

To solve the microcode message, in Synaptic, click the RELOAD icon, then the SEARCH icon, enter intel-microcode, mark the only result for installation, then click the APPLY icon. Quit Synaptic. Reboot the computer.

To see if it's really working, in terminal, type dmesg|grep microcode.

Cheers, Al

10
  • Hi Al, I already tried changing the amount of CPU's and cores in the hypervisor. It doesn't really seem to make a difference. I searched in Synaptic for intel-microde, and I found 4 items, of which two relevant ones are installed. Reinstalled those, still no difference. If I use two cores in VM-Ware, I get this error code after a few minutes: VMware Workstation unrecoverable error: (vcpu-0) Unexpected signal: 11. A log file is available in "/media/john/Local data-NTFS/VMware/Windows 10 x64/vmware.log". You can request support. One core works, and four. But two cores doesn.
    – akkie3000
    Sep 26, 2016 at 12:24
  • It should have only found one intel-microcode. Please post a screenshot of Synaptic showing the four. Use paste.ubuntu.com if you need to for the screenshot, just post the URL here. Did you try the dmesg command that I gave you? Cheers, Al
    – heynnema
    Sep 26, 2016 at 12:26
  • The result of dmesg|grep microcode is: [ 0.904837] microcode: CPU0 sig=0x406e3, pf=0x80, revision=0x7c [ 0.904852] microcode: CPU1 sig=0x406e3, pf=0x80, revision=0x7c [ 0.904895] microcode: CPU2 sig=0x406e3, pf=0x80, revision=0x7c [ 0.904915] microcode: CPU3 sig=0x406e3, pf=0x80, revision=0x7c [ 0.905016] microcode: Microcode Update Driver: v2.01 <[email protected]>, Peter Oruba
    – akkie3000
    Sep 26, 2016 at 12:29
  • This is the screenshot of Synaptic: drive.google.com/open?id=0Bx2DqnFTZ6SIVi11SzVDTXhlM1E
    – akkie3000
    Sep 26, 2016 at 12:39
  • The screenshot looks correct. There's only 1 intel-microcode. The dmesg looks correct. It doesn't seem to need a processor update. Microcode Update Driver is running. Can you select it in "Additional Drivers" now? Cheers, Al
    – heynnema
    Sep 26, 2016 at 12:56
0

You need intel-microcode version 3.20160714.1. Microcodes 0x7c and 0x84 are broken crap (maybe not on every specific Skylake processor model, but we don't get enough data from Intel to know). I.e. you want microcode revision 0x9d/0x9e or higher.

Anyway, microcode 0x9d or newer might well help with the vmware crash if you are lucky. If you are not, at least it will avoid further trouble.

Even with up-to-date microcode, your processor might decide to allocate more thermal room to one core, or your BIOS might be telling it to do that.

Ensure your BIOS/UEFI is set to "full/max performance", and that it doesn't have anything that attempts to maximize single-core performance enabled (also try "balanced mode" just in case). If that isn't enough, you could install a version of the linux-tools-common package and try to use x86_energy_perf_policy to kick the processor into performance mode.

Unfortunately, I don't know which Linux utility lets you query the processor to know whether it is throttling itself due to TDP or power limits.

3
  • I installed the microcode, but unfortunately without result. It is not the thermaal room that is limiting the core. When I start two VM's under high load (installation), everything goed well, However, after a whilen, the cores start getting out of sync (even with two cores). So I think the CPU scheduler is messing things up. When I look at the CPU chart, I see some massive peaks and valleys in the use, and if I wait some more, core1 will be at 10% load, and core2 at 100%. The switch position after a while, so then core2 will be at 105 load, and core1 at 100%.
    – akkie3000
    Sep 27, 2016 at 14:22
  • That looks like the power-aware scheduler. Disable that crap. A google search should tell you how (I don't know from the top of my head)...
    – anonymous
    Sep 28, 2016 at 0:38
  • So, I tried it with the new Linux kernel of Ubuntu 16.10, no difference stock. Went in deeper by disabling the intel_pstate driver and changing the tlp config file, but all without success...
    – akkie3000
    Oct 4, 2016 at 19:16

You must log in to answer this question.

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