Steve21 Posted November 17, 2015 Posted November 17, 2015 Morning Guys, So just wondering how close the relation between the HOST CPU usage and the VM CPUs is linked. I understand that the vCPUs are each allocated a slot based upon how many there are etc, but what I'm not sure on is considering our HOSTS barely touch 10% CPU does this mean I can assign each VM more vCPUs without any issues? Or can the underlying ticks etc still cause a problem if too many are assigned even if it's barely stretching the HOSTS CPU? (If you need any other information, it's currently 2 HOSTS with 24 logical processors each. (2x 12 core)) If that makes sense Many thanks, Steve
JoHimself Posted November 17, 2015 Posted November 17, 2015 The key factor for CPU usage in a VMware virtualised environment is CPU ready time. If you have, say, a 4 CPU host and you assign 8 vCPUs to VMs on that host then the VMs will need to wait in a queue to send its instruction to the pCPU. The amount of time that the VM waits for the pCPU to be available is called "Ready" time. I have seen environments with 40% pCPU usage but high wait times mean that the VMs are slow due to massive overcommit of resource. A common cause of this is usually incorrect calculation of the hyperthreading penalty when allocating vCPUs. There is an equivalent in Hyper-V ( https://www.sqlskills.com/blogs/jonathan/hyper-v-equivalent-to-vmware-cpu-ready-time/ ) so have a look into that, and heres some more reading: https://www.sqlskills.com/blogs/jonathan/cpu-ready-time-in-vmware-and-how-to-interpret-its-real-meaning/ TL;DR: No, the 10% pCPU statistic does not, on its own, indicate that the host is under low load. vCPU allocation varies a lot based on workload and all aspects of CPU performance should be considered. 1
PotNoodleTech Posted November 17, 2015 Posted November 17, 2015 Realistically it depends on what VMS you're running. If you've only got a few domain controllers/file/print servers then you're never going to use more than 10% of 24 cores. If you're running multiple SQL servers and Remote Desktop / Desktop virtualisation etc then I would expect you're CPU usage to be much higher. No need to dish out more and more VCPU just for the sake of it. IF you've got a VM that is constantly over 50% CPU then yes by all means. 1
Steve21 Posted November 17, 2015 Author Posted November 17, 2015 The key factor for CPU usage in a VMware virtualised environment is CPU ready time. If you have, say, a 4 CPU host and you assign 8 vCPUs to VMs on that host then the VMs will need to wait in a queue to send its instruction to the pCPU. The amount of time that the VM waits for the pCPU to be available is called "Ready" time. I have seen environments with 40% pCPU usage but high wait times mean that the VMs are slow due to massive overcommit of resource. A common cause of this is usually incorrect calculation of the hyperthreading penalty when allocating vCPUs. There is an equivalent in Hyper-V ( https://www.sqlskills.com/blogs/jonathan/hyper-v-equivalent-to-vmware-cpu-ready-time/ ) so have a look into that, and heres some more reading: https://www.sqlskills.com/blogs/jonathan/cpu-ready-time-in-vmware-and-how-to-interpret-its-real-meaning/ TL;DR: No, the 10% pCPU statistic does not, on its own, indicate that the host is under low load. vCPU allocation varies a lot based on workload and all aspects of CPU performance should be considered. Aye wondered if that might be the case, better not load them up then haha Realistically it depends on what VMS you're running. If you've only got a few domain controllers/file/print servers then you're never going to use more than 10% of 24 cores. If you're running multiple SQL servers and Remote Desktop / Desktop virtualisation etc then I would expect you're CPU usage to be much higher. No need to dish out more and more VCPU just for the sake of it. IF you've got a VM that is constantly over 50% CPU then yes by all means. It's a bit hit and miss I guess, I mean generically things run low, but then lets say once staff go home our RDS hits CPU limit all the time, or helpdesk when it's scanning etc. Just thought about assigning a few "spare" ones to them so if it hits it then it'll give a bit more wiggle room, just don't want to overload them and have no benefit haha Thanks, Steve
PotNoodleTech Posted November 17, 2015 Posted November 17, 2015 How many cores do you have allocated to you're RDS server? 1
Steve21 Posted November 17, 2015 Author Posted November 17, 2015 1-2 normally for most the servers (40VMs so didn't want to go crazy on them), think only ones that were originally increased are SIMs and a few main ones like staff File server etc Steve
JoHimself Posted November 17, 2015 Posted November 17, 2015 Aye wondered if that might be the case, better not load them up then haha I didn't say that Look at the relevant CPU performance counters. 1
PotNoodleTech Posted November 17, 2015 Posted November 17, 2015 I can see that you'd want more than 2 cores on RDS servers, I was using 4-8 per server when I ran RDS. 1
JoHimself Posted November 17, 2015 Posted November 17, 2015 I can see that you'd want more than 2 cores on RDS servers, I was using 4-8 per server when I ran RDS. Only if there is an issue with performance. Why give any server more than it needs?
PotNoodleTech Posted November 17, 2015 Posted November 17, 2015 Yes I said that earlier, I wouldn't be running with more than 5 users per server if only using 1-2vcpu per RDP server so I would expect at least 4vcpu to be needed here - as who has an RDP server just for 5 users? 1
JoHimself Posted November 17, 2015 Posted November 17, 2015 I'd stick 20 users on there if they were only running Notepad. My approach would vary based on how mighty the underlying pCPU was. 1
Steve21 Posted November 18, 2015 Author Posted November 18, 2015 See generically through the day it's our main few servers that are working (SIMs, MGMT, Printing, Signage, Staff File etc) Think I'm gonna bump them a bit, and RDS as you mentioned as its only used outside of school time so obviously the rest go down Steve
PotNoodleTech Posted November 18, 2015 Posted November 18, 2015 I'd be adding more VCPu if you're at over 50% average. 1
Steve21 Posted November 18, 2015 Author Posted November 18, 2015 Aye will do Just need to do it one evening to turn them off! Silly system haha Thanks, Steve
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now