AIX > Administrator > LPAR

LPAR Memory Configuration


At first glance, an article on the partition profile memory settings for Power Systems LPARs may not seem to be worthy of an article, but as you read on, you’ll see that one of these settings can have a big impact on the use of system memory.

Partition Profile Memory Settings

When you’re creating a partition profile for an LPAR, you’ll come across the memory configuration tab. The basic memory configuration settings required for all LPARs include:

  • Minimum memory – The smallest amount of the memory acceptable for the LPAR to boot with –and the low point to which memory can be dynamically removed from the LPAR
  • Desired memory – The amount of memory that the LPAR will boot with and have available for use under normal operating conditions
  • Maximum memory – The high point for the working memory size that can be achieved through dynamic LPAR memory adds

Additionally, Active Memory Sharing (AMS) and Active Memory Expansion (AME) settings are available. AMS provides a shared memory pool for use by multiple LAPRs. AME is essentially memory compression that can be enabled for each LPAR on an individual basis.

Hardware Page Table

When an LPAR is activated using the Hardware Management Console, the hypervisor allocates physical memory to the LPAR using the Desired Memory setting. The memory is presented as a contiguous memory space, which begins with address zero. This process is repeated for each LPAR that’s activated. When allocating memory, the hypervisor needs to work with two constraints: (1) There is only one address zero for the entire server, and (2) memory is allocated to LPARs from memory blocks scattered throughout the physical memory in the server. These are resolved through the use of a pointer table that links the LPAR’s view of memory and the actual location of the physical memory assigned to it. This is called the Hardware Page Table (HPT). For servers with 32GB or more physical memory, the memory blocks have a default size of 256MB. Figure 1 shows two LPARs, each with 6GB of desired memory along with their associated HPTs.

HPT Size

The LPAR’s HPT is created when you activate the LPAR. Like the hypervisor, the HPT consumes real memory, which reduces the amount of memory that can be assigned to LPARs. Note that the memory used by the HPT doesn’t come from the LPAR’s memory allocation. The size of the HPT is based on the maximum memory (MaxMem) setting in the LPAR’s partition profile. The amount of memory required for the HPT increases as the MaxMem setting is increased. Therefore, it’s important not to set the MaxMem setting too high. The HPT size is also dependent on the POWER processor type. For POWER5/5+, POWER6 and POWER7 processors, the default HPT size is 1/64 of the MaxMem setting. For AIX and Linux on POWER7+, the HPT is sized at 1/128th of the MaxMem setting. The HPT size for IBM i and/or AMS-based LPARs on POWER7+ is 1/64 of MaxMem. Here are a few examples:

  • POWER6 MaxMem 8GB; HPT 128MB
  • POWER6 MaxMem 64GB; HPT 1024MB (1GB)
  • POWER7+ MaxMem 8GB; HPT 64MB
  • POWER7+ MaxMem 64GB; HPT 512MB

You can see that the HPT memory consumption can get to be quite large. For example, let’s say that you have a POWER7+ server with 128GB of memory and you’re planning to run 20 small LPARs. If you set MaxMem for an LPAR to the full 128GB, its HPT would be 1GB in size. If you set MaxMem to 128GB for each of the 20 LPARs, you would be using 20GB of your server’s memory just for the HPTs. Another item to note is that the hypervisor allocates memory for the HPT based on powers of two. This means that actual HPT memory usage will be along the lines of 32MB, 64MB, 128MB, 256MB, etc. Table 1 provides a list of MaxMem setting along with the associated HPT size. The power of two that’s used will be that which is on the larger side of the calculated HPT size from the previous discussion. Here are some examples:

  • POWER7+ MaxMem 6GB; calculated HPT 48MB; actual HPT 64MB
  • POWER7+ MaxMem 30GB; calculated HPT 240MB; actual HPT 256MB

Since the hypervisor is going to create the HPT based on a power of two, you should set your MaxMem so that the calculated HPT size aligns with the actual HPT size. This provides improved options for you to conduct a DLPAR memory increase. Recommended changes to the examples:

  • POWER7+ MaxMem 6GB 8GB; calculated HPT 64MB; actual HPT 64MB
  • POWER7+ MaxMem 30GB 32GB; calculated HPT 256MB; actual HPT 256MB

MaxMem and AME

One additional topic to address is the relationship between MaxMem and AME. The perceived memory made available to an LPAR via AME can be larger than the MaxMem setting. We’ll work with the following LPAR partition profile settings:

  • Desired Memory = 6GB (real memory allocated to the LAPR)
  • Maximum Memory = 8GB
  • AME Expansion Factor = 1.5

With these settings, AME will show 6GB x 1.5 = 9GB of memory available to the LPAR. We can see that this is larger than the MaxMem setting of 8GB, which is fine. MaxMem simply defines the upper limit for physical memory that can be dynamically added to the LPAR. AME then works to expand the physical memory available to the LPAR. If an additional 2GB of memory is dynamically added to the LPAR, the LPAR will now have a physical memory allocation of 8GB. When the AMS expansion factor is applied, the LPAR may have as much as 8GB x 1.5 = 12GB of memory to work with.

Guidelines for MaxMem

Based on the information provided in this article, you’ll want to follow these guidelines:

  • Don’t set MaxMem equal to total amount of server memory for each LPAR. This will waste memory with oversized HPTs.
  • Size MaxMem approximately 25 percent larger than Desired Memory for production LPARs that might require a DLPAR memory addition. For less important LPARs, which could be shutdown for a desired memory increase, set the MaxMem as close as possible to the Desired Memory.
  • Always set the MaxMem to a power of two to maximize DLPAR growth options.

The maximum memory setting for each LPAR should be carefully planned. You’ll need to balance between the need for future, dynamic memory increases and use of physical memory.

Charlie Cler supports customers in a solutions-architect role at Forsythe Technology Inc. He can be reached at ccler@forsythe.com.



Like what you just read? To receive technical tips and articles directly in your inbox twice per month, sign up for the EXTRA e-newsletter here.


comments powered by Disqus

Advertisement

Advertisement

2019 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
IBMi News Sign Up Today! Past News Letters