3

Running Ubuntu 13.04 Host and vm Guest. Using virtio for hdd, nic. Max-allocaion CPU cores is 6, minimum is 2. here is a screenshot for clarification: https://i.sstatic.net/kMVFN.png

Ive made a vm with virt-manager just to play with, and to test out kvm. Alright, I have a decent understand how the memory balloon driver works, but I still dont know how to test if the guest OS can utilize the max setting for cpu cores. From what i gather, the host will start one thread of qemu for each core allocated per vm.

When i run htop inside the guest, it only shows two cores. (also here is the output of cat /proc/cpuinfo: https://gist.github.com/anonymous/93a361545130923537da )

How can I "force" the guest to allocate the other 4 cores so that it can show 6 cores in htop? Is there a way to do this?

2 Answers 2

5

There is no max-min allocation, you allocate a specific number and that's it. The "min-max" you see is what is allocatable, if you don't pick a number, you will get the minimum, which is "2" in this case. If you want to allocate 6 cores to the VM, you need to explicitly do that

3
  • so, please note the following screenshot: http://i.imgur.com/GmYQBMP.png what do the numbers 2,6 and 32 represent?
    – Ace
    Commented Oct 18, 2013 at 0:16
  • 1
    iirc this is just a preparation for a later-on addition of dynamic CPU plugging, not really in use, unless something changed recently. Your best bet is to actually visit the libvirt IRC channel on #OFTC and ask there
    – dyasny
    Commented Oct 18, 2013 at 1:39
  • i will do that, thanks. and i had no idea that the "key term" here was cpu hotplugging. this has lead to a more concise answer for me, and this: linux-kvm.org/page/CPUHotPlug
    – Ace
    Commented Oct 18, 2013 at 1:58
0

just run some threaded process with some load; the fastest way is to use a shell-based fork-bomb, but this will kill your machine.

You must log in to answer this question.

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