Resource Control
-
2 mai 2012 05:08
I have the following HW
2 physical CPUs (E5620)
Each CPU is a quad core
-> total of 8 cores
-> host shows 16 processorsI have two virtual machines. To each VM I assign the max allowed 4 logical processors. However, that limits each VM to max 25% of the total system resources. Since the host does not have much to do the other 50% (100% - 2x 25%) are largely wasted. Is there a way to allocate more of the total system resource to each VM? Maybe turning off Hyper Threading in the BIOS but would that affect performance otherwise?
Toate mesajele
-
2 mai 2012 06:08
Hi!
Please note that I'm not a Microsoft representative.
There is a never ending debate going on whether hyperthreading is a good or a bad thing in Hyper-V. Disabling hyperthreading would leave you with half the amount of execution threads available, but on your system I don't think it should have any significant effect on your VM's.
As you may or may not know, you don't assign specific cores to a virtual machine. The workload being processed by 4 CPU's in a VM is spread across all physical cores and is managed by Hyper-V totally.
There is a "tweak" where you can assign more than 4 CPU's to a VM, by editing the XML configuration file and manually setting a higher number, but this is very unsupported and it's not recommended.
Microsoft has increased the amount of CPU's you can set in the new version of Hyper-V in the upcoming Windows Server 2012 (formerly known as Windows Server "8").
-
2 mai 2012 07:22Moderator
Hi,
Before you perform the further research, it is recommended that you have a read of the following blog.
Hyper-V Concepts - vCPU
http://social.technet.microsoft.com/wiki/contents/articles/hyper-v-concepts-vcpu.aspx
-
2 mai 2012 15:56
Mike and Vincent, thanks for the response. I did read the Q&A. While it helps sheding some light on vCPUs, etc it does not quite address my issue. In my case I have 8 cores which the host OS sees as 16 processors due to HT. Hyper-V sees those 16 processors but I can only assign a max of 4 to each VM for a total of 8. That is only 50% of the resources available.
From the article it is my understanding all these 8 vCPUs will be cycled through these 16 host 'processors'. However, the timeslots allocated are still just using up a max of 50% of my total resources available. So the cycling does not help with my issue. I don't want to go the unsupported way of increasing the vCPUs per VM to 8 (not sure if SBS08 would even support it anyways).
Judging by all this, it seems with my current setup I can use max 50% of the physically available CPU resources. The only way to fix it seems by turning off HT. That can reduce performance due to slower context switching. But at the end I am probably still better of, am I not?
-
2 mai 2012 16:14
Yes, 4 vCPU's is unfortunately the current limit, but I've personally experienced that its quite enough, or in some cases more than enough, for most servers.
Virtualization is after all not a new concept, but it got serious attention not that long ago, when it was mass deployed into production environments all over the world all of a sudden. I believe that the "proceed with caution" attitude that was encouraged at that time should not be forgotten, although newly installed servers are most likely virtual according to corporate standard procedure.
If you have a server or application with a high demand on physical resources, then it might not be a suitable candidate for virtualization.
Also, unless you're experiencing degraded performance of your VM, the fact that your physical CPU's aren't choked (which is very common) leaves a lot of CPU capacity for cramming in additional VM's, which basically is the general idea with virtualization today.
- Editat de Mike_Andrews 2 mai 2012 16:19
- Editat de Mike_Andrews 2 mai 2012 17:47
-
2 mai 2012 18:54
I turned of HT which now allows me to allocate up to 50% of the total resources to each VM. Trying to check this out I ran into something rather strange (I don't think it's related to the HT being off). One of my VM is using up 100% of the CPU time (left on the image below). With the allocation I did I would expect the host (center) to show 50% CPU time. However, task manager only shows 1%. Looking at the "CPU Usage" under the hyper-v manager I see it going up to 48%. So why does taskmgr show 1%??
-
2 mai 2012 19:52
You can read Brian Ehlerts explanation to why you get those values at host level and why you can dismiss them as unreliable, in this thread here:
Now, that thread did not cover or discuss the possibility that there might be an application inside the VM itself causing the guest to max out its CPU time at 100%.
It would be interesting to know what kind of server you're running in that VM and if the 4*vCPU's are peaking 100% constantly at all times (so it appears according to usage history). If they are then there might be an issue with the service or the VM, or it's simply not suitable to run inside a virtual machine.
-
3 mai 2012 04:46
Mike, the link you sent is exactly what I experience. I see the answer is to use the Performance Monitor which I found in the Server Manager under Diagnostics->Reliability and Performance. The Resource Overview shows almost identical results to TaskManager, though. Actually, the same screen can be pulled up through Task Manager by clicking on "Resource Monitor" on the Performance Tab. The answer to the post says "making sure that you are looking in the 'right' place." I guess my problem is that I am not looking in the right place...
As for the 100%, a module from Microsoft CRM (Email router) eats up all the CPU time. I thought I fixed it but it returned again.
Btw, according to the calculation mentioned in an earlier link I could use up to 8 cores * 8 = 64vCPUs -> 16 VMs each with 4 vCPUs. If I run windows on each VM and allocate 4GB of memory for each I would need 64GB of memory, not to mention HD space and activity. Are people actually running that many VMs and not run into performance issues?<o:p></o:p>
-
3 mai 2012 07:59
Well, the amount of cores * 8 is a rule of thumb more than anything when planning vCPU consumption. You are not in any way limited to that equation, but it's a practical guideline. In my personal experience, 4 vCPU's are more than enough for most virtual servers. Many of them do just as well with only 2, and in specific cases when running Windows Server 2003 as virtual machines, up to 2 assigned vCPU's is supported by Microsoft, although it's possible to assign 4. There have been reported issues with instability on some systems due to this, where it's recommende to the decrease the amount of vCPU's to the supported level. Like I said, it all depends on what you're virtualizing.
CPU is very rarely the bottleneck. As you mentioned disk performance due to high I/O is a common issue for many people. In larger installations with multi-node Hyper-V clusters, you should consider purchasing high quality SAN equipment.
On a stand-alone Hyper-V server (or any Hyper-V server) the best practice recommendation is to use locally attached disks. Either internal or by using Fibre Channel or iScsi to present the disks locally to the host. Also place the VM's vhd files on their own disk sets instead of sharing disks with the host OS, and configuring an appropriate RAID level for performance and redundancy.
Yes, people actually run that many VM's on a single host, but remember that way down underneath it all there is an actual computer and it's technical specifications and limits will affect the virtual machines it's hosting.
- Marcat ca răspuns de hfaun 3 mai 2012 14:52
-
3 mai 2012 14:59Mike, thanks for all the responses. In summary, I did turn off HT and I understand both Task Manager and Resource Overview section in Performance Monitor cannot be trusted to judge the real load on the host CPUs. I am actually now contemplating to combine the host server 2008 and the VM server 2008 \w SQL. That way I only need resources for 2 systems (host & SQL \w server 2008, 1 VM \w SBS 2008) instead of 3 and SQL runs directly on HW rather than through a VM. I just need to figure out if SBS 2008 Prem actually supports such a licensing model (because the host will also be part of the domain). Anyways, thanks.