VMware Cloud Community
fredzb2003
Contributor
Contributor
Jump to solution

question on resource expansion

I have a general question regarding CPU resource allocation and expansion. If I set CPU number to 2, is it possible to allow CPU to break this constraint at runtime? In fact my application server needs more CPU resource than set in peak time and I wish it can be achieved using whatever method VMware provides. Thanks!

0 Kudos
1 Solution

Accepted Solutions
amvmware
Expert
Expert
Jump to solution

If you mean can you assign more vCPU's to a VM and take it away dynamically, based on resource demand then the answer is no. You can add vCPU's to a running VM - assuming the OS supports hot-swap.

View solution in original post

0 Kudos
6 Replies
amvmware
Expert
Expert
Jump to solution

If you mean can you assign more vCPU's to a VM and take it away dynamically, based on resource demand then the answer is no. You can add vCPU's to a running VM - assuming the OS supports hot-swap.

0 Kudos
AndreTheGiant
Immortal
Immortal
Jump to solution

On supported OS there is also the hot-remove function for CPU:

http://communities.vmware.com/thread/284758

But it's manually. Maybe you can automate with PowerCLI...

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
fredzb2003
Contributor
Contributor
Jump to solution

thanks for your information! Can you provide more info on VMware support for hot-swap on WIndows platform?

0 Kudos
amvmware
Expert
Expert
Jump to solution

Check out the following web site - it is covered very well here. For hot add CPU you need windows 2008 datacenter edition

http://gestaltit.com/all/tech/virtualization/simon/vmware-hot-add-memorycpu-support/

VMmatty
Virtuoso
Virtuoso
Jump to solution

To be fair here, the issue I've found with hot adding CPU or memory is that while Windows will properly detect the resources most often the application will not. In my testing if I am running a CPU intensive workload and hot add a second vCPU, the applicaiton continues to use CPU0 without trying to leverage CPU1. Depending on the application you may need to restart the services, close/open the application, or in most cases reboot before the application can start using the extra CPU.

My advice is to test this feature with the expected workload to see if it will even make a difference before you start looking into how you can automate adding the extra CPU. Also at this time there is no way to remove a CPU from a running VM, at least on any guest OS I've used.

Matt

My blog:

Matt | http://www.thelowercasew.com | @mattliebowitz
0 Kudos
fredzb2003
Contributor
Contributor
Jump to solution

Thank you all for the valuable posts!

Your answers make me clear on the resource allocation in terms of CPU and memory. Originally I think that CPU can be expanded on the fly but it seems not to work that way. CPU reallocation is supposed to occur between VMs with CPU and memory setting fixed in the context of resource pooling configuration.

0 Kudos