Memory allocation and distribution on the AHV Hypervisor

  • 17 October 2020
  • 0 replies
  • 43 views

Userlevel 1
Badge

Memory allocation and distribution on the AHV Hypervisor is always a tricky equation and not very easy or straight forward to calculate.  I decided to dig deep into this aspect, and the findings were quite intricate.

I ran the following command from the Acropolis Master and gathered information for Host 10.21.46.243:

$ links http:0:2030

 

Let us refer to the data obtained for this Host on this listing:

Host IP: 10.21.46.243

CPUs: 88

CPUs used: 37.58

CPU free: 50.42

Memory: 515822 MB say 512 GB

Memory used: 261104 MB say 261 GB

Memory Reserved: 0 MB

Memory free: 254718 MB say 255 GB

Please note that the output we obtain by running # cat /proc/meminfo on the Host hypervisor will show small numbers for MemFree and MemAvailable fields (less than 0.2%

of the Total RAM on the Host):

 

[root@NTNX-16SM76360147-A ~]# cat /proc/meminfo | head -3

MemTotal:       528210648 kB

MemFree:         1891960 kB

MemAvailable:    2619508 kB

[root@NTNX-16SM76360147-A ~]#

This is because Memory allocations are made in advance by the Hypervisor to provision VMs through what are referred to as Hugepages, and there is a field in the command

output display mentioning this number. Please be aware that of the 512 GB of RAM on the Host, only about 1 to 2 GB of RAM is reserved or taken up by the # ps -eaf processes listed that you would see on the AHV Linux OS.

Going back to our example we are referring to in Acropolis i.e. Host 10.21.46.243, the Total Memory of 512 GB is split as follows:

Memory used by VMs (including 32 GB by CVM which may not show up in the Acropolis tables) = 212 GB

$ links http:0:2030/sched -dump

  VMs on 10.21.46.243

+------------------------------------------------------------------------------------------+
| Name | UUID |State|CPUs|CPU |CPU |Memory|Destination|
| | | | |used|free| | |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEN34 |caa059f7-3d86-4bcd-b7fe-88819f305bf0| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDet04 |716050b6-817d-43cc-b5c5-5244b45fa2ad| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| KapellaSF |fd3f9ef9-b5cb-4fc3-aa3f-5726d988adb8| On | 2 |0.02|1.98| 4 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvCivil13 |d0dbb045-97f9-4e55-bb24-6773298bfba0| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDet01 |67105ade-a32f-4410-babe-a6126187741c| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| Altair27 |7348c35d-fc01-4a63-81fc-f48efc861bc2| On | 2 |0.01|1.99| 4 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDek10 |4f5c11c4-653c-45d5-bb5c-a9b5ceb02e63| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WMVOTLW02 |f00f6f6f-65ea-4c9c-8b39-0a490ad2b2dd| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEK80 |56a1e5bb-653a-47f0-9566-9d73c57c714c| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDet17 |5a906266-d1ad-4484-b85d-c28639f9db56| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWES27 |2bdfd126-a6f2-441b-9b0d-67462647c882| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEY31 |fb129c75-8926-43b9-90a1-779982b1931a| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDispN4 |671cde8f-f555-4a92-8697-602ed9e522cd| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWER45 |9645c0b9-8d6d-41ea-9b94-14721606bdc3| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWET10 |9dc45338-4ca6-403d-874e-3d92e31ed49f| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWES75 |4b996bf0-03b6-4957-8d1f-39ef869e3eea| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDispN7 |aa52edaa-c350-4eaf-a904-0284f489a5fc| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEQ40 |39b250be-33a4-44dd-9c0f-c132cde461a2| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDet13 |be0188de-cb80-44c1-bf50-e87a01ca17ef| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDispN6 |fe3b7177-b602-454c-9301-56801a90767a| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEP50 |38aeb025-6979-4bd1-adb5-0edde9c8ad92| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEW74 |924e2aac-f19f-451b-a1ac-11bfa40921e8| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWER26 |56712f21-adfc-42a2-b7f2-eba348e25f87| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEL30 |3de91f71-f053-4e01-a18d-e3836fe581ed| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WMVOTLW04 |5f3ab684-0952-44bb-aecf-261992ed0bd2| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEA79 |390c96ed-de43-4174-b90e-7fabddab511e| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvFire01 |a4720efe-609c-4d12-bbd2-ff7b5f6bd73e| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
|WMVAdminWEL05|1cbeef63-61bc-453b-a2b2-7a6807925d53| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWED48 |323adcd6-f296-4164-8c4b-8be0badc9e01| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWES43 |8565610e-03b7-4544-bd04-67547727c844| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEO38 |b5d6cb1c-1f10-46e5-9962-15bea9119c08| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEP52 |0293e426-be16-4c56-b18f-5bc354087bfb| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEE71 |febbb4a9-ed4a-4387-917a-0e2e665e5e5a| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEV35 |c1f4ab5f-3d55-4683-9482-d2bc02b457cd| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEC49 |6376bfad-906d-42a7-a9a7-ec2b95c38195| On | 2 |0.10|1.90| 6 GB | None |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEX24 |20cb3aff-8a1f-4b98-9b3f-cf38d51216a6| On | 2 |0.10|1.90| 6 GB | None |
+------------------------------------------------------------------------------------------+

Memory reserved for High Availability = 40 GB

Memory available = 255 GB

Memory taken by Hypervisor for its processes = 2 GB

Please note that the above numbers are not precisely accurate but close enough to the exact values.

Hope the above explanation explains the Memory allocations.

Digressing slightly from confining ourselves to a single Host, we often see a disparity amongst the Hosts for the "Memory free" field, ranging from a high as much as 100 GB to as low as 402 MB, this depends on the number of VMs that each Host is serving and on the sizes of the individual VMs on that specific Host that will dictate how much Memory is free on that Host. If you look at the Memory Reserved column, that makes up the resources for the High Availability, you will see more conformance or less variance in the amount of RAM contributed by each Host towards the HA pool.


0 replies

Be the first to reply!

Reply