processor threads - Ubuntu 14.04 LTS Guest

Discussions related to using VirtualBox on Windows hosts.
Post Reply
allanb64
Posts: 2
Joined: 30. Nov 2015, 22:01

processor threads - Ubuntu 14.04 LTS Guest

Post by allanb64 »

I have a 6700K with
4 cores
and
8 threads/logical processors

Each thread is seen as a logical processor by the windows 10 64 bit host. Virtualbox shows that I can assign 8 total "cpu's" I am given a warning if I assign more than 4 logical processors (from the host perspective). I have read in the documentation that I should not assign more "cpu's" than I have physical cores if i go against that rule of thumb I get the warning. It may also be helpful to know that i have vt-x turned on.

I have 2 questions:
1. Is there a way to statically asign specific threads to the Virtual?
2. If I choose to configure virtual box to use 4 cpu's how do I know what threads/logical processors the virtual box will use from the host? For example, if I configure Virtualbox to use 4 cores will threads 1,2, 3, 4 be used or will it be threads 1,3,5,7? see diagram below.
3. Also, once a thread is chosen at boot will it ever change while the host is up running?

Consider this layout

CPU core 1
Thread 1 & 2

CPU core 2
Thread 3 & 4

CPU core 3
Thread 5 & 6

CPU core 4
Thread 7 & 8
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: processor threads - Ubuntu 14.04 LTS Guest

Post by BillG »

No, there is no way to do that, and that is probably a good thing. Trying to outsmart the CPU scheduling of the host OS rarely turns out well.

The only case where it might work would be if every vm did exactly the same thing all of the time.
Bill
allanb64
Posts: 2
Joined: 30. Nov 2015, 22:01

Re: processor threads - Ubuntu 14.04 LTS Guest

Post by allanb64 »

What about processor affinity? Is that possible at all? I would hope that either my windows host or virtual box would use one thread per core but I am guessing there is just no control over something like that and the host and or virtual box will assign which ever threads it seems fit to use at the time.

One last question.

If I give 4 logical processors to my Linux guest and stress the guest my overall processor usage goes to about 50% Its easy to see why resource monitor says this its because 4 logical processors are at 100% but consider the following for a moment. One thread is at 100% usage does this mean one core is also at 100% usage? This is more of a processor question but, can a single thread use 100% of a processor core? Or will it only use 50% of that core? Perhaps that question is best suited for an Intel forum though but if you know :-) id like to know the answer.
Post Reply