I am working on a PowerCLI (Powershell with VMware extension) script
that I want to use to determine memory and vCPU over-commit - i.e., that
I have allocated too much vCPU or memory to a VM. I can figure out the
memory easily enough - I take the maximum of the last 30 days worth of 2
hour intervals of "mem.usage.stat" counter, and compare that to the
amount of memory allocated to the VM (MemoryMB). If MemoryMB / Max
MemUsed is more than 2.0, then I've allocated more than twice what the
memory needs of this VM are (based on the last 30 days usage), and I
should be able to drop down the allocated memory, still have enough of a
buffer for unusual needs for the VM, and save some cluster resources as
a reserve.
But how can I get a similar result for vCPU? For example, if I have a VM
with 4 vCPUs, is there any way to determine that I can get along just
fine with 2 vCPUs, based on max CPU usage for the last 30 days? What
counters do I look at, and how do they relate to the number of vCPUs
allocated? On the VMware forums, I've been advised like this:
Once you have collected your max CPU usage stat I would do the following.
CPUsageMax * ( CurrentCPUCount / NewCPUCount)
If output is < 85 reduce by 1 vCPU. Loop this to see if you need to
remove more then one vCPU. Same equation for adding vCPUs
For instance. You have 3 vCPUs at 50% utilisation.
50 * (3/2) = 75
In this case you can drop down to one vCPU.
Thoughts on this methodology? I know that there are commercial programs
to analyze your VMware cluster, and tell you these things, and even
adjust them, but we don't have the budget for Capacity IQ. So I'm trying
for a "some improvement is better than no improvement". Is there a
better way to estimate this? I have a few VMs with 4 vCPUs, and while
I'm sure I can knock a CPU off those VMs, I need some numbers to back me
up, and to show that removing one vCPU won't negatively impact that VM
too much ...
Thanks, and sorry for the OT.
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin