Active Memory Sharing can be configured with the same high level of availability and flexibility that you are used to from virtual SCSI or Shared Ethernet configurations. While the PowerVM virtualization layer is highly robust, there are still times when planned downtimes are required, for example, to keep your environment in a current and supported state. By using a dual Virtual I/O Server configuration, you can take down a Virtual I/O Server while your shared memory partitions stay online. By using Live Partition Mobility together with Active Memory Sharing, you have the full flexibility to move your shared memory partitions to another physical server. This is, for example, highly useful if you want to rebalance your workload or to make a physical server available for maintenance.
The first part of this article explains how to configure dual Virtual I/O Servers for Active Memory Sharing. The second part discusses using Live Partition Mobility together with Active Memory Sharing. A basic understanding of the Active Memory Sharing concepts is assumed. If you are new to Active Memory Sharing check out the links provided in Resources.
Active Memory Sharing with dual Virtual I/O Servers
First, you must have at least two Virtual I/O Servers running at a level that supports Active Memory Sharing on your managed system. If you have more than two Virtual I/O Servers you can only define two of them as paging VIOS partitions.
Disks that you want to use as common paging space devices must be whole physical disks located on the SAN. The physical disks must be assigned to both paging VIOS partitions. You cannot use local disks or disks that have been partitioned into logical volumes as common paging space devices. The reserve policy attribute of the disks must be set to no_reserve. Actually, when you configure a disk as a common paging space device the no_reserve attribute will automatically be set no.
When adding a paging space device to the shared memory pool, it will automatically be recognized as a common paging space device if the prerequisites mentioned previously are met.
You can have a mix of common and independent paging space devices in a shared memory pool. When you do so, make sure the number of common paging space devices matches the number of redundant shared memory partitions.
When defining the shared memory pool, you specify the two Virtual I/O Servers that should be used as paging VIOS partitions. For each shared memory partition with redundant paging VIOS partitions, one of these Virtual I/O Servers is defined as the primary paging VIOS partition and the other one as the secondary paging VIOS partition. Paging will normally be provided by the primary paging VIOS partition. If the primary paging VIOS partition is shut down or you force a manual switch, a failover to the secondary paging VIOS partition is performed.
To balance the I/O load that can be caused by paging activities, the primary and secondary paging VIOS can be set individually for each shared memory partition. For example, if you have four shared memory partitions, you can configure two of them to use Virtual I/O Server 1 as the primary paging VIOS partition, and the other two with Virtual I/O Server 2 as the primary paging VIOS partition.
When a shared memory partition is activated, a suitable paging space device will automatically be selected. If the shared memory partition
has been configured to use redundant paging VIOS partitions, a common paging space
device will be assigned. If no common paging space device is
available, the partition will fail to activate. It is still possible to activate a
partition in this situation by using
the chsysstate command with the --force option through the HMC command line. No failover will be possible in this case.
If you activate a shared memory partition that is not configured with redundant paging VIOS, an independent paging space device will be assigned, if possible. If there are no independent paging space devices available, the Hypervisor will assign a common paging space device, if possible. Only one paging VIOS partition will be used in this case, and no failover will occur, even though the paging space device is actually redundancy capable.
The following section guides you through a real-life example on how to configure dual Virtual I/O servers with Active Memory Sharing. Figure 1 shows an overview of the target configuration. The managed system is configured with a shared memory pool that has 2 GB of real memory assigned. The Virtual I/O Servers lpar_1_solchio05 and lpar_2_solchio06 are configured as paging VIOS partitions. For the shared memory partition, lpar_6_sotchax11 paging VIOS partition lpar_1_solchio05 will be configured as primary and lpar_2_solchio06 as secondary. The physical disk hdisk17 is assigned to both Virtual I/O Servers, making it eligible to be used as a common paging space device. It is used as a paging space device for the shared memory partition lpar_6_sotchax11.
Figure 1. Example configuration
Shared memory pool configuration
You first configure the shared memory pool. On the HMC you select the managed system on which you want to create the shared memory pool. Then you start the shared memory pool wizard by selecting Configuration > Virtual Resources > Shared Memory Pool Management. When defining the paging VIOS partitions, select the two Virtual I/O Servers. Figure 2 shows the window from the example configuration where lpar_1_solchio05 is defined as paging VIOS 1 and lpar_2_solchio06 as paging VIOS 2.
Figure 2. Creating the shared memory pool
The paging VIOS partitions that you define here will be used as defaults when you later create the shared memory partitions. Paging VIOS 1 will, by default, be used as the primary paging VIOS partition, with Paging VIOS 2 as the secondary paging VIOS partition. However, you have the ability to override the defaults and define the primary and secondary paging VIOS individually for each shared memory partition.
Paging space device configuration
Next, you pick the paging space devices. The common paging devices are marked with True in the
Redundancy Capable column. In the example in Figure 3, you can see that hdisk17 is a common paging space device.
It is accessible
through both Virtual I/O Servers lpar_1_solchio05 and lpar_2_solchio06.
Figure 3. Adding paging space devices
Shared memory pool configuration using the HMC command line
If you want to create the shared memory pool using the HMC command line, use the
chhwres command as shown in Listing 1. The first chhwres command creates the shared memory pool. With the
second chhwres command, add a paging space device
to the shared memory pool. When adding a
common paging space device using the chhwres command, you only
need to specify one paging VIOS partition. The
HMC automatically recognizes that the device is redundant and configures it accordingly.
In Listing 1, the lshwres
command shows hdisk17 as redundant, although the chhwres
command only specified lpar_2_solchio06 as the paging VIOS partition.
Listing 1. Creating the shared memory pool using the HMC command line
# chhwres -r mempool -m IBM_MMA_P6_102615A_SOLCHMS05\ -o a -a "pool_mem=1024,max_pool_mem=4096,\ \"paging_vios_names=lpar_1_solchio05,lpar_2_solchio06\"" # chhwres -r mempool -m IBM_MMA_P6_102615A_SOLCHMS05\ -o a -p lpar_2_solchio06 --rsubtype pgdev --device hdisk17 # lshwres -r mempool -m IBM_MMA_P6_102615A_SOLCHMS05 --rsubtype pgdev | sed 's/,/\n/g' device_name=hdisk17 paging_vios_name=lpar_1_solchio05 paging_vios_id=1 size=40960 type=phys state=Inactive phys_loc=U789D.001.DQD21L0-P1-C1-T1-W5005076801203E85-L1B000000000000 is_redundant=1 redundant_device_name=hdisk17 redundant_paging_vios_name=lpar_2_solchio06 redundant_paging_vios_id=2 redundant_state=Active redundant_phys_loc=U789D.001.DQD21L0-P1-C2-T1-W5005076801403E85-L1B000000000000 lpar_name=lpar_6_sotchax11 |
Creating shared memory partitions
When creating or updating shared memory partitions profiles you can find the option to select the paging VIOS partitions in the
memory configuration section. Figure 4 shows an example. By default, the fields Primary Paging VIOS
and Secondary Paging VIOS will be prefilled with the paging VIOS partitions that were specified during the shared memory
pool configuration. Here you have the possibility to override this default. For example, to balance the load between the
two paging VIOS partitions
you can set the primary and secondary paging VIOS individually for each partition. When you change
the primary and secondary setting in an existing partition profile, the partition needs
to be reactivated to pick up the changes.
The active paging VIOS partition of a running
partition can be switched using the chhwres command as explained in
Paging VIOS partition failover.
If you want to create a non-redundant partition, set the Secondary Paging VIOS field to none.
Figure 4. Creating a shared memory partition
Paging VIOS partition failover
A failover from one paging VIOS partition to the other occurs if a paging VIOS partition is shut down or if a failover is manually triggered. The failover is transparent to the shared memory partitions.
After a failover, no automatic switch back will occur when the original paging VIOS partition
comes up again. If you want to restore the original primary/secondary configuration you can manually switch the paging VIOS
for the affected partitions.
A switch of the paging VIOS partition can be initiated through the HMC
command line using the chhwres command with the -so option. This function is not
available through the HMC GUI. If a shared memory partition
is deactivated and reactivated after both paging VIOS partitions are
available again, the original primary and secondary settings will also be used
as they are defined in the partition profile.
Using the HMC GUI, the active paging VIOS partition is displayed in the Memory tab of the partition
properties. On the HMC command line, the lshwres command can be used.
Listing 2 shows how to display and switch the active paging VIOS partition. The first lshwres command
shows that the active paging VIOS for partition lpar_6_sotchax11 is lpar_1_solchio05.
Use the --filter and -F
options of the lshwres command to limit the command output
to what you actually want to see.
Then a chhwres command is executed to switch the active
paging VIOS partition. Afterwards, you can see in
the lshwres command output that the active paging VIOS partition has changed to lpar_2_solchio06.
Listing 2. Switching the paging VIOS partition
hscroot@sibwthmc01:~> lshwres -r mem -m IBM_MMA_P6_102615A_SOLCHMS05 --level lpar \ > --filter "lpar_names=lpar_6_sotchax11" \ > -F curr_paging_vios_name lpar_1_solchio05 hscroot@sibwthmc01:~> chhwres -r mem -m IBM_MMA_P6_102615A_SOLCHMS05 \ > -p lpar_6_sotchax11 -o so hscroot@sibwthmc01:~> lshwres -r mem -m IBM_MMA_P6_102615A_SOLCHMS05 --level lpar \ > --filter "lpar_names=lpar_6_sotchax11" \ > -F curr_paging_vios_name lpar_2_solchio06 |
Active Memory Sharing and Live Partition Mobility
If you want to use Live Partition Mobility for a shared memory partition you need a shared memory pool with a suitable and available paging space device on the target server. The size of the shared memory pool on the target server does not have to be the same as on the source server.
If possible, the paging VIOS redundancy configuration for the migrated partition will be preserved on the target system. However, you have the option to change the paging VIOS configuration in the migration wizard. Figure 5 shows the available options. You can move a shared memory partition running on a server with a redundant paging VIOS setup to a server where there is only one paging VIOS partition available.
Figure 5. Specifying redundancy options during migration
On the target server the migration of a shared memory partition has the same effect as adding a new partition to the shared memory pool. Depending on the amount of available physical memory in the shared memory pool and the memory requirements of the running shared memory partitions, the memory allocations for the individual shared memory partitions might be rebalanced. Therefore, when the migration is complete the amount of physical memory assigned to the partition on the destination system will normally be different from the amount that was assigned on the source system.
During the migration operation, all the memory that has been paged out to a paging space device is first read into real memory before being transmitted to the target server. Therefore, if a large portion of the memory has been paged out, the duration of the migration operation will increase. After the migration is complete, the paging space device on the source server will be freed and becomes available for use by other partitions.
Using Active Memory Sharing with advanced PowerVM configurations including dual Virtual I/O Servers and Live Partition Mobility is straightforward and allows you to benefit from high availability and flexibility for your virtualized Power Systems environment.
Learn
- The article
"Configuring
Active Memory Sharing from a customer's experience" (developerWorks,
August 2009) is a good way to get started with Active Memory Sharing.
- In
PowerVM Virtualization Active Memory Sharing
you can find all the details about Active Memory Sharing.
-
The Whitepaper
"IBM PowerVM Active Memory Sharing Performance"
provides in-depth information about performance aspects of Active Memory Sharing.
- To learn more about PowerVM in general, take a look at the Redbook
PowerVM
Virtualization on IBM System p: Introduction and basic configuration.
Discuss
- Check out
the PowerVM
forum on developerWorks
to get answers to your Active Memory Sharing questions.
- Follow developerWorks on Twitter.
- Get involved in the My developerWorks community.
-
Participate in the AIX and UNIX forums:
- AIX Forum
- AIX Forum for developers
- Cluster Systems Management
- IBM Support Assistant Forum
- Performance Tools Forum
- Virtualization Forum
- More AIX and UNIX Forums

Oliver Stadler is a senior IT Specialist working in Integrated Technology Delivery at IBM Switzerland. He has 19 years of experience in the IT industry. In his current job, he is responsible for the design and implementation of Power Systems and AIX-based solutions, and he has written extensively on PowerVM virtualization for Power Systems.



