You can use the chhwres command, on the HMC, to “free up” allocated processor and memory resources from your logical partitions.

 

I may want to do this if I need to improve the affinity placement of a partition on a POWER7 system or if I need to free up resources from trial capacity on demand in order to re-use the resources with On/Off capacity instead.

 

Here’s an example of “freeing up” some processor resources from a partition.

 

I’d like to remove the processor allocation from my AIX partition named 750lpar6. This partition is currently active and has 0.5 processing units assigned to it.

 

hscroot@hmc1:~> lparls | grep 750lpar6

   750lpar6             Running

 

hscroot@hmc1:~> lparlscpu | grep 750lpar6

   750lpar6             0.5

 

 

image

 

I’ll stop the partition (shutdown –F) so that I may free up its processor resources. The partition is now inactive.

 

hscroot@hmc1:~> lparls | grep 750lpar6

   750lpar6             Not Activated

 

Even though the partition is no longer running, the processor allocation of 0.5 cores remains assigned to this partition.

 

image

 

The number of processors ‘assigned to partitions’ is 6.5 units; as shown on the HMC GUI, under the properties of the managed system.

 

image

 

Now I’ll use the chhwres command to “free” the currently allocated cores from the partition.

 

hscroot@hmc1:~> chhwres -r proc -m 750-1 -o r --id 8 --procunits 0.5

 

The partition is now allocated a total of 0.0 cores and is no longer using any processor resources.

 

hscroot@hmc1:~> lparlscpu | grep 750lpar6

   750lpar6             0.0

image

 

Looking at the managed system properties again, the number of processors ‘assigned to partitions’ has dropped to 6.0 units.

 

image

 

The partitions profile is NOT changed.

 

hscroot@hmc1:~> lparinfo 750lpar6

750lpar6

  On frame 750-1

  Current State:  Not Activated

  OS version: AIX 6.1 6100-05-01-1016

 

  Profile properties:

  Profile properties:
name=Default,lpar_name=750lpar6,lpar_id=8,lpar_env=aixlinux,all_resources=0,
min_mem=256,desired_mem=10240,max_mem=24576,min_num_huge_pages=0,desired_num_huge_pages=0,
max_num_huge_pages=0,mem_mode=ded,hpt_ratio=1:64,proc_mode=shared,min_proc_units=0.1,
desired_proc_units=0.5,max_proc_units=2.0,min_procs=1,desired_procs=4,max_procs=8,
sharing_mode=uncap,uncap_weight=128,shared

The partition is started again (activated) and it re-acquires 0.5 cores as it did prior to shut down.

 

hscroot@hmc1:~> lparpoweron 750lpar6

 

hscroot@hmc1:~> lparls | grep 750lpar6

   750lpar6             Running

 

hscroot@hmc1:~> lparlscpu | grep 750lpar6

   750lpar6             0.5

 

image