VMware Cloud Community
IrNico
Contributor
Contributor

The best way to guarantee CPU and memory

Realtime applications where end user experience is important should get guaranted CPU en memory. What is the best way to guarantee certain VMs in en cluster a certain amount of memory and CPU?

Reply
0 Kudos
8 Replies
ascari
Expert
Expert

Configure resource pool, use reservation for cpu and mem, and finally use shares for concurrency resource request. (cpu and mem)

Bye Alberto

Reply
0 Kudos
TomHowarth
Leadership
Leadership

As alberto says configure a Resourse pool and set CPU and Memory revserations, remember that if there are not enough resources to cover the reservations then the Guest will not start

Tom Howarth

VMware Communities User Moderator

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
Reply
0 Kudos
L0k3_m0r
Enthusiast
Enthusiast

I do not see another output unless doing resource pools

Reply
0 Kudos
Ken_Cline
Champion
Champion

Hmmm...everyone else is saying create a resource pool (RP) and set a Reservation there. Well, that may work - but all you're really doing is setting a guarantee of CPU/RAM availability for the aggregation of VMs that live within the resource pool. You ARE NOT setting a guarantee on an individual VM. If the VMs in the RP are requesting more resources than the Reservation of the RP, then you may have contention.

I would suggest that you set the reservation on the specific VM that you want to guarantee availability for - a much more direct approach than going with a resource pool. You may want to create a RP, too - it will allow you to group your "real time" VMs together for easier management. BTW - if these are truly realtime systems, they are probably not good candidates for running in a VM. If they are simply systems that you want to be responsive to an interactive user, that's OK...but something that needs to respond to an interrupt in a guaranteed amount of time - better keep it physical.

Take a look at my VMworld 2007 presentation: Service Level Management with Resource Pools, Reservations, and Limits

Ken Cline

Technical Director, Virtualization

Wells Landers

VMware Communities User Moderator

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
Reply
0 Kudos
IrNico
Contributor
Contributor

Thanks Ken,

You wrote to set the reservation on e specific VM. Is this the way for not sharing certain resources (CPU& Memory)? For certain OLTP systems I want certain CPU en Memory capacity of a server not to be shared with other VMs. Is this possible with ESX 3.5?

Reply
0 Kudos
Ken_Cline
Champion
Champion

You wrote to set the reservation on e specific VM. Is this the way for not sharing certain resources (CPU& Memory)? For certain OLTP systems I want certain CPU en Memory capacity of a server not to be shared with other VMs. Is this possible with ESX 3.5?

The only way to ensure that the resources of a specific server are reserved EXCLUSIVELY for a single VM is to run only one VM on that server. That kind of defeats one of the primary reasons for virtualizing (consolidation / sharing of resources). If you want to ensure that a VM has access to the resources it needs, what I would do is to set the Reservation for the high priority VM to a value equal to the ((Number of vCPUs) * (Clock speed of one pCore)). For example, if you have a two vCPU VM running on a 2GHz system, you could set the Reservation to (2 * 2,048MHz) = (4,096MHz). This would guarantee that the VM would have access to the full clock speed of the host CPU - if it needed it. Same philosophy applies to RAM Reservation.

This will have an impact on the rest of the VMs on your host - as well as the number of VMs you can run in your HA clusters.

Ken Cline

Technical Director, Virtualization

Wells Landers

VMware Communities User Moderator

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
Reply
0 Kudos
IrNico
Contributor
Contributor

When a VM has a reservation of memory and CPU and is the VM is idle for some time, the reserved CPU and memory capacity will be loaned to other VMs I suppose?

How long (approximately) will it take before the VM gets it reserved capacity (CPUs and memeory) back and will, in case of an OLTP application an end user experience substantial delay?

Reply
0 Kudos
Ken_Cline
Champion
Champion

Unused reserved capacity is available to other VMs to satisfy requirements between their Reservation and Limit. If a VM has a reservation and that capacity has been "loaned" to another VM, the VM with the Reservation will preempt the borrowing VM and have access to its Reservation immediately. This is covered in more detail in the presentation Service Level Management with Resource Pools, Reservations, and Limits - please take an hour and listen to the presentation.

Ken Cline

Technical Director, Virtualization

Wells Landers

VMware Communities User Moderator

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
Reply
0 Kudos