Jump to content
RESET Forums (homeservershow.com)
itGeeks

Hyper-V allocating Cores?

Recommended Posts

itGeeks

Another newbie question. If my CPU only has four cores can I safely allocate all four cores to a VM? If I do that will the host still have cores to run?

Share this post


Link to post
Share on other sites
rotor

Yes, it will. If you max the VM CPU out, you will notice the host slowing down, but it will still be perfectly usable. Also bear in mind the difference between actual cores and hyper-threaded cores.

Share this post


Link to post
Share on other sites
itGeeks

Yes, it will. If you max the VM CPU out, you will notice the host slowing down, but it will still be perfectly usable. Also bear in mind the difference between actual cores and hyper-threaded cores.

Thanks for the info. So it is OK to allocate 4 of 4 cores to the VM providing I only have one VM? It probably not advisable though rite?

Share this post


Link to post
Share on other sites
rotor

Thanks for the info. So it is OK to allocate 4 of 4 cores to the VM providing I only have one VM? It probably not advisable though rite?

It would be completely fine. The HyperVisor manages the VM (or VMs) so that the CPU is shared fairly, including the needs of the physical host itself. To be clear, a HyperVisor workload implies that you are not trying to do any actual work on the physical host itself, so obviously the physical host only gets the minimal CPU resources it needs (enough, but no more) if the VMs are demanding a lot of CPU.

 

The idea behind virtualisation is to get as close to 100% resource utilisation as possible, and you wouldn't be able to achieve that if the HyperVisor itself was a resource hog. Now... in the production world you wouldn't load up a server any more than about 70%, and if you care about high availability, then you would have multiple hypervisors in a cluster, so you can always lose at least one physical host and still run all the VMs comfortably.

Share this post


Link to post
Share on other sites
psykix

Although I use VMware, I have often wondered a similar thing.

 

I have 2 VM's. I have a E3-1265LV2 which is 4 cores, 8 HT. I allocated 6 cores to one VM, and 2 cores to the other. Not sure if I should have just added 4 cores to each, or 8 cores to each.

 

I was beginning to come to the conclusion that it is Mhz that are allocated, out of all the CPU power available. I was looking for a book on ESXi 6 so I could do some reading.

Share this post


Link to post
Share on other sites
itGeeks

Although I use VMware, I have often wondered a similar thing.

 

I have 2 VM's. I have a E3-1265LV2 which is 4 cores, 8 HT. I allocated 6 cores to one VM, and 2 cores to the other. Not sure if I should have just added 4 cores to each, or 8 cores to each.

 

I was beginning to come to the conclusion that it is Mhz that are allocated, out of all the CPU power available. I was looking for a book on ESXi 6 so I could do some reading.

I agree this stuff is a bit confusing at first. Now you got me thinking is is cores or threads that we are allocating to the VM? When setting up a VM in Hyper-V it allows you to set the cores or at least that's how its labeled and the default is 1 so if my way of thinking is correct then your settings make no sense to me, After all how could you allocate 6 cores to 1 VM and 2 cores to the other is you only have 4 cores to begin with? I hope someone can clear this up for both of us. :unsure:

Share this post


Link to post
Share on other sites
itGeeks

It would be completely fine. The HyperVisor manages the VM (or VMs) so that the CPU is shared fairly, including the needs of the physical host itself. To be clear, a HyperVisor workload implies that you are not trying to do any actual work on the physical host itself, so obviously the physical host only gets the minimal CPU resources it needs (enough, but no more) if the VMs are demanding a lot of CPU.

 

The idea behind virtualisation is to get as close to 100% resource utilisation as possible, and you wouldn't be able to achieve that if the HyperVisor itself was a resource hog. Now... in the production world you wouldn't load up a server any more than about 70%, and if you care about high availability, then you would have multiple hypervisors in a cluster, so you can always lose at least one physical host and still run all the VMs comfortably.

Thanks for the great explanation, Its getting a bit more clear. So it seems to me that I have under allocated the VM then based on what your saying as I have only allocated 2 cores of the 4 cores to the VM because that would only be utilizing 50% resource utilization? Keeping in mind I only have 1 VM running at a time on this Windows 10 Hyper-V. Please confirm. I further want to add I do run applications on the same Windows 10 box with this VM, Does that change what your saying any? Another words if I use all 4 cores for the VM would that leave 0 cores for the applications to run under Windows 10? One such application I run on this box is Plex, I also run my IP cameras NVR software. Sorry for all the questions as I am just trying to understand all this.

Edited by itGeeks

Share this post


Link to post
Share on other sites
jmwills

Give the clients the availability of all the cores the host has to offer as others have mentioned. The host is that, a host, so you will not see much degradation at all.

Share this post


Link to post
Share on other sites
itGeeks

Give the clients the availability of all the cores the host has to offer as others have mentioned. The host is that, a host, so you will not see much degradation at all.

Thank you very much for the info. I will give it a try and see what happens.

Share this post


Link to post
Share on other sites
psykix

And what about memory? Does the same principle apply?


Give the clients the availability of all the cores the host has to offer as others have mentioned. The host is that, a host, so you will not see much degradation at all.

 

If you have 4 cores, 8 with HT do you allocate 4 cores or 8?

Share this post


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



×
×
  • Create New...