When an LPAR is shutdown, resources such as processors, memory, and I/O slots are not automatically released by the LPAR. The resources remain assigned to the LPAR and are reused on the next activation (with the current configuration).
The article will show how such resources are automatically released and, if desired, how to manually release resources of an inactive LPAR.
(Note: In the example output, we use version 1.4 of the LPAR tool, but in all cases we show the underlying commands on the HMC command line, so you can try everything without using the LPAR tool.)
The example LPAR lpar1 was shut down, but currently still occupies 100 GB of memory:
linux $ lpar status lpar1 NAME LPAR_ID LPAR_ENV STATE PROFILE SYNC RMC PROCS PROC_UNITS MEM OS_VERSION lpar1 39 aixlinux Not Activated standard 0 inactive 1 0.2 102400 Unknown linux $
The following commands for the output above were executed on the corresponding HMC hmc01:
hmc01: lssyscfg -r lpar -m ms09 --filter lpar_names=lpar1 hmc01: lshwres -r mem -m ms09 --level lpar --filter lpar_names=lpar1 hmc01: lshwres -r proc -m ms09 --level lpar --filter lpar_names=lpar1
The resource_config attribute of an LPAR indicates whether the LPAR has currently allocated resources (resource_config=1) or not (resource_config=0):
linux $ lpar status -F resource_config lpar1 1 linux $
Or on the HMC command line:
hmc01: lssyscfg -r lpar -m ms09 --filter lpar_names=lpar1 –F resource_config
The resources allocated by an not activated LPAR can be released in 2 different ways:
- Automatic: The resources used are needed by another LPAR, e.g. because memory is expanded dynamically or an LPAR is activated that does not have sufficient resources. In this case, resources are automatically removed from a not activated LPAR. We will show this below with an example.
- Manual: The allocated resources are explicitly released by the administrator. This is also shown below in an example.
First we show an example in which resources are automatically taken away from an not activated LPAR.
The managed system ms09 currently has about 36 GB free memory:
linux $ ms lsmem ms09 NAME INSTALLED FIRMWARE CONFIGURABLE AVAIL MEM_REGION_SIZE ms09 786432 33792 786432 36352 256 linux $
HMC command line:
hmc01: lshwres -r mem -m ms09 --level sys
We start an LPAR (lpar2) which was configured with 100 GB of RAM. The managed system has only 36 GB of RAM and is therefore forced to take resources from inactive LPARs in order to provide the required 100 GB. We start lpar2 with the profile standard and look at the memory relations:
linux $ lpar activate -b sms -p standard lpar2 linux $
HMC command line:
hmc01: chsysstate -m ms09 -r lpar -o on -n lpar2 -b sms -f standard
Overview of the storage relations of lpar1 and lpar2:
linux $ lpar status lpar\* NAME LPAR_ID LPAR_ENV STATE PROFILE SYNC RMC PROCS PROC_UNITS MEM OS_VERSION lpar1 4 aixlinux Not Activated standard 0 inactive 1 0.2 60160 Unknown lpar2 8 aixlinux Open Firmware standard 0 inactive 1 0.2 102400 Unknown linux $ ms lsmem ms09 NAME INSTALLED FIRMWARE CONFIGURABLE AVAIL MEM_REGION_SIZE ms09 786432 35584 786432 0 256 linux $
HMC command line:
hmc01: lssyscfg -r lpar -m ms09 hmc01: lshwres -r mem -m ms09 --level lpar hmc01: lshwres -r proc -m ms09 --level lpar hmc01: lshwres -r mem -m ms09 --level sys
The LPAR lpar2 has 100 GB RAM, the managed system has no more free memory and the memory allocated by LPAR lpar1 has been reduced to about 60 GB. Allocated resources from non-activated LPARs are automatically released, when needed and assigned to other LPARs.
But you can of course also release the resources manually. This is also shown briefly here. We are reducing the memory of LPAR lpar1 by 20 GB:
linux $ lpar -d rmmem lpar1 20480 linux $
HMC command line:
hmc01: chhwres -m ms09 -r mem -o r -p lpar1 -q 20480
As stated, the allocated memory has been reduced by 20 GB:
linux $ lpar status lpar\* NAME LPAR_ID LPAR_ENV STATE PROFILE SYNC RMC PROCS PROC_UNITS MEM OS_VERSION lpar1 4 aixlinux Not Activated standard 0 inactive 1 0.2 39680 Unknown lpar2 8 aixlinux Open Firmware standard 0 inactive 1 0.2 102400 Unknown linux $ ms lsmem ms09 NAME INSTALLED FIRMWARE CONFIGURABLE AVAIL MEM_REGION_SIZE ms09 786432 35584 786432 20480 256 linux $
HMC command line:
hmc01: lssyscfg -r lpar -m ms09 hmc01: lshwres -r mem -m ms09 --level lpar hmc01: lshwres -r proc -m ms09 --level lpar hmc01: lshwres -r mem -m ms09 --level sys
The 20 GB are immediately available to the managed system as free memory. If you remove the entire memory or all processors (or processor units), then all resources of an inactive LPAR are released:
linux $ lpar -d rmmem lpar1 39680 linux $
HMC command line:
hmc01: chhwres -m ms09 -r mem -o r -p lpar1 -q 39680
Here are the resulting memory relations:
linux $ lpar status lpar\* NAME LPAR_ID LPAR_ENV STATE PROFILE SYNC RMC PROCS PROC_UNITS MEM OS_VERSION lpar1 4 aixlinux Not Activated standard 0 inactive 0 0.0 0 Unknown lpar2 8 aixlinux Open Firmware standard 0 inactive 1 0.2 102400 Unknown linux $ ms lsmem ms09 NAME INSTALLED FIRMWARE CONFIGURABLE AVAIL MEM_REGION_SIZE ms09 786432 31232 786432 64512 256 linux $
HMC command line:
hmc01: lssyscfg -r lpar -m ms09 hmc01: lshwres -r mem -m ms09 --level lpar hmc01: lshwres -r proc -m ms09 --level lpar hmc01: lshwres -r mem -m ms09 --level sys
The LPAR lpar1 now has 0 processors, 0.0 processor units and 0 MB of memory! In addition, the resource_config attribute now has the value 0, which indicates that the LPAR no longer has any resources configured!
linux $ lpar status -F resource_config lpar1 0 linux $
HMC command line:
hmc01: lssyscfg -r lpar -m ms09 --filter lpar_names=lpar1 –F resource_config
Finally, the question arises as to why you should release resources manually if they are automatically released by the managed system when needed?
We will answer this question in a second article.