Lets Design, Implement and do Administration of ESX3

Virtualization with VMWare Infrastructure 3.0

Archive for the ‘Shares’ Category

HOW TO ENABLE DISK SHARES

Posted by Preetam on September 24, 2007

Before we do this, we need to understand why are we actually enabling disk shares. Since in ESX environment we have multiple VM’s accessing the same VMFS volume and in that in case, you need to prioritize any of the VM, it is recommend practice to enable disk shares for that VM.

How to enable disk shares to prioritize virtual machines

  1. Start a VI Client and connect to a Virtual Center Server.
  2. Select the virtual machine in the inventory panel and choose Edit Settings from the right‐button menu.
  3. Click the Resources tab, and click Disk.
  4. Right‐click the Shares column for the disk you want to modify, and select the required value from the drop‐down menu.

 

image

Advertisements

Posted in How to, Shares, VMWare | Leave a Comment »

Resource Mgmt Guide -01

Posted by Preetam on March 31, 2007

Resource Management Guide points filtered out. It is must to read resource management guide for VCP. Below are the points I feel are important & gives quick glimpse of Resource mgmt in VI3

 

The amount of physical memory VMs can used is less than what is present on physical host because Virtualization layer uses some part of it.

 e.g. Physical Host with 3.2 GHz with dual core and 2 GB RAM, will make 6 GHz and 1.5GB RAM to VMs 

Reservation [GHz/MB]:

By default no reservation is specified on CPU and Memory on VMs, however it is good idea to specify reservation for Memory/CPU for VMs, so that resource is always available for VMs.

  • Use reservation to specify minimum amount of cpu/memory, host assigns additional resources as available based on the limits and number of shares. Don’t set reservation too high because it will restrict VM to that resource pool only.
  • Reservations are used by running virtual machines and resource pools with reservations.
  • Reserved and unreserved CPU and Memory change only if the virtual machine is powered on.

 

E.g. Consider VM with 2GHz reservation, but it is not using this reservation. This reservation cannot be used for reservation for other VMs however this 2GHz can be used by other VMs so the idle CPU resource is not wasted.

 E.g. VM-A and VM-B have 1GHz of CPU reservation, if VM-A is using 500 MHz of CPU, then VM-B can use 1.5 GHz of CPU to use idle resources. 

The ESX server will allocate number of MB reserved for VM directly, anything beyond the reservation is allocated using the host’s physical resources or when physical resources aren’t available, handled using techniques like balloning or swapping.

 

Limit [CPU/MB]:

By default no limit is specified on CPU/MB, in this case whatever memory/cpu you assign to Virtual Machine becomes its limit.

Shares:

Each VM is entitled to resources in proportion to its specified shares, bounded by reservations and limits. Shares are typical specified as high, normal and low. They are in the ratio of 4:2:1. If you expect frequent change in the resources, then use shares than reservations to allocate resources fairly across VMs.

 E.g.

  • High — 2000 shares per virtual machines, 20 shares per MB of VM memory
  • Normal — 1000 shares per virtual machines, 10 shares per MB of VM memory
  • Low — 500 shares per virtual machines, 5 shares per MB of VM memory 

In short high means twice as much as normal, normal means twice as much as low. You can also specify custom shares

e.g. VM with 2 Virtual CPU & 1 GB RAM, with shares set to normal for CPU/RAM, then2×1000=2000Ghz shares of CPU and 1024×10=10240 MB memory shares.  

By default all VMs associated with single ESX host received

q       Equal share of CPU per Virtual CPU. E.g. If VM-A has one 1 CPU and VM-B has two CPU, then VM-A will receive half of CPU of VM-B

q       Equal MB of per share of virtual memory size.

 

When you power on VMs, system checks amount of CPU/Memory unreserved available, depending upon reservation set on VMs, it compares and checks if this VM can be powered on, this process is called Admission Control.

 VMKERNEL MEMORY MANAGES ALL MACHINE MEMORY, EXCEPT SERVICE CONSOLE MEMORY.


Posted in Advance Concepts, Limits, Reservations, Resources, Shares, VMWare | Leave a Comment »

Shares,Reservation,Limits -CPU/Memory Resource settings

Posted by Preetam on February 27, 2007

Before we talk about Resource Pool we need to know what are resources in VMware terminology. Resources are

  • CPU’s
  • Memory
  • Disk (Manages which proportional share mechanisim)
  • Network (are controlled by using Network-traffic shaping)

Resources are provided by ESX host and they are consumed by VM’s. if ESX host are clustered, then Cluster is actual resource provider.

Every VM will be allocated Memory and CPU resources, there are 3 settings in resource pool which influence as to what memory and CPU any VM would get.

RESERVATION:Reservation specified for the resource pool or VM, if the reservation is set to Zero (which is by default), it means no reservation is set. VM will not start if its reservation is not met or guaranteed. When reservations are not utilized ESX host can assign them to other VM’s. Lets take example

You have VM’s A and B. A & B is configured for 1GHZ reservation. Now during some days A only goes as far a 0.5 GHz, under such case B can use 1.5 GHz. But if B is using 1.5GHz and A is poweroff, Once A is powerON B has to give away 0.5 GHz

LIMIT:Specified limit for the VM, default is unlimited. Server can allocate more memory/CPU than reservation but it cannot assign more than it’s limit. Applying limit will vary depending upon the circumstances or your design requirement.

It is recommended to apply limit, when you wish to manage few VM’s and you know Max Memory/CPU utilization of these VM’s applications. Because one you apply limit, even if the resource on one system is under utilize and other machine is going to require more CPU/Memory sometime, it won’t be able to get that idle resource and there are chance paging would start happening.

SHARES: Number of shares determine which VM will get resources when there is competition for resources among VM’s.Specifying shares makes sense only with regard to sibling virtual machines or resource pools, that is, virtual machines or resource pools with the same parent in the resource pool hierarchy.

The amount of resources represented by each share changes when a new virtual machine is powered on. This affects all virtual machines. Shares are typically specified as high, normal, or low. High, normal, and low specify share values with a 4:2:1 ratio.

For example:Two virtual machines run on a host with 8GHz. Both are set to Normal and get 4GHz each.A third virtual machine is powered on. It is set to High, which means it should have twice as many shares as the machines set to Normal. The new virtual machine receives 4GHz and the two other machines get only 2GHz each.

Share values default to:

  • High — 2000 shares per virtual CPU, 20 shares per MB of virtual machine memory
  • Normal — 1000 shares per virtual CPU, 10 shares per MB of virtual machine memory
  • Low — 500 shares per virtual CPU, 5 shares per MB of virtual machine memory

By going by above defination, if we’ve VM with 2 CPU’s and 1 GB RAM and shares is defined as High, so this VM is going to get

  • 2000 Shares x 2 CPU’s =Shares of CPU Power
  • 20 Shares x 1024MB=Shares of Memory

Mind you, this is just shares and they will be useful in cases where VM is competing either for CPU or Memory resources.

Resource pool is used to distribute CPU’s and Memory across VM. resource pools can have child resource pool or VM or Both.Resource pool or VM which are at the same level of heirarchy, it is called sibling. Picture below gives very good information about the relation.

You can actually create resources pool as per the department’s requirement and can guarantee that particular resource pool will provide required processing power when the condition demands.

You don’t need to configure resources to each VM, in fact you apply common settings across group of VM using resource poo. In above figure RP-Marketing is a resource pool, all resources defined in it, will be automatically applied to VM’s under it, with configuring such setting for each VM.

In order to really leverage the power of resource pools, Group hosts into cluster. When you create cluster, resource are managed at the cluster level rather host level. In short resources on each host are combined into one. This one resource is total resource which can be allocated to all VM’s under that cluster. Figure below explains it briefly.

Posted in Limits, Reservations, Resource Pools, Resources, Shares, VMWare | 3 Comments »