Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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: http://i.imgur.com/GmYQBMP.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?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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

share|improve this answer
    
so, please note the following screenshot: http://i.imgur.com/GmYQBMP.png what do the numbers 2,6 and 32 represent? –  Ace Oct 18 '13 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 Oct 18 '13 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 Oct 18 '13 at 1:58

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.