fars
Contributor
Contributor

How to have VM consume any unused resources?

Hi

I was wondering what the best way is to go about using up the hosts free CPU resources.  Is possible to set a guest VM on ESXi 5.1 to consume any available free MHz but with a minimum priority, so if any other guest VM needed CPU the they would would have priority and not be affected?  My aim is to use the spare CPU for Boinc (grid computing projects like climate modelling) but I can't have it affect any real but sporadic workloads that are also on the host.

I can see the shares settings and resource types/reservation/limits settings but am unsure how to achieve my aim by using them.

Thanks

Tags (3)
0 Kudos
5 Replies
MannyS
Enthusiast
Enthusiast

I can kind of see where you are coming from, but why would you want a VM to consume extra resources? You'd want the cluster to have free resources available for HA, besides if you did reserve more for the VM, admission control wouldnt let you power on the VM. I'd leave the free resources available to whatever that may need them.

|| VCAP5 - DCA, VCP 5 and a slew of Microsoft certs. || If you find this answer useful, please consider awarding points by marking the answer correct or helpful. Thank you.
0 Kudos
wealvescabral
Enthusiast
Enthusiast

Hi,

You can setup CPU reservation on the virtual machine settings.

This reservation is ammount of CPU resources (Mhz) that is guarantee for the virtual machine. You can use this feature to break the CPU resources in small parts across the targets virtual machines.

If you have a enviroment running VMware Cluster and DRS you can also create a Resource Pool and put all VM on it.

You can check this:

http://www.yellow-bricks.com/2010/03/03/cpumem-reservation-behaviour/

http://www.vmware.com/support/pubs/resource_management/vi_pubs_res_mgmt.html

Wellington Cabral | Mark it as helpful or correct if my suggestion is useful.
Dave_Mishchenko
Immortal
Immortal

Are you looking at a single host or a cluster.  A limit or reservation would impact either production or Boinc VM, but you could look at using shares for this.  Shares are only used when resources are being stained.  You'd have to play around with it a bit,  but if you had two production VMs for example and one for Boinc,  you could give the production VMs 1000 CPU shares and the Boinc VM 200 shares.  I over simplify the shares calculation, but in the case of all VMs trying to max out CPU resources, the Boinc VM would be limited to just under 10% of the host's resources.

fars
Contributor
Contributor

Hi and thanks - I've had a play around with both resource and share settings and possibly I'm achieving my aim.

It's only a single ESXi host - nothing complex here.  But maybe it is just my interpretation of the performance charts that is getting me confused?

I've gone for the simplest setup which is just the one VM (performing boinc/grid computing) and watching to see it use 100% of the host CPU cycles.

The CPU performance chart says the ESXi host is using 100% of it's MHz, but the CPU listings are all at about 52% - so I've been thinking I had got it running properly.  Is this ~50% CPU usage because ESXi knows half of the CPU's are just hyperthreads and if each hyprethread was summed with it's real core (I know that's simplifying it) - then it is actually using 100%?

Thanks

0 Kudos
fars
Contributor
Contributor

Yeh sorry everyone that's embarrassing, I can see it is using 100% from the summary page so it must be splitting the CPU graph out between threads not cores, so all good it's working - thanks for the help, its much appreciated.

0 Kudos