Jump to content

Hypervisor (type 1 vs 2)

Hi all,

Just a quick question about hypervisors:

I know that if you use a type 2 hypervisor you need some resources for the host OS so you cannot assign all of your hardware to VM's.

But if I were to install a type 1 hypervisor like ESXi can I use all of the available CPU cores and RAM for VM's or will the hyervisor use some of it?

Link to comment
Share on other sites

Link to post
Share on other sites

A type 1 hypervisor still needs some resources to function as an operating system, just fewer compared to a "normal" os

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Sauron said:

A type 1 hypervisor still needs some resources to function as an operating system, just fewer compared to a "normal" os

But lets says you want to do a "two gamers, one cpu" build, can you install ESXi and assign 50% of the cores to VM1 and the other 50% to VM2?

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Olaf6541 said:

But lets says you want to do a "two gamers, one cpu" build, can you install ESXi and assign 50% of the cores to VM1 and the other 50% to VM2?

It's not strictly necessary to "leave out" cores for the host os or even for the VMs themselves in any circumstance, the host will schedule things in a way that prevents starvation. You might get better performance by dedicating separate cores to separate vms though.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, Sauron said:

It's not strictly necessary to "leave out" cores for the host os or even for the VMs themselves in any circumstance, the host will schedule things in a way that prevents starvation. You might get better performance by dedicating separate cores to separate vms though.

So you do not have assign a specific amount of hardware to a vm? I know freenas (and unraid i believe) ask for a specific number of cores and ram to be dedicated to a vm when creating one.

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, Olaf6541 said:

So you do not have assign a specific amount of hardware to a vm? I know freenas (and unraid i believe) ask for a specific number of cores and ram to be dedicated to a vm when creating one.

Those are just configurations they officially support but unraid just uses KVM which by default has no such restrictions. I have assigned all the cores of a machine to a VM before and didn't have any problems.

 

You do however need to segment the RAM as that can't be shared for obvious reasons. I was specifically talking about cores. And yes, even a type 1 hypervisor needs some dedicated ram.

 

Is there a specific reason you're asking about this? There are configurations that make more or less sense depending on what you need.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

34 minutes ago, Sauron said:

Those are just configurations they officially support but unraid just uses KVM which by default has no such restrictions. I have assigned all the cores of a machine to a VM before and didn't have any problems.

 

You do however need to segment the RAM as that can't be shared for obvious reasons. I was specifically talking about cores. And yes, even a type 1 hypervisor needs some dedicated ram.

 

Is there a specific reason you're asking about this? There are configurations that make more or less sense depending on what you need.

I was wondering if you could split a 3900x into two effective 3600x's by dividing the cores and I was wondering how that would be divided between the vms and the hypervisor, ram would be less of an issue.

So you say that there is not really a fixed amount of cores and the hypervisor just divides it equally?

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Olaf6541 said:

I was wondering if you could split a 3900x into two effective 3600x's by dividing the cores

But why?

1 hour ago, Olaf6541 said:

I was wondering how that would be divided between the vms and the hypervisor, ram would be less of an issue.

You should be able to just assign 6 cores to each vm.

1 hour ago, Olaf6541 said:

So you say that there is not really a fixed amount of cores and the hypervisor just divides it equally?

No, I'm saying that even if you assign (in total) more cores than are actually available then the cores will simply be shared and the host will make sure that both vms get equal processing time on those cores - which does mean you'll get less performance within the VMs than the number of cores would suggest but if only one VM is doing heavy tasks it will perform better than it would if you only assigned 6 cores. Again it depends on the workload, some benefit from this kind of configuration and some don't.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, Olaf6541 said:

I was wondering if you could split a 3900x into two effective 3600x's by dividing the cores and I was wondering how that would be divided between the vms and the hypervisor, ram would be less of an issue.

So you say that there is not really a fixed amount of cores and the hypervisor just divides it equally?

If you mean you want to assign 16 threads to each VM, then yes you can do this. 

That is called overcommitting. You can assign 16 threads to each, and each will show 16 threads, however under full load you'll find lower performance on each as they're sharing the cores and having to wait. Depends on what you're doing if there's a benefit in this. 

ESXi can give you stats such as CPU Ready % which is the % of resource you're *wasting* on average. If the CPU Ready Time is too high and you arent doing infrequently heavy tasks, then you want to consider dropping the vCPU allocation to free up some resource. 

You don't really need to reserve CPU threads for ESXi unless you have insanely intensive VM's running that can cause it to become unresponsive when required. 

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO + 4 Additional Venturi 120mm Fans | 14 x 20TB Seagate Exos X22 20TB | 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Link to comment
Share on other sites

Link to post
Share on other sites

19 hours ago, Sauron said:

But why?

You should be able to just assign 6 cores to each vm.

No, I'm saying that even if you assign (in total) more cores than are actually available then the cores will simply be shared and the host will make sure that both vms get equal processing time on those cores - which does mean you'll get less performance within the VMs than the number of cores would suggest but if only one VM is doing heavy tasks it will perform better than it would if you only assigned 6 cores. Again it depends on the workload, some benefit from this kind of configuration and some don't.

 

8 hours ago, Jarsky said:

If you mean you want to assign 16 threads to each VM, then yes you can do this. 

That is called overcommitting. You can assign 16 threads to each, and each will show 16 threads, however under full load you'll find lower performance on each as they're sharing the cores and having to wait. Depends on what you're doing if there's a benefit in this. 

ESXi can give you stats such as CPU Ready % which is the % of resource you're *wasting* on average. If the CPU Ready Time is too high and you arent doing infrequently heavy tasks, then you want to consider dropping the vCPU allocation to free up some resource. 

You don't really need to reserve CPU threads for ESXi unless you have insanely intensive VM's running that can cause it to become unresponsive when required. 

Okay so by assigning all cores (and threads) to both vms you can benefit from more than 50% cpu power when the other vm is running idle? 

 

I'm just wondering if it would a viable idea to use one set of hardware for two mid-end gaming setups. I'm not actually planning on doing this in the near future but I'm scoping out the possibilities.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Olaf6541 said:

Okay so by assigning all cores (and threads) to both vms you can benefit from more than 50% cpu power when the other vm is running idle?

Yes.

1 hour ago, Olaf6541 said:

I'm just wondering if it would a viable idea to use one set of hardware for two mid-end gaming setups.

No. It can be done but it's just not a good idea.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×