Question: I have an Intel Core i7 3930K with 6 CPU cores. Now, I understand that every of that cores can handle 2 separate threads. That makes 12 virtual cores - which I can see using my system monitor (see screenshot below).

But when I create a virtual machine using the VirtualBox software from Oracle, I suddenly can allocate *24 CPUs* to that machine. How so?

[![enter image description here](https://i.stack.imgur.com/EJCLW.png)](https://i.stack.imgur.com/EJCLW.png)

So, what does that mean? Are there actually 24 cores - or is VirtualBox wrong?

And what happens if I allocate for example 4 cores - how many are really added to the virtual machine?

Answer: 
If you allocate 4 cores you get 4 cores in the VM. However almost all the time you're better off just allocating 1 because you add a lot of overhead every time you add another core.

You can have a maximum of 5 cores in your case, if you go over that into the red area your virtual machine will become unstable.

Virtual box reccomends the maximum number of cores you use should be n-1 of your physical cores. Hyper-Threading does not count.

[This thread on the virtual box forums supports this.](https://forums.virtualbox.org/viewtopic.php?f=6&t=35256)
In my case, using 6 out of 8 CPUs in a 4 core 8 thread processor was faster in tests than 4 out of 8, despite VirtualBox cautioning that I may get degradation.  

So I think that VirtualBox prevents one from shooting oneself in the foot if one is a newbie and will complain about slowness, while as a superuser you may dismiss this caution.

Long answer:
============

I have [Intel-Core-i7-2820QM](https://ark.intel.com/products/52227/Intel-Core-i7-2820QM-Processor-8M-Cache-up-to-3_40-GHz) with 4 cores and 8 threads. I have Virtual Box 5.2.6 with Windows 10 host and guest.

**Setting 6 `CPU`s** out 8 in Virtual Box Guest settings gives next values in [userbenchmark](http://www.userbenchmark.com/UserRun/6954363):

```

Multi core

MC Int 307
MC Float 326
MC Mixed 315
47% 316 Pts

Quad core

QC Int 270
QC Float 272
QC Mixed 268
61% 270 Pts

```

CPU-Z:

[![enter image description here](https://i.stack.imgur.com/M2N3d.png)](https://i.stack.imgur.com/M2N3d.png)

**Setting 4 `CPU`s:**

[Userbenchmark](http://www.userbenchmark.com/UserRun/6954468)

```

Multi core

MC Int 260
MC Float 269
MC Mixed 269
40% 266 Pts

Quad core

QC Int 260
QC Float 264
QC Mixed 262
59% 262 Pts

```

CPU-Z:

[![1108 4.21 6](https://i.stack.imgur.com/veNQg.png)](https://i.stack.imgur.com/veNQg.png)

**Notes:**

No thermal throttling (which happens when 100 degree Celsius) happened during test runs:

[![997 3.37 4](https://i.stack.imgur.com/R8bwE.png)](https://i.stack.imgur.com/R8bwE.png)