Friday, April 15, 2016

Working With Active Memory Expansion

Active Memory Expansion (AME) is a Power Systems feature that can improve the utilization of physical memory assigned to an LPAR. Operating systems running on AME enabled LPARs are unaware that AME is active. If you need to free up physical memory on a server, AME can be used to reduce the physical memory assigned to LPARs. If you have an LPAR that needs more memory, AME can make additional memory available without an increase to the LPAR’s physical memory assignment.

Introduction to AME

AME expands the physical memory assigned to an LPAR and makes the installed operating system “see” more memory than is actually assigned to it. For example, an LPAR might have a desired memory setting of 32 GB, but with AME enabled the operating system might “see” 40 GB. The hypervisor achieves this expansion by compressing least used memory pages. The increase in available memory is called the expansion factor. Continuing our example, the expansion factor is 1.25, which increases the 32 GB of physical memory allocation by 25 percent. This results in 40 GB of memory visible to the LPAR. On POWER7 servers, the compression/expansion is performed using general processor cycles. For POWER7+ and POWER8 servers, dedicated AME circuitry was added to the processor. This circuitry reduces general processor cycle consumption by 90 percent.

Preview the Benefits of AME

The AIX command amepat (AME Planning and Advisory Tool) can be used to estimate the AME benefit for a particular workload. It’s available on AIX 6.1 and higher and can be run on servers as old as POWER4. The amepat tool should be run during peak processing periods. If you conduct your AME modeling during non-peak periods, CPU contention might occur during peak workloads as AME might consume more CPU than originally planned. The output of the amepat command displays a table of data that lists various options for memory expansion with four main columns:
  • Expansion Factor provides a multiplier for how much additional memory the LPAR will see. For example, an expansion factor of 1.5 indicates that the LPAR will see 50 percent more memory than the modeled physical memory allocation.
  • Modeled True Memory Size is the amount of physical memory that would be allocated to the LPAR.
  • Modeled Memory Gain is the amount of additional memory above the physical memory that would be provided through the use of AME.
  • CPU Usage Estimate lists the estimated amount of CPU that would be consumed for the corresponding expansion factor.
As the expansion factor increases, so will the amount of required CPU to achieve this level of expansion. One of the flags for amepat lets you specify the target environment where you plan to use AME. This takes into consideration the significant reduction in CPU usage provided by the dedicated AME circuitry on the POWER7+ and POWER8 processors and can be helpful when consolidating older server workloads onto newer servers. An average compression ratio is also displayed. Larger ratios indicate good compressibility. You might also see an amepat output that shows 0.00 for the CPU Usage Estimate. This indicates that there’s an opportunity to reduce the amount of physical memory assigned to the LPAR without consuming any CPU. At some point, further reductions in physical memory would then begin to invoke some level of AME work and begin to consume some CPU cycles.

Enabling Your Server to Use AME

AME is available for POWER7/7+/8 servers running AIX 6.1 or higher. The server must be managed by an HMC. AME is ordered as a server hardware feature code, with the initial server order or as an upgrade. There is a single one-time-charge for AME per server. Once purchased, IBM provides an AME enablement license key. This license key is entered on the HMC. All of the LPARs running on an AME enabled server are eligible to use AME. The break-even point for the purchase of AME on POWER8 servers can be expressed in terms of physical memory purchase avoidance:
  • S822: 40 GB
  • S824: 40 GB
  • E850: 60 GB
  • E870: 41 GB
  • E880: 41 GB
For example, on an S824 server, if you can use AME to reduce physical memory consumption by at least 40 GB then AME might be a good fit.

Configuring an LPAR to Use AME

AME is enabled for an LPAR within the partition profile configuration menus. If your server has AME enabled, you’ll see AME configuration options at the bottom of the partition profile memory configuration tab. There’s a checkbox to enable AME. If checked, you’ll also need to provide an expansion factor in the range of 0 to 10. Note that choosing 0 would yield no expansion. For performance tuning, the expansion factor can be dynamically changed on a running LPAR using a dynamic LPAR (DLPAR) operation from the HMC. You might also choose to use DLPAR operations to change (add/remove) the amount of physical memory assigned to the LPAR.

Monitoring AME in Use

The amepat tool can also be used with an LPAR that has AME enabled. Data about the current amount of memory compression and CPU use for AME will be displayed. In addition, amepat will list several potential expansion factor values along with corresponding modeling data, similar to the information provided when amepat is run in a preview mode for LPARs not actively running AME. Last, amepat will provide recommended configuration changes to improve the overall performance of AME for the LPAR.

Take a Test Drive

If you’re planning to migrate LPARs running on older Power servers to new POWER7/POWER8 servers, it’s recommended that you run the amepat tool on your LPARs to see if AME would be effective for your workloads. For workloads already running on POWER7/POWER8 servers, running amepat can help you decide if implementing AME would be beneficial. Remember that AME can be used to expand the memory of an existing LPAR or to reclaim physical memory. If you have some LPARs that look like a good fit for AME, IBM offers a one-time, no-charge 60-day AME trial per server. This trial will allow you to conduct real AME test before committing to a purchase of AME. Find additional information in the IBM Knowledge Center.

No comments: