Most of servers have CPU and memory available. CPU and memory can be enabled by buying CoD (Capacity On Demand) codes to IBM. These CoD activates CPU and memory forever and can never be returned to IBM. High end server have an less-known functionality called On/Off CoD. On/Off CoD allows you to activate temporarily CPU or memory on a day basis to help a particular need. It can be very useful for your Disaster Recovery Plan, you can activate resources, on demand for a limited amout of time. By using On/Off CoD you’ll save money and gain more flexibility if you need to add in emergency some resources for you machine. In my case I had to use On/Off COD for a disruptive firmware maintenance. All lpars running on a P795 (9119-FHB) have to move to another one during the firmware maintenance, the destination machine have to handle the load of the source. This problem was solved by using On/Off CoD.
Checking available resources usable by On/Off CoD
On/Off COD feature is available on P770 to P795 (P780 included). Only CoD processor and memory resources installed in a server can be activated by using On/Off CoD feature. Installed resources available can be easily checked by a Hardware Management Console command line :
# lscod -t cap -m 9119-FHB-myserver -c onoff -r proc -F avail_procs_for_onoff 38 # lscod -t cap -m 9119-FHB-myserver -c onoff -r mem -F avail_mem_for_onoff 360448
Note that the HMC command line output for memory is in MB, On/Off COD granularity for memory is GB and the core for processor :
# echo "360448/1024" | bc 352
On this server 38 cores and 352 GB for memory can be used by On/Off COD feature.
Enabling On/Off COD on a server
Before using On/Off COD feature customer has to subscribe and sign a contract with IBM. This will determine the billing and the charge to pay to enable one core for one day, and one GB of memory for one day (obviously it’s not free :-)). IBM will provide two codes, one for cores (TCoD Activation Code) one for memory (TMoD Activation Code). This will fill a pool of “processor days” and “memory days” (codes are replaced in example below) :
# chcod -o e -m 9119-FHB-myserver -k XXXXXXXXXXXXXXXXXXXXX00000XXXXXMEM # chcod -o e -m 9119-FHB-myserver -k XXXXXXXXXXXXXXXXXXXXX00000XXXXPROC
After codes are correctly entered, a number of “processor days”, and “memory days” will be available. You can also check that the “onoff_state” is available :
# lscod -t hist -m 9119-FHB-myserver time_stamp=08/21/2013 13:54:51,"entry=HSCL0303 On/Off processor enablement code entered, maximum number of processor days: 3420." time_stamp=08/21/2013 13:54:11,"entry=HSCL0304 On/Off memory enablement code entered, maximum number of memory days: 31680."
# lscod -t cap -m 9119-FHB-myserver -c onoff -r proc -F proc_onoff_state Available # lscod -t cap -m 9119-FHB-myserver -c onoff -r mem -F mem_onoff_state Available
A new menu will be available on the Hardware Management Console after this action :
Checking available days
Activating resources use days : “processor days” or “memory days”. Before activating resources you first have to check there are available days into this two pools :
- HMC command to check available days in the processor pool :
# lscod -t cap -m 9119-FHB-myserver -c onoff -r proc -F onoff_proc_days_avail 3420
# lscod -t cap -m 9119-FHB-myserver -c onoff -r mem -F onoff_mem_days_avail 31680
Calculating charges for a request
3420 day available for processors means that you can activate one core for 3420 days, or 2 core for 1710 days, or 38 cores for 90 days. Only one request for processor and one request for memory can be running at the same time. You can still change a running On/off Capacity on Demand request. Charges may change while changing the request. You have to be careful before changing a request because the billing will change while changing the request … Check this link on the infocenter for a detailed documentation : http://pic.dhe.ibm.com/infocenter/powersys/v3r1m5/index.jsp?topic=%2Fipha2%2Foocod.htm. Here are the most important things you have to remember before changing a request (quoted from the infocenter):
- Resource days that remain in a request are decremented at the start of each day.
- The number of resource days billed is incremented at the start of each day.
- The change request expires in the number of days that are requested in the change request plus the time that remains in the current resource day of the running request since you have already been charged for that entire resource day.
- If the change request decrease the amount of “day”, theses one are returned and not billed.
- If the change request increase the amount of resource a charge for the additional resources for the time that remains in the current resource day is immediately applied
Resources are activated from the HMC Gui or the HMC command line, here are two examples showing you how to activate processors and memory for a few days :
- Memory Activation : 352GB for 3 days (1056 days will be billed if no request change) :
# chcod -o a -m 9119-FHB-myserver -c onoff -r mem -q 352 -d 3
# chcod -o a -m 9119-FHB-myserver -c onoff -r proc -q 38 -d 3
Sending billing information to IBM
Each months customer have to send billing information to IBM. The service agent of the HMC can be configured to automatically send report to IBM. You can still check on the HMC how many days will be billed :
- Memory :
# lscod -t bill -r mem -m 9119-FHB-myserver sys_type=9119,sys_serial_num=XXXXXX,anchor_card_ccin=XXXX,anchor_card_serial_num=XX-XXXXXX,anchor_card_unique_id=XXXXXX,resource_id=XXX,sequence_num=XXX,activated_onoff_resources=0000,avail_resources_for_onoff=0038,hist_expired_resource_days=00000039,hist_unreturned_resource_days=00000000,collection_date=2013-08-30,collection_time=13:26:38,total_sys_run_time_hours=001018,signature=XXXXXX,entry_check=XX,status=01
# lscod -t bill -r proc -m 9119-FHB-myserver sys_type=9119,sys_serial_num=XXXXXX,anchor_card_ccin=XXXX,anchor_card_serial_num=XX-XXXXXX,anchor_card_unique_id=XXXXXX,resource_id=XXX,sequence_num=XXX,activated_onoff_resources=0000,avail_resources_for_onoff=0038,hist_expired_resource_days=00000039,hist_unreturned_resource_days=00000000,collection_date=2013-08-30,collection_time=13:26:38,total_sys_run_time_hours=001018,signature=XXXXXX,entry_check=XX,status=01
On/Off CoD is a less-known functionality, but it can save you bacon, and it’ll be probably be cheaper than activating resources forever. You just have to be very careful while using it and check there is no unreturned capacity or you’ll be charge for it until capacity will be returned. One more time IBM proves that PowerSystems are the most flexible in the world. Never forget that Power is performance redefined …