Saturday, November 22, 2014

memory - ESXI only 4.7GB RAM available for VMs from 8GB of RAM. why so little?


I have an ESXI 6.0 with 8GB Ram. For some reason I can only use 4.7GB for VMs. I tried using esxtop but didnt see anything using lots of RAM. Below are screenshots from vsphere. Can anyone help me to understand where is Memory going? As you can see below there is total 8104 MB RAM available to ESXI but somehow I only have 4.7GB ram to use for VMs. When I turn off all VMs, esxi is using 1.4GB which is OK, but I still have only 4.7GB to use for VMs. Where is rest of RAM going and how can I get more RAM to be used by VMs?


Summary


Physical Memory


Available Memory


Consumed Memory


Answer



From VMware KB article
The ESXi Summary tab and Resource Allocation tab do not show the same values for memory and CPU



The ESXi or Cluster Resource Allocation tab displays three values:



  • Total Capacity – Amount of resource that is guaranteed to be available to the resource pool (ESXi host).

  • Reserved Capacity – Total amount of resources that have been used for the reservation requirements of all descendants of the resource
    pool. This includes both child resource pools and virtual machines.

  • Available Capacity – Total amount or resources available for reservation of a child virtual machine.


The values in the Resource Allocation tab are the resources, with the
system resource pools already subtracted.



Your values are :


Total Capacity: 4708 MB = amount guaranteed to always be available
Reserved Capacity: 2698 MB = amount used now
Available Capacity: 2010 MB = amount still available

The VMware vSphere 6.0 Documentation says in the section
Create a Resource Pool :



Reservation


Specify a guaranteed CPU or memory allocation for this resource pool.
Defaults to 0.


A nonzero reservation is subtracted from the unreserved resources of
the parent (host or resource pool). The resources are considered
reserved, regardless of whether virtual machines are associated with
the resource pool.


Expandable Reservation


When the check box is selected (default), expandable reservations are
considered during admission control.


If you power on a virtual machine in this resource pool, and the
combined reservations of the virtual machines are larger than the
reservation of the resource pool, the resource pool can use resources
from its parent or ancestors.



It is important to note that resource pools are created by default as expandable
on need.


The article Managed Object - ResourcePool describes the root resource pool, which takes up the entire computer and is the ancestor of any other pool:



A resource pool is configured with a set of CPU (in MHz) and memory
(in MB) resources. These resources are specified in absolute terms
with a resource reservation and a resource limit, along with a shares
setting. The shares are used during resource contention, to ensure
graceful degradation.


For the root resource pool, the values of the reservation and the
limit are set by the system and are not configurable. The reservation
and limit are set to the same value, indicating the total amount of
resources the system has available to run virtual machines. This is
computed as the aggregated CPU and memory resources provided by the
set of current available hosts in the parent compute resource minus
the overhead of the virtualization layer.



The 5.1 manual for Listing and Registering Virtual Machines says this :



The default datacenter is ha-datacenter and the default resource
pool is Resources.



According to your first screenshot, Resources is defined as having
the CPU capacity of 2 x 2.194 GHZ and the memory capacity of 8103.84 MB.
ESXi is therefore aware of your configuration and has taken up the entire memory.


Although you have not created any resource pool, a default resource pool
was created for you with the Reserved value of 4708 MB, which is the amount
that is subtracted immediately from the host memory.


Since in your case you haven't exceeded the minimum of 4708 MB,
ESXi did not do any additional allocation from the root pool.
This will be done when needed.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...