Calculating Hypervisor Memory Overhead

Edit: Some links no longer work.

Originally posted December 15, 2015 on AIXchange

A customer recently contacted IBM Support, wondering how much memory the hypervisor could be expected to consume in their real world environment. Even given how inexpensive memory has become and how convenient it is to add and modify partitions as needed, customers can benefit by planning for their expected workloads as well as their hypervisor and VIO server memory overhead.

Of course this is hardly a new topic. About a decade ago, the LPAR validation tool helped customers obtain this sort of information. This interesting article from 2004 mentions hypervisor memory overhead:

Aside from the memory configured for a partition, additional memory is used for the Hypervisor, translation control entries (TCE) memory and page tables. The Hypervisor is firmware on the pSeries LPAR-capable systems, which helps ensure that partitions only use their authorized resources. When a pSeries system is running with partitions, 256 MB of memory is used by the Hypervisor for the entire system. There’s additional overhead memory called TCE, which is used for direct memory access (DMA) for I/O devices. For every four I/O drawers on a pSeries system, 256 MB of memory is allocated for TCE memory. The TCE memory isn’t additional overhead specific to partitions. Even AIX systems without partitions use TCE memory, but it’s included in the AIX system memory. Page tables are used to map physical memory pages to virtual memory pages. Like the TCE tables, page tables aren’t a unique overhead for LPARs. In other AIX non-partitioned systems, this overhead memory is part of the memory that AIX allocates at boot. Each partition needs 1/64th of its memory size, rounded to a power of two, for page table space in memory. The amount of page table space that’s allocated is based on the maximum memory setting in the partition’s profile.

Now here’s a recent article on hypervisor page table entries:

When setting memory values, it’s important to remember that the size of the Hypervisor page table (HPT) entries that are used to keep track of the real memory to virtual memory mappings for the LPAR is calculated based on maximum, not desired, memory. This means that common sense needs to be applied to setting maximum memory for an LPAR or Hypervisor memory overhead will be much higher than necessary.

This is the response my customer received from IBM:

The exact algorithm to calculate the amount of memory reserved for PHYP is proprietary information and I cannot send that to you. The official method for calculating that is the “IBM System Planning Tool.” You should adjust the system plan with your information.

Let’s try to do that calculation for your current configuration first:

1. On the HMC select the server in question and from Tasks do Configuration -> System Plans -> Create
2. Once created from the left pane of your HMC select System Plans.
3. Select the created system plan and from tasks -> Export System Plan
4. On the new window select “Export to this computer from the HMC” radio buttion and click OK

Are you doing this calculation to get an idea of hypervisor overhead on your systems, or do you simply make sure the system has plenty of available memory and keep in mind that some percentage will be going to system overhead?