VIOS 101: Memory
In Part 1, we did an introduction to virtualization and then discussed CPU virtualization with PowerVM. In this article, we will delve into the options for memory in a virtualized environment.
Memory allocation is still fairly straightforward. It’s basically dedicated to an LPAR. As with CPU, you provide the system with three values—minimum which is what is required to boot, desired which is what the system attempts to boot and run with normally and maximum which is what you can grow to with a DLPAR (dynamic LPAR) operation.
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. As an example, if a server has 128 GB of memory and the LPAR has a desired of 4 GB then set maximum to something like 8 GB, not 128 GB. Hypervisor overhead for these HPT entries is normally calculated by dividing the maximum memory setting by 64 and rounding up to the nearest LMB (logical memory block) size. For POWER7+ and POWER8 the divisor is now 128, not 64, but it can still make a significant difference.
Using the previous example on a POWER7, if we set maximum memory to 128 GB then the hypervisor would reserve at least 2 GB of memory for page table entries for that one LPAR, even though it’s desired is only 4 GB. If maximum is set to 8 then 128 MB (or 256 MB depending on the LMB) is reserved. LMB is also referred to as MRS or memory region size. You can find the LMB size by going to the HMC and looking at the properties for the server—at the HMC, click on Systems management, Servers and then on the server itself. If you click on properties and then the memory tab, you will see your memory settings, which include two lines:
Memory region size: 0.25 GB (256 MB)
Active memory sharing support: Yes
According to the memory region size or LMB my server is set to 256 MB. It’s important to know this setting if you plan to use live partition mobility (LPM) as all servers in an LPM operation must have the same LMB size. To change this, you’ll need to power off the server after making the change, so it’s important to set it on all servers to a consistent value.
Four additional technologies affect memory—these are active memory sharing (AMS), active memory deduplication, active memory expansion (AME) and active memory mirroring. You can check on the HMC whether your server can support these technologies. Look at the server properties and click on capabilities. Check for each of the technologies you’re interested in utilizing.
Active Memory Sharing
As you can see in the two lines we’ve already pulled from this server, it also supports AMS. AMS is a PowerVM feature that provides pools of memory that can be shared by partitions. This allows for memory to be overcommitted in certain circumstances so that it’s not necessary to buy as much memory. Use of AMS requires a minimum of AIX v6.1 (or IBM i or Linux), POWER6 hardware and some specific firmware versions. It requires PowerVM Enterprise and that all resources in the LPAR be virtualized (you must be using a VIO server for network and disk I/O) and the LPAR must be in the shared processor pool (micro-partitioned).
AMS is designed for LPARs with variable memory requirements. The VIO server has a special set of AMS paging devices and it pages out memory from one LPAR when it’s needed by another LPAR, depending on which options were chosen during setup. AMS is not designed for workloads that have high sustained memory use or that mandate predictable high-quality performance. It is ideal right now for most test and development environments.
Chapter 9 in the PowerVM Introduction Redbooks publication includes all the information on planning for AMS including prerequisites and potential configurations. If you’re using AMS, you need to pay careful attention to the READMEs (you should anyway) whenever you upgrade your VIO servers. There are also some technologies that you may want to take advantage of that require AMS (like active memory deduplication) and others that won’t work with it.
AMS basically turns your VIO server into a paging device for the LPARs so you’ll need to ensure that your VIO server has sufficient high performance disk to accommodate those paging devices. Those paging devices should be put on fast disks that are redundantly configured. Additionally, the VIO server will require additional CPU entitlement to support AMS—the heavier the paging rate for the LPARs the more I/O operations there will be and therefore, the more CPU entitlement the VIO server will need. You can segregate out the impact by having a VIO server dedicated to AMS operations and use other VIO servers for network and I/O virtualization.
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