Hi
I have inherited the vSphere cluster below and I'm seeing Memory swapping which I would like to resolve.
Type of cluster = HA and DRS enabled
Number of hosts = 5 x ESXi 4.1 hosts with 96GB Memory assigned to each host.
Number of VMs = 120
The VMs are a mix of Linux and Windows with configurations ranging from 1 vCPU to 4 vCPUs and Memory configurations ranging from 1GB to 16GB. No reservations or limits are set on individual VMs.
HA Admission Control policy is set to a Percentage of cluster resources configured at 20%.
From esxtop I have noted the MEM overcommit avg:
ESXHost1 = 0.00, 0.00, 0.00
ESXHost2 = 0.00, 0.00, 0.00
ESXHost3 = 0.29, 0.29, 0.29
ESXHost4 = 0.20, 0.20, 0.20
ESXHost5 = 0.40, 0.40, 0.40
I.e. ESXHost3 is overcommitted by 29%, ESXHost4 by 20% and ESXHost5 by 40%.
Three resource pools are configured:
01-High = High shares
02-Normal = Normal shares
03-Low = Low shares
No reservations or limits are set on any of these resource pools.
Ballooning and Swapping shows the following.
Cluster ResourcePool SwappedMemory BalloonedMemory
------- ------------ ------------- ---------------
Cluster01 01-High 1205 2228
Cluster01 02-Normal 5353 15303
Cluster01 03-Low 11024 24861
From my research it looks like I have two options to resolve the swapping problem:
- Right size the VMs, i.e. use a monitoring tool to identify VM's with high memory allocation but low active memory usage and reduce the memory configuration.
- Add more physical memory to the ESXi hosts.
Both of these options are feasible in our environment although I am guessing that management will go for option 2.
I have been wondering if anyone might have alternative suggestions as to how I can resolve the swapping issues right now. Reconfigure the resource pools perhaps? If so what configuration would you go for?
I am also keen to understand why Active Memory on each host is low yet we see swapping. The list below gives the average Active Memory over a one week period.
ESXHost1 = 20GB
ESXHost2 = 10GB
ESXHost3 = 13GB
ESXHost4 = 11GB
ESXHost5 = 10GB
The Memory usage as pulled from PowerCLI (RVTools actually) shows:
Host # Memory Memory usage %
ESXHost1 98,292.00 81.00
ESXHost2 98,292.00 90.00
ESXHost3 98,292.00 79.00
ESXHost4 98,292.00 77.00
ESXHost5 98,292.00 78.00
Is the swapping caused by the ESXi host using the Memory usage figure above rather than the Active memory figure and determining that the host is under memory pressure which is leading to swapping? Obviously the 20% HA reserve and resource pool demands need to be taken into account too.
I hope someone can shed some light on these questions for me!
Thanks very much
Sean