PowerCare: Performance for
Power Systems AIX
(Course code AP25)
Instructor Exercises Guide
with hints
ERC 4.2 cover
Trademarks
IBM® is a registered trademark of International Business Machines Corporation.
The following are trademarks of International Business Machines Corporation in the United States, or other countries, or both:
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Microsoft, Windows and Windows NT are trademarks of Microsoft Corporation in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Java™ and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
Other product and service names might be trademarks of IBM or other companies.
Active Memory™ AIX 5L™ AIX 6™
AIX® BladeCenter® DB™
DB2® developerWorks® EnergyScale™
Express® i5/OS™ Power Architecture®
POWER Hypervisor™ Power Systems™ Power®
PowerPC® PowerVM® POWER6+™
POWER6® POWER7 Systems™ POWER7+™
POWER7® Redbooks® System p®
System p5® System z® Systems Director
VMControl™
Tivoli® Workload Partitions
Manager™
z/VM®
TOC
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Contents iii
Contents
Trademarks . . . v Exercises description . . . vii Exercise 1. Introduction to the lab environment . . . 1-1
Exercise instructions with hints . . . 1-3 Part 1: Access relevant documentation . . . 1-3 Part 2: Gather system information . . . 1-4 Part 3: Partition configuration information . . . 1-7 Exercise review/wrap-up . . . 1-11
Exercise 2. Shared processors and virtual processor tuning . . . 2-1
Exercise instructions with hints . . . 2-3 Part 1: Micro-partitioning and listing the configuration . . . 2-3 Part 2: Controlling SMT and viewing CPU utilization statistics . . . 2-7 Part 3: Exploring AIX CPU performance analysis commands . . . 2-17 Part 4: Physical shared processor pool and micro-partitions . . . 2-24 Exercise review/wrap-up . . . 2-31
Exercise 3. Configuring multiple shared processor pools and donating dedicated processors . . . 3-1
Exercise instructions with hints . . . 3-3 Part 1: Configuring multiple shared processor pools . . . 3-3 Part 2: Monitoring user-defined shared processor pool . . . 3-10 Part 3: Dedicated partitions running in donating mode . . . 3-15 Exercise review/wrap-up . . . 3-26
Exercise 4. Active Memory Sharing . . . 4-1
Exercise instructions with hints . . . 4-3 Part 1: View shared memory pool configuration and configure paging devices . . . 4-3 Part 2: Configure your LPAR to use the shared memory pool. . . . 4-8 Part 3: Monitoring logical memory . . . 4-17 Exercise review/wrapup . . . 4-23
Exercise 5. Active Memory Expansion . . . 5-1
Exercise instructions with hints . . . 5-2 Part 1: Observe non-AME memory behavior . . . 5-2 Part 2: Configure your LPAR for AME . . . 5-5 Part 3: Observe AME memory behavior . . . 5-6
Exercise 6. I/O device virtualization performance and tuning . . . 6-1
Exercise instructions with hints . . . 6-4 Part 1: Virtual SCSI . . . 6-4 Part 2: Virtual Ethernet . . . 6-11
Part 3: Shared Ethernet adapter . . . 6-22 Exercise review/wrap-up . . . 6-35
Exercise 7. Live Partition Mobility . . . .7-1
Exercise instructions with hints . . . 7-3 Part 1: Partition migration environment . . . 7-3 Part 2: Pre-migration checks . . . 7-4 Part 3: Partition mobility steps . . . 7-8 Part 4: Migrate back to the initial managed server . . . 7-16 Exercise review/wrap-up . . . 7-17
Exercise 8. Suspend and resume . . . .8-1
Exercise instructions with hints . . . 8-3 Part 1: View the reserved storage pool configuration . . . 8-3 Part 2: Suspend the partition . . . 8-5 Part 3: Resume the suspended partition . . . 8-8 Exercise review/wrapup . . . 8-11
Exercise A. Using the Virtual I/O Server Performance Analysis Reporting Tool . A-1
Exercise instructions with hints . . . A-3 Exercise review/wrapup . . . A-8
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Trademarks v
TMK
Trademarks
The reader should recognize that the following terms, which appear in the content of this training document, are official trademarks of IBM or other companies:
IBM® is a registered trademark of International Business Machines Corporation.
The following are trademarks of International Business Machines Corporation in the United States, or other countries, or both:
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Microsoft, Windows and Windows NT are trademarks of Microsoft Corporation in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Java™ and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
Other product and service names might be trademarks of IBM or other companies.
Active Memory™ AIX 5L™ AIX 6™
AIX® BladeCenter® DB™
DB2® developerWorks® EnergyScale™
Express® i5/OS™ Power Architecture®
POWER Hypervisor™ Power Systems™ Power®
PowerPC® PowerVM® POWER6+™
POWER6® POWER7 Systems™ POWER7+™
POWER7® Redbooks® System p®
System p5® System z® Systems Director
VMControl™
Tivoli® Workload Partitions
Manager™
z/VM®
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercises description vii
pref
Exercises description
In the exercise instructions you will see each step prefixed by a line. You may wish to check off each step as you complete it to keep track of your progress.
Most exercises include required sections which should always be completed. These may be required before performing later exercises. Some exercises may also include optional sections that you may wish to perform if you have sufficient time and want an additional challenge. This course includes two versions of the course exercises, “with hints” and “without hints”.
The standard “Exercise instructions” section provides high-level instructions for the tasks you should perform. You need to apply the knowledge you gained in the unit presentation to perform the exercise. The “Exercise instructions with hints” provide more detailed
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 1. Introduction to the lab environment 1-1
EXempty
Exercise 1. Introduction to the lab environment
(with hints)
Estimated time
00:45
What this exercise is about
This exercise introduces and familiarizes you with the class lab environment. It includes the key documentation that supports the objectives of this course.
What you should be able to do
After completing this exercise, you should be able to: • Access HMC
• Review LPAR configuration • Check AIX filesets
• Access the documentation for AIX and IBM POWER systems
Introduction
This is an exploratory lab. You will explore some commands, reference materials, and the HMC applications to review prerequisite skills and to try out commands that you will use later in the course.
Requirements
• This workbook
• A computer with a network connection to the lab environment. • An HMC that is configured and supporting a POWER7 system. • A POWER7 processor-based system with at least one partition
running AIX 7 and one partition running the Virtual I/O Server code per student.
Instructor exercise overview
Lab systems configuration
For this exercise, the managed systems and HMCs should be
powered on. Each managed system should have four running Virtual I/O Server partitions (vios1, vios2, vios3, vios4) and four running AIX client partitions (lpar1, lpar2, lpar3, lpar4). Also, there should be two other Virtual I/O Servers available and running named vios_ams and vios_ssp, which will be used for the active memory sharing exercise and the shared storage pool exercise respectively. This configuration supports four students, where each student has one AIX LPAR and one VIOS LPAR.
This will be the system’s configuration after following the instructions in the lab setup guide. The profile that the VIOS and client partitions should be using is named Normal.
Exercise description
As this is the first exercise of the class, assign the students to a lab team and provide all necessary network and login information. Most of the exercise steps can be performed alone, but some require the students to work as a team of two.
The main objective of the exercise is to get students to examine the configuration of the machine, paying particular attention to:
• The virtual adapters configuration on the VIOS and the AIX client partition
• The hostnames and IP addresses of the partitions • How to log in to the partitions
• How to check the virtual adapter configuration of Virtual I/O Servers with the lsmap command
• How to check the configuration of a partition with the
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 1. Introduction to the lab environment 1-3 EXempty
Exercise instructions with hints
Preface
• All exercises of this chapter depend on the availability of specific equipment in your
classroom. You need a computer system configured with a network connection to an HMC.
• The hints provided for locating documentation on particular web pages were correct
when this course was written. However, web pages tend to change over time. Ask your instructor if you have trouble navigating the websites.
• All hints are marked by a » sign.
• The output shown in the hints is an example. Your output and answers based on the output might be different.
General notes, applicable to all exercises:
Your instructor will provide you with instructions for accessing the remote environment. For example, this might involve using a web browser or Virtual Private Network (VPN). Your instructor will further provide you with all the details and login IDs required.
Unless otherwise stated, log in to systems (HMC/LPAR) using a terminal window (for example through PuTTY or a Linux command line).
On some terminal emulations, the function keys are not operative and you might need to substitute escape sequences. For example, instead of pressing F3, you might need to press <Esc+3> for the same function.
Part 1: Access relevant documentation
In this exercise, you will discover online documentation used to support the POWER7 environment and you will also gather system information. You can refer to this
documentation as you work through the remainder of the exercises in this course. This exercise requires Internet access.
__ 1. Go to http://www.ibm.com. Click Products then click Power Systems and explore this page. A large number of links, useful documents, and detailed information are available. Navigate to any links of interest.
__ 2. Go back to http://www.ibm.com. Click the Support & downloads button. Investigate the and click Technical support and Downloads options.
__ 3. Use the following web address to access the IBM Systems Information Centers: http://publib.boulder.ibm.com/eserver. This page is the entry point for hardware as well as software information. Click the IBM Systems Hardware Information Center
At the IBM Systems Hardware Information Center, use the Search option on the left side of the screen to find topics related to following keywords:
• Installing AIX in a partition • Partitioning your server • Managing server using HMC
__ 4. From http://publib.boulder.ibm.com/eserver, select AIX Information Center. Select
the AIX 7.1 Information Center. At the resulting IBM Systems Information Center page, look for the following topics and see what information is available:
• Click the AIX PDFs link to get a list of PDFs of the AIX documentation. • Notice the Performance management and Performance Tools Guide and
Reference PDFs.
__ 5. Go to the PowerVM virtualization website and see what is available:
http://www.ibm.com/systems/power/software. After looking at the available links,
follow the link to PowerVM – Virtualization without limits. Take a moment to see what is available from this page.
Part 2: Gather system information
In this section, you will be directed to use commands to identify system resources. These are standard AIX commands with which you might already be familiar.
__ 6. Log in to your assigned HMC using the user name and password provided by your instructor. Don’t forget to use the https protocol when you type in the address. __ 7. From the HMC GUI, open a terminal window to your assigned Virtual I/O Server
partition on your managed system.
» From the navigation area on the left, select Systems Management > Servers to view the managed system table. Click your managed system name. The LPAR table should appear. Select your assigned Virtual I/O Server partition, then run the Console
Window > Open Terminal Window task.
__ 8. Log in to the partition with the user ID padmin and the password abc123. The Virtual I/O Server partition provides a restricted command line interface (CLI) for the padmin user.
__ 9. Use the lsmap -all command to list the virtual SCSI disk mapping. Use the command output to complete Table 1 (below) for your assigned logical partition.
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 1. Introduction to the lab environment 1-5 EXempty » Note: You might have multiple virtual target devices (VTDs) in your list. Fill out the chart for the first VTD. The PVID is retrieved from the lspv command listed in the next step.
$ lsmap -all
VSA Physloc Client Partition ID
--- ---vhost0 U8204.E8A.652ACF2-V1-C13 0x00000002
VTD lpar1_rootvg Status Available
LUN 0x8100000000000000 Backing device hdisk2
Physloc
U78A0.001.DNWGGSH-P1-C1-T1-W500507680140581E-L3000000000000 VSA Physloc Client Partition ID
--- ---vhost1 U8204.E8A.652ACF2-V1-C14 0x00000003
VTD lpar2_rootvg Status Available
LUN 0x8100000000000000 Backing device hdisk3
Physloc
U78A0.001.DNWGGSH-P1-C1-T1-W500507680140581E-L4000000000000
» Given the example lsmap command output above, for lpar1, the virtual SCSI server adapter slot is 13, the VTD is lpar1_rootvg, and the backing device is hdisk2.
__ 10. Use the lspv command to identify the PVID of the hdisk used as the backing device for your AIX client partition. Record this PVID in Table 1 above. If the PVID does not show in the output of the command, run the following command and replace hdisk2 with your assigned LPAR’s backing device. Then run lspv again.
$ chdev -dev hdisk2 -attr pv=yes
» Example output of lspv command showing the PVID for hdisk2:
$ lspv | grep hdisk2
hdisk2 00f6bcc9a30e4952 None
__ 11. Use the lsmap -all -net command to list the virtual Ethernet and Shared Ethernet adapter configuration. Record the output of the command in Table 2 below.
Table 1: VIOS virtual SCSI configuration Virtual SCSI server adapter slot
Virtual target device Backing device hdisk PVID
» Example command and its output:
$ lsmap -all -net
SVEA Physloc
--- ---ent2 U8204.E8A.652ACF2-V1-C11-T1
SEA ent4 Backing device ent0 Status Available
Physloc U78A0.001.DNWGGSH-P1-C4-T1
__ 12. Use the lsdev command to list the ctl_chan and ha_mode attributes of the Shared Ethernet adapter. Record the values for the control channel adapter for SEA failover and ha_mode in Table 2 below.
» Example command and its output:
$lsdev -dev ent4 -attr
attribute value description user_settable
accounting disabled Enable per-client accounting of network statistics True
ctl_chan ent3 Control Channel adapter for SEA failover True
gvrp no Enable GARP VLAN Registration Protocol(GVRP) True
ha_mode enabled High Availability Mode True
jumbo_frames no Enable Gigabit Ethernet Jumbo Frames True large_receive no Enable receive TCP segment aggregation True largesend 0 Enable Hardware Transmit TCP Resegmentation True netaddr 0 Address to ping True
pvid 1 PVID to use for the SEA device True
pvid_adapter ent2 Default virtual adapter to use for non-VLAN-tagged packets True
qos_mode disabled N/A rue
real_adapter ent0 Physical adapter associated with the SEA True thread 1 Thread mode enabled (1) or disabled (0 True
virt_adapters ent2 List of virtual adapters associated with the SEA (comma separated) True
__ 13. Use the enstat -all entx | grep Priority command to check the priority and status (Active set to True or False) of your shared Ethernet adapter. You already observed that Shared Ethernet adapter failover is configured. Record the
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 1. Introduction to the lab environment 1-7 EXempty
» Given the above examples in the hints you would document: Virtual Ethernet adapter slot = virtual slot 11
Shared Ethernet adapter = ent4 Ethernet backing device = ent0
Control channel adapter for SEA failover = ent3 ha_mode = enabled
Priority and status = 1 and Active is true (primary)
Part 3: Partition configuration information
__ 14. Log in to your assigned AIX LPAR using the user and password that the instructor assigned.
__ 15. Use the lparstat -i AIX command to answer the following questions regarding your partition:
__ a. Is the partition using dedicated or shared processors? __ b. Is the partition capped or uncapped?
__ c. Is simultaneous multithreading on or off?
__ d. How much memory is allocated to this partition?
__ e. What is the partition’s entitled capacity (in processing units)? __ f. How many online virtual CPUs are there?
__ g. Your partition is a member of what shared processor pool? __ h. What is the memory mode?
Table 2: Virtual Ethernet configuration Virtual Ethernet adapter slot
Shared Ethernet adapter Ethernet backing device Control channel adapter for SEA failover
ha_mode
» The output from the lparstat -i command should be similar to the following:
# lparstat -i
Node Name : sys114_lpar1 Partition Name : sys114_lpar1
Partition Number : 2 Type : Shared-SMT Mode : Capped Entitled Capacity : 0.35 Partition Group-ID : 32770 Shared Pool ID : 0
Online Virtual CPUs : 1
Maximum Virtual CPUs : 10
Minimum Virtual CPUs : 1
Online Memory : 1024 MB Maximum Memory : 2048 MB Minimum Memory : 768 MB Variable Capacity Weight : 0
Minimum Capacity : 0.10 Maximum Capacity : 2.00 Capacity Increment : 0.01 Maximum Physical CPUs in system : 8
Active Physical CPUs in system : 8
Active CPUs in Pool : 8
Shared Physical CPUs in system : 8
Maximum Capacity of Pool : 800
Entitled Capacity of Pool : 280
Unallocated Capacity : 0.00 Physical CPU Percentage : 35.00% Unallocated Weight : 0
Memory Mode : Dedicated Total I/O Memory Entitlement :
Variable Memory Capacity Weight : Memory Pool ID : Physical Memory in the Pool : Hypervisor Page Size : Unallocated Variable Memory Capacity Weight:
-Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 1. Introduction to the lab environment 1-9 EXempty __ d. How much memory is allocated to this partition? 1024 MB
__ e. What is the partition’s entitled capacity (in processing units)? 0.35
__ f. How many online virtual CPUs are there? One
__ g. Your partition is a member of what shared processor pool? ID 0
__ h. What is the memory mode? Dedicated
__ 16. Use the lsdev -c adapter command to list the virtual Ethernet adapter
configured on your AIX client partition. Record the virtual Ethernet adapter name in Table 3 below. The slot will be determined in the next step.
» Example command and its output showing that the virtual Ethernet adapter name is
ent0:
# lsdev -c adapter
ent0 Available Virtual I/O Ethernet Adapter (l-lan) vsa0 Available LPAR Virtual Serial Adapter
vscsi0 Available Virtual SCSI Client Adapter vscsi1 Available Virtual SCSI Client Adapter
__ 17. Use the lscfg -vpl command to find out the virtual Ethernet adapter slot ID. Record the information in the Table 3 above.
» Example command and its output showing that the virtual Ethernet adapter slot ID is 11:
# lscfg -vpl ent0
ent0 U8204.E8A.652ACF2-V2-C11-T1 Virtual I/O Ethernet Adapter (l-lan) Network Address...2E5C5B02E80B
Displayable Message...Virtual I/O Ethernet Adapter (l-lan)
Hardware Location Code...U8204.E8A.652ACF2-V2-C11-T1
PLATFORM SPECIFIC Name: l-lan
Node: l-lan@3000000b Device Type: network
Physical Location: U8204.E8A.652ACF2-V2-C11-T1
Table 3: Client partition virtual Ethernet configuration Virtual Ethernet adapter name
__ 18. Determine the operating system level in your partition using the oslevel -s command. You should find that the LPAR is running AIX 7.1.
__ 19. Use the lspath command to verify that your hdisk0 has two different access paths. MPIO is set up at your client logical partition.
» You should see the following for hdisk0:
# lspath -l hdisk0 Enabled hdisk0 vscsi0 Enabled hdisk0 vscsi1
__ 20. Using the Putty program on your desktop, log in to the HMC command line. Determine the HMC’s version with the lshmc -V command. The following is an example command and output that shows an HMC at Version 7, Release 7.4.0 Service Pack 1. It also has two fix packs installed.
hscroot@sys11hmc:~> lshmc -V "version= Version: 7 Release: 7.4.0 Service Pack: 1 HMC Build level 20120207.1 MH01302: Fix for HMC V7R7.4.0 SP1 (02-07-2012) MH01306: Fix for HMC V7R7.4.0 (02-29-2012) ","base_version=V7R7.4.0 "
Your assigned HMC may be at a different level. In your workplace, you might notice differences in the output of some commands if your HMC is at a later version or release.
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 1. Introduction to the lab environment 1-11 EXempty
Exercise review/wrap-up
In this exercise, the students examined key documentation and were shown where to find information on the Internet. The students also looked at some commands that provide information about the partition’s configured resources and the lab environment.
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-1
EXempty
Exercise 2. Shared processors and virtual
processor tuning
(with hints)
Estimated time
02:00
What this exercise is about
In this exercise, students examine advanced processor options such as SMT, shared processors, virtual processors, and capped and uncapped processor partitions.
AIX performance analysis tools will be used to view how performance is affected when using various advanced processor configurations. This exercise guides students through the concept of shared processors, also known as micro-partitioning. The student will use CPU-intensive workloads to see the impact of various processor configurations. By the end of this exercise, students should have a general understanding of how to optimize a micro-partition for performance.
What you should be able to do
After completing this exercise, you should be able to:
• Use AIX performance tools such as lparstat, mpstat, topas,
sar, vmstat, and iostat to monitor and analyze CPU activity in a shared processor environment
• View the effect of simultaneous multithreading (SMT) on workloads and AIX analysis tools
Introduction
This exercise is divided into four parts. Throughout this exercise, all of the partitions have simultaneous multi-threading enabled.
In the first part of the exercise, students gain experience with viewing micro-partitioning specific configuration options of a logical partition.
The second part provides details regarding statistics that are relevant to SMT and a micro-partitioning environment.
In the third part of the exercise, by dynamically changing the capacity entitlement (CE), the capped/uncapped setting, and the number of virtual processors (VPs), you will see the impacts of these
configuration options on the logical partition’s processing capacity and performance.
In the fourth part, you will run a CPU stress load on the partitions using an executable named spload, and monitor the effect. The spload tool can be found in the /home/an31/ex2 directory.
Requirements
• This workbook
• A computer with a network connection to the lab environment. • An HMC that is configured and supporting a POWER7 system. • A POWER7 processor-based system with at least one partition
running AIX 7 and one partition running the Virtual I/O Server code per student.
Instructor exercise overview
The first part of this exercise provides an opportunity for students to display the partition’s configuration options. A review of different types of processors is also provided. The first part should not last long, as the students should already know this material.
The second part is more monitoring-oriented and most of the key AIX monitoring tools will be used.
The third part is a scenario in which the students must change the partitions’ configuration options. The goal here is to help the students understand how micro-partitioning impacts not only the partition being tuned, but how configuration changes impact the other partitions on the same system.
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-3 EXempty
Exercise instructions with hints
Preface
• All exercises of this chapter depend on the availability of specific equipment in your
classroom.
• All hints are marked by a » sign.
Part 1: Micro-partitioning and listing the configuration
Tools and lab environment
In this lab, you will be using your assigned AIX 7 LPAR. You will use a tool named spload during this exercise to generate a CPU load in the partitions. A transaction rate is displayed every five seconds by default and can be changed using the -t option. The help can be viewed using the -h option.
__ 1. Using the HMC, check the properties of your running partition. Verify that your assigned client partition has the following configuration values. Use the HMC to look at the partition properties.
• Processing mode: Shared
• Processing units: Min=0.1, Current=0.35, Max=2 • Virtual processors: Min=1, Current=1, Max=20 • Sharing mode: Capped
• Shared processor pool: DefaultPool
» Log in to your assigned HMC. In the HMC Server Management application, select your server to display the LPAR table. Select your assigned LPAR and choose Properties. Click the Hardware tab, then the Processors tab. Verify the processor information is correct.
Command Type Role
spload C executable Program used to generate CPU load on partitions. A transaction rate is displayed every 5 seconds.
__ 2. Open a terminal window or a Telnet session to your partition, and log in as the root user. Your instructor should have provided the root password.
__ 3. Check the partition configuration using the commands lparstat and lsattr using the following commands.
# lparstat -i # lsattr -El sys0
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-5 EXempty » The lparstat command provides a convenient output for checking many
configuration values.
# lparstat -i
Node Name : sys114_lpar1
Partition Name : sys114_lpar1
Partition Number : 2 Type : Shared-SMT-4 Mode : Capped Entitled Capacity : 0.35 Partition Group-ID : 32771 Shared Pool ID : 0
Online Virtual CPUs : 1
Maximum Virtual CPUs : 10
Minimum Virtual CPUs : 1
Online Memory : 1024 MB
Maximum Memory : 2048 MB
Minimum Memory : 512 MB
Variable Capacity Weight : 0
Minimum Capacity : 0.10
Maximum Capacity : 2.00
Capacity Increment : 0.01
Maximum Physical CPUs in system : 8
Active Physical CPUs in system : 8
Active CPUs in Pool : 8
Shared Physical CPUs in system : 8
Maximum Capacity of Pool : 800
Entitled Capacity of Pool : 280
Unallocated Capacity : 0.00
Physical CPU Percentage : 35.00%
Unallocated Weight : 0
Memory Mode : Dedicated
Total I/O Memory Entitlement :
-Variable Memory Capacity Weight :
-Memory Pool ID :
-Physical Memory in the Pool :
-Hypervisor Page Size :
-Unallocated Variable Memory Capacity Weight : -Unallocated I/O Memory entitlement :
-Memory Group ID of LPAR :
-Desired Virtual CPUs : 1
Desired Memory : 1024 MB
Desired Variable Capacity Weight : 0
Desired Capacity : 0.35
-Target Memory Expansion Size :
-Power Saving Mode : Disabled
» Here is an example of the lsattr command:
# lsattr -El sys0
SW_dist_intr false Enable SW distribution of interrupts True autorestart true Automatically REBOOT OS after a crash True
boottype disk N/A False
capacity_inc 0.01 Processor capacity increment False
capped true Partition is capped False
chown_restrict true Chown Restriction Mode True
conslogin enable System Console Login False
cpuguard enable CPU Guard True
dedicated false Partition is dedicated False
enhanced_RBAC true Enhanced RBAC Mode True
ent_capacity 0.35 Entitled processor capacity False
frequency 6400000000 System Bus Frequency False
fullcore false Enable full CORE dump True
fwversion IBM,EL340_075 Firmware version and revision levels False ghostdev 0 Recreate devices in ODM on system change True id_to_partition 0X040183743A9F5E02 Partition ID False
id_to_system 0X040183743A9F5E00 System ID False
iostat false Continuously maintain DISK I/O history True keylock normal State of system keylock at boot time False log_pg_dealloc true Log predictive memory page deallocation events True max_capacity 2.00 Maximum potential processor capacity False max_logname 9 Maximum login name length at boot time True maxbuf 20 Maximum number of pages in block I/O BUFFER CACHE True maxmbuf 0 Maximum Kbytes of real memory allowed for MBUFS True maxpout 8193 HIGH water mark for pending write I/Os per file True maxuproc 128 Maximum number of PROCESSES allowed per user True min_capacity 0.10 Minimum potential processor capacity False minpout 4096 LOW water mark for pending write I/Os per file True
modelname IBM,8204-E8A Machine name False
ncargs 256 ARG/ENV list size in 4K byte blocks True nfs4_acl_compat secure NFS4 ACL Compatibility Mode True
ngroups_allowed 128 Number of Groups Allowed True
os_uuid 2501c52f-73c6-4581-96fd-059aa177fe60 N/A True
pre430core False Use pre-430 style CORE dump True
pre520tune disable Pre-520 tuning compatibility mode True realmem 1048576 Amount of usable physical memory in Kbytes False
rtasversion 1 Open Firmware RTAS version False
sed_config select Stack Execution Disable (SED) Mode True systemid IBM,03652ACF2 Hardware system identifier False variable_weight 0 Variable processor capacity weight False
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-7 EXempty exactly the same result - utilization can only go up to the partition's entitled capacity; not
higher.
» It is possible to dynamically change a partition from capped to uncapped, and change the weight by using the HMC and the dynamic logical partitioning menu (or the chhwres HMC command).
__ 5. Using the lsdev command, list the available processors in your partition. What type of processors are listed with the lsdev command?
» Example command and its output:
# lsdev -c processor
proc0 Available 00-00 Processor
» We have one processor available. This means that we have one virtual processor configured because your assigned LPAR is configured as a shared processor partition. If you see any processors listed as Defined, it means that the processor was previously used by the partition, but is not currently available. This might happen if the partition has been shut down and then reactivated with a smaller number of processors.
__ 6. Using the bindprocessor command, display the processors available in your partition. What processor type does the bindprocessor command list?
» Example command and its output:
# bindprocessor -q
The available processors are: 0 1 2 3
» The bindprocessor command lists the available logical processors. In this example, we have one virtual processor available (revealed by the lsdev command), and four logical processors. This means that simultaneous multi-threading is enabled and is using the SMT4 mode.
Part 2: Controlling SMT and viewing CPU utilization statistics
__ 7. Log in to your assigned LPAR as the root user.
__ 8. Display the number of processors (cores) that are available in your LPAR using the
lsdev command.
» The suggested command and example output are:
# lsdev | grep proc
proc0 Available 00-00 Processor
» The suggested command and example output are:
# smtctl -m off
smtctl: SMT is now disabled. It will persist across reboots if you run the bosboot command before the next reboot.
# smtctl
This system is SMT capable.
This system supports up to 4 SMT threads per processor. SMT is currently disabled.
SMT boot mode is set to disabled.
SMT threads are bound to the same virtual processor. proc0 has 1 SMT threads.
Bind processor 0 is bound with proc0
__ 10. Display the number of logical CPUs that are available in your system.
» There are many ways to get this information. Some suggestions are below. All should show one logical processor.
# bindprocessor -q
The available processors are: 0
# lparstat
System configuration: type=Shared mode=Capped smt=Off lcpu=1 mem=1024MB psize=4 ent=0.35
%user %sys %wait %idle physc %entc lbusy vcsw phint - - - 0.0 0.0 0.5 99.5 0.00 0.0 6.5 349404 1608
__ 11. Enable SMT and display the SMT configuration. What is the default number of logical CPUs per processor?
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-9 EXempty » The suggested command and example output are:
# smtctl -m on
smtctl: SMT is now enabled. It will persist across reboots if you run the bosboot command before the next reboot.
# smtctl
This system is SMT capable.
This system supports up to 4 SMT threads per processor. SMT is currently enabled.
SMT boot mode is set to enabled.
SMT threads are bound to the same virtual processor. proc8 has 4 SMT threads.
Bind processor 0 is bound with proc8 Bind processor 1 is bound with proc8 Bind processor 2 is bound with proc8 Bind processor 3 is bound with proc8
__ 12. Set the number of hardware threads per core to two and then display the SMT configuration.
» The suggested command and example output are:
# smtctl -t 2
smtctl: SMT is now enabled. It will persist across reboots if you run the bosboot command before the next reboot.
# smtctl
This system is SMT capable.
This system supports up to 4 SMT threads per processor. SMT is currently enabled.
SMT boot mode is set to enabled.
SMT threads are bound to the same virtual processor. proc8 has 2 SMT threads.
Bind processor 0 is bound with proc8 Bind processor 1 is bound with proc8
__ 13. Change the number of threads per core back to four. » The suggested command and example output are:
# smtctl -t 4
smtctl: SMT is now enabled. It will persist across reboots if you run the bosboot command before the next reboot.
__ 14. Use vmstat and mpstat to display the number of logical CPUs on the system. How many logical CPUs are on your system?
» The suggested command and example output are:
# vmstat
System configuration: lcpu=4 mem=1024MB ent=0.35
kthr memory page faults cpu
--- --- ---- --- ---r b avm f---re ---re pi po f---r s---r cy in sy cs us sy id wa pc ec
1 1 163470 64229 0 0 0 0 0 0 3 222 161 0 0 99 0 0.00 0.1
# mpstat -s 1 1
System configuration: lcpu=4 ent=0.3 mode=Capped Proc0
1.35%
cpu0 cpu1 cpu2 cpu3
0.69% 0.22% 0.22% 0.22%
» The example output for both commands has a header field (lcpu=) that reports four logical CPUs. The mpstat report, in addition, shows that there are four logical CPUs per processor.
Note: New intelligent threads technology enables workload optimization by dynamically
selecting the most suitable threading mode - single thread per core, SMT (simultaneous multi-thread) with two threads per core or SMT with four threads per core. As a result, applications can run at their peak performance and server workload capacity is
increased. In this section we will see how POWER7 intelligent threads behave with an increase in the workload.
__ 15. Run the yes command to generate load on the CPU. Execute one instance of the
yes command in the background. » The suggested command is:
# yes > /dev/null &
__ 16. Monitor the system wide processor utilization by running lparstat for four intervals of one second each.
» The suggested command and example output are:
# lparstat 1 4
System configuration: type=Shared mode=Capped smt=4 lcpu=4 mem=1024MB psize=16 ent=0.35
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-11 EXempty » In the example output, the single CPU intensive job is utilizing all of the entitled capacity
(0.35).
__ 18. Monitor the utilization for all logical CPUs, using the sar command. Specify two intervals of one second each. You might wish to maximize your terminal emulation window in order to see all of the output without scrolling. What do you notice in the command output?
» The suggested command and example output are:
# sar -P ALL 1 2
AIX lpar1 1 7 00F6BCC94C00 11/13/12
System configuration: lcpu=4 ent=0.35 mode=Capped
14:42:30 cpu %usr %sys %wio %idle physc %entc 14:42:31 0 50 6 0 44 0.08 22.6 1 94 1 0 4 0.19 52.9 2 0 0 0 100 0.04 12.1 3 0 0 0 100 0.04 12.2 - 61 2 0 37 0.35 99.8 14:42:32 0 89 4 0 8 0.17 48.0 1 67 1 0 32 0.10 27.4 2 0 0 0 100 0.04 12.3 3 0 0 0 100 0.04 12.3 - 61 2 0 37 0.35 99.9 Average 0 76 4 0 19 0.12 35.3 1 85 1 0 14 0.14 40.1 2 0 0 0 100 0.04 12.2 3 0 0 0 100 0.04 12.2 - 61 2 0 37 0.35 99.8
» In the output above, notice that two logical processors are busy and two are idle. Together, the two logical processors are consuming all of the entitled capacity. We can assume one of the logical processors is running the yes process thread. The other logical processor is running operating system tasks.
__ 19. Execute one more instance of the yes command in the background. This will result in two CPU intensive jobs running on the system.
» The suggested command and example output are:
» You can check that there are two yes jobs running:
# jobs
[2] + Running yes > /dev/null & [1] - Running yes > /dev/null &
__ 20. Monitor the system wide processor utilization by running lparstat for four intervals of one second each. What are the current values of physc and %entc?
____________________________________________________________ » The suggested command and example output are:
# lparstat 1 4
System configuration: type=Shared mode=Capped smt=4 lcpu=4 mem=1024MB psize=4 ent=0.35
%user %sys %wait %idle physc %entc lbusy vcsw phint - - - 85.7 2.9 0.0 11.4 0.35 100.0 52.8 499 1 87.0 1.3 0.0 11.7 0.35 99.9 51.0 499 0 87.1 1.3 0.0 11.5 0.35 99.9 49.2 513 1 86.9 1.4 0.0 11.8 0.35 99.9 53.5 520 1
» The output should shows that we are still using up all of the entitled capacity. The physc value matches the ent value and the entitled capacity percentage is 100 or nearly so.
__ 21. Monitor the utilization for all logical CPUs using the sar command. Specify two intervals of two seconds each. What do you notice about the sar output?
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-13 EXempty » The suggested command and example output are:
# sar -P ALL 2 2
AIX lpar1 1 7 00F6BCC94C00 11/13/12
System configuration: lcpu=4 ent=0.35 mode=Capped
14:56:24 cpu %usr %sys %wio %idle physc %entc 14:56:26 0 61 9 0 30 0.05 14.4 1 95 1 0 5 0.11 32.8 2 97 1 0 3 0.13 37.2 3 68 2 0 30 0.05 15.5 - 86 2 0 12 0.35 99.9 14:56:28 0 68 5 0 26 0.06 16.3 1 99 1 0 0 0.15 42.9 2 95 1 0 4 0.11 31.5 3 47 1 0 52 0.03 9.2 - 88 1 0 11 0.35 99.9 Average 0 65 7 0 28 0.05 15.3 1 97 1 0 2 0.13 37.9 2 96 1 0 3 0.12 34.3 3 60 2 0 38 0.04 12.3 - 87 2 0 11 0.35 99.9
» The output shows there are still two busy logical processors and two mostly idle logical processors.
__ 22. Execute two more instances of the yes command in the background. This will result in four computational intensive jobs running on the system.
» The suggested command and example output are:
#yes > /dev/null & #yes > /dev/null & # jobs
[4] + Running yes > /dev/null & [2] - Running yes > /dev/null & [3] Running yes > /dev/null & [1] Running yes > /dev/null &
» There should be four instance of the yes command running on your LPAR now.
__ 23. Monitor the utilization for all logical CPUs using the sar command. Specify two intervals of two seconds each.
» The suggested command and example output are:
# sar -P ALL 2 2
AIX lpar1 1 7 00F6BCC94C00 11/13/12
System configuration: lcpu=4 ent=0.35 mode=Capped
15:02:43 cpu %usr %sys %wio %idle physc %entc 15:02:45 0 97 3 0 0 0.09 24.9 1 99 1 0 0 0.09 25.0 2 99 1 0 0 0.09 25.1 3 99 1 0 0 0.09 25.0 - 99 1 0 0 0.35 100.0 15:02:47 0 97 3 0 0 0.09 24.9 1 99 1 0 0 0.09 25.0 2 99 1 0 0 0.09 25.0 3 99 1 0 0 0.09 25.0 - 99 1 0 0 0.35 99.9 Average 0 97 3 0 0 0.09 24.9 1 99 1 0 0 0.09 25.0 2 99 1 0 0 0.09 25.1 3 99 1 0 0 0.09 25.0 - 99 1 0 0 0.35 100.0
__ 24. Examine the sar report. How many logical CPUs have a very high % utilization (%user + %sys) along with a significant physical processor consumption (physc)? What can you say about the distribution of the workload?
» The example output shows four logical CPUs in each interval, each with a high
utilization totalling 100% and a significant physical processor consumption that is split evenly between all four logical processors. Recall that this is a capped processor partition, so it cannot use more than its entitled capacity.
__ 25. Run the lparstat command with a count and interval of two. Note the physc and
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-15 EXempty » Example lparstat command and its output which shows that physc is the same as the
entitled capacity (0.35) and %entc is about 100%.
# lparstat 2 2
System configuration: type=Shared mode=Capped smt=4 lcpu=4 mem=1024MB psize=4 ent=0.35
%user %sys %wait %idle physc %entc lbusy vcsw phint - - - 98.7 1.2 0.0 0.1 0.35 99.9 100.0 400 1 98.6 1.2 0.0 0.2 0.35 99.8 100.0 402 2
__ 26. In the HMC GUI, select your assigned LPAR and use the Dynamic Logical
Partitioning menu to dynamically change your LPAR to an uncapped partition. Set
the uncapped weight to 128.
» In the HMC GUI, select your LPAR. Run the Dynamic Logical Partitioning >
Processor > Add or Remove task. In the window that opens, click the uncapped
checkbox as shown below. Enter an uncapped weight value of 128. Click OK to complete the task.
__ 27. In your LPAR login session, run the lparstat with a count and interval of two. What do you notice now about the physc and %entc statistics? How do they compare with the last lparstat command that you ran?
» Here is an example lparstat command and its output showing that physc is now 1.0 and the %entc is 285.8%. Now that the partition is uncapped, it is only limited by its one virtual processor (and the amount of excess cycles in the shared processor pool).
# lparstat 2 2
System configuration: type=Shared mode=Uncapped smt=4 lcpu=4 mem=1024MB psize=4 ent=0.35
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-17 EXempty
Part 3: Exploring AIX CPU performance analysis commands
AIX monitoring commands, such as lparstat and mpstat, can be used to examine information related to the partitioning capabilities of POWER5, POWER6, and POWER7 systems. Monitoring commands also have output columns for reporting micro-partitioning statistics.
__ 29. Previously in this exercise, you explored using lparstat and sar to view CPU utilization, particularly the physc and %entc fields. Next you’ll look at the distribution of workload across logical processors and the lbusy statistic. Recall in the last part of this exercise, you started four yes processes. You also looked at the sar output, which shows utilization by logical processors, and noticed that the workload was distributed evenly across the logical processors. Recall also that your LPAR is now running as an uncapped partition.
Check that the yes jobs are still running with the jobs command. If there are not four, then start new yes processes so that there are exactly four. Then run
sar -P ALL 2 2 command and notice the distribution of the workload across the logical processors.
» Here are example commands and their example outputs. There should be four yes processes. The sar output should show even distribution of the workload.
# jobs
[4] + Running yes > /dev/null & [2] - Running yes > /dev/null & [3] Running yes > /dev/null & [1] Running yes > /dev/null &
# sar -P ALL 2 2
AIX lpar1 1 7 00F6BCC94C00 11/13/12
System configuration: lcpu=4 ent=0.35 mode=Uncapped
15:33:31 cpu %usr %sys %wio %idle physc %entc 15:33:33 0 99 1 0 0 0.25 71.5 1 100 0 0 0 0.25 71.5 2 99 1 0 0 0.25 71.5 3 99 1 0 0 0.25 71.3 - 99 1 0 0 1.00 285.7 15:33:35 0 99 1 0 0 0.25 71.5 1 100 0 0 0 0.25 71.5 2 100 0 0 0 0.25 71.4 3 99 1 0 0 0.25 71.3 - 99 1 0 0 1.00 285.6 Average 0 99 1 0 0 0.25 71.5 1 100 0 0 0 0.25 71.5 2 99 1 0 0 0.25 71.4 3 99 1 0 0 0.25 71.3 - 99 1 0 0 1.00 285.6
__ 30. Run the mpstat -s command with an interval and count of two. Does the distribution of the workload match the most recent sar output?
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-19 EXempty » Here is the mpstat command and example output:
# mpstat -s 2 2
System configuration: lcpu=4 ent=0.3 mode=Uncapped Proc0
99.95%
cpu0 cpu1 cpu2 cpu3 25.00% 25.01% 24.99% 24.95%
Proc0
99.95%
cpu0 cpu1 cpu2 cpu3 25.00% 25.01% 24.99% 24.95%
» You should find that the distribution is even just like the sar output.
__ 31. Run the lparstat command with an interval and count of two. What do you notice about the lbusy statistic? Does this value make sense?
» Here is the lparstat command and example output which shows a logical processor percentage (lbusy) of 100%. This makes sense because you are using all four logical processors.
# lparstat 2 2
System configuration: type=Shared mode=Uncapped smt=4 lcpu=4 mem=1024MB psize=4 ent=0.35
%user %sys %wait %idle physc %entc lbusy vcsw phint - - - 99.3 0.7 0.0 0.0 1.00 285.8 100.0 400 7 99.1 0.9 0.0 0.0 1.00 285.6 100.0 400 6
__ 32. Now kill two of the yes jobs. You can use the kill %1 and kill %2 commands. Run the jobs command to verify that two jobs remain.
» Example commands and their outputs.
# kill %1 # kill %2
[1] Terminated yes > /dev/null &
# jobs
[4] + Running yes > /dev/null & [2] - Terminated yes > /dev/null & [3] - Running yes > /dev/null &
# jobs
[4] + Running yes > /dev/null & [3] - Running yes > /dev/null &
» The second jobs command shows the remaining two yes processes.
__ 33. Now look at the sar -P ALL and the mpstat -s command outputs once again using an interval and count of two in both cases.
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-21 EXempty » Example commands and their outputs which show two busy logical processors and two
relatively idle logical processors:
# sar -P ALL 2 2
AIX lpar1 1 7 00F6BCC94C00 11/13/12
System configuration: lcpu=4 ent=0.35 mode=Uncapped
15:46:39 cpu %usr %sys %wio %idle physc %entc 0 99 1 0 0 0.44 125.9 1 0 0 0 100 0.06 17.2 2 99 1 0 0 0.44 125.0 3 0 4 0 96 0.06 17.6 - 87 1 0 12 1.00 285.8 15:46:43 0 99 1 0 0 0.44 125.8 1 0 0 0 100 0.06 17.2 2 99 1 0 0 0.44 125.0 3 0 4 0 96 0.06 17.5 - 87 1 0 12 1.00 285.6 Average 0 99 1 0 0 0.44 125.9 1 0 0 0 100 0.06 17.2 2 99 1 0 0 0.44 125.0 3 0 4 0 96 0.06 17.5 - 87 1 0 12 1.00 285.7 # mpstat -s 2 2
System configuration: lcpu=4 ent=0.3 mode=Uncapped Proc0
100.02%
cpu0 cpu1 cpu2 cpu3 37.96% 5.90% 43.92% 12.24%
Proc0
99.98%
cpu0 cpu1 cpu2 cpu3 44.04% 6.06% 43.74% 6.14%
__ 34. Once again run the lparstat command with an interval and count of two. What do you notice about the lbusy statistic now? Does this value make sense?
» Here is the lparstat command and example output which shows a logical processor percentage (lbusy) of about 50%. This makes sense because you are using only two of the four logical processors.
# lparstat 2 2
System configuration: type=Shared mode=Uncapped smt=4 lcpu=4 mem=1024MB psize=4 ent=0.35
%user %sys %wait %idle physc %entc lbusy vcsw phint - - - 87.2 0.8 0.0 12.0 1.00 286.1 50.2 359 0 87.0 1.1 0.0 11.9 1.00 285.6 50.5 365 4
__ 35. Another command you can use the monitor CPU utilization is vmstat. Run vmstat with an interval and count of two. If the output wraps and makes analysis difficult, widen your session window. Notice the two letter characters used for the column headings. Physc is pc and %entc is ec in the vmstat output.
» Example vmstat output that only shows the cpu fields on the right of the output:
# vmstat 2 2
System configuration: lcpu=4 mem=1024MB ent=0.35 cpu
---us sy id wa pc ec 87 1 12 0 1.00 285.5 93 1 6 0 1.00 286.0
__ 36. Run the iostat command from your partition and check the CPU utilization
statistics. Use an interval and count of two. What columns display information about the actual CPU consumption of the partition?
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-23 EXempty » Example command and its output:
# iostat 2 2
System configuration: lcpu=4 drives=1 ent=0.35 paths=1 vdisks=1
tty: tin tout avg-cpu: % user % sys % idle % iowait physc % entc 0.0 31.2 88.0 0.9 11.2 0.0 1.0 285.6 Disks: % tm_act Kbps tps Kb_read Kb_wrtn
hdisk0 0.0 0.0 0.0 0 0
tty: tin tout avg-cpu: % user % sys % idle % iowait physc % entc 0.0 147.0 88.6 0.7 10.6 0.0 1.0 285.9 Disks: % tm_act Kbps tps Kb_read Kb_wrtn
hdisk0 0.0 0.0 0.0 0 0
» Like lparstat, the physc column displays the number of physical processors consumed, and the %entc column displays the percentage of entitlement consumed.
__ 37. Next, start the topas program on your partition. Press the L key. Look for the physc and %entc values. Look also for the lbusy field.
» The following example shows a partial screen. Notice the physc, %entc, and the
__ 38. In the topas window, press a capital C to see cross partition data. You might have to wait a moment for information to appear. It should show all the active partitions in your managed system. If it doesn’t work on your system, just move on to the next step. When you’ve finished with topas, press the q key to quit the program.
__ 39. Kill all yes processes that are still running. Use the kill %# command where # is the number of the job. Use the jobs command to verify that there are no running jobs.
Part 4: Physical shared processor pool and micro-partitions
In the following steps, you are going to use CPU loads on the partitions to help show the impact of some of the micro-partitioning options.
__ 40. Configure your assigned LPAR to show the Available Physical Processors (app) statistic.
» Using the HMC GUI, open the Partition Properties window for your assigned LPAR. Access the Hardware tab, then the Processor tab. Click the Allow performance
information collection checkbox so that a check appears.
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-25 EXempty Important: Keep this executable running until instructed to stop it. You will have to
monitor the transaction rate output as you make changes to the system configuration.
The values in the output are the transaction rates.
» The following is an example of running spload with the transaction rate displayed every two seconds.
# cd /home/an31/ex2 # ./spload -t 2 140 143 144 142 144 ...
__ 42. Open another window to your partition. Log in as the root user and check the CPU consumption using the lparstat command.
What is the physical processor consumed value on your partition? What is the percent entitlement consumed value of the partition? What is the app value? What does it mean?
# lparstat 2 2
System configuration: type=Shared mode=Uncapped smt=4 lcpu=4 mem=1024MB psize=4 ent=0.35
%user %sys %wait %idle physc %entc lbusy app vcsw phint - - - --- 99.6 0.4 0.0 0.0 1.00 285.8 100.0 2.99 400 8 99.7 0.3 0.0 0.0 1.00 285.8 100.0 2.99 400 9
» The physc and %entc show a busy partition. The partition is using the maximum amount of entitled capacity for a partition with one virtual processor.
» The available processing units in the shared pool can be seen with the app statistic. In the example above, the value is 2.99 representing the equivalent of approximately three idle processors in the shared processor pool. You will likely see a different amount on your training system.
__ 43. Using the HMC, dynamically change the capacity entitlement of your partition to 0.8 and mark it as capped. Leave the virtual processor value at 1.
» Using the HMC GUI, select your partition, then select Dynamic Logical Partitioning >
units field, uncheck the uncapped checkbox, then click OK. The Add / Remove
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-27 EXempty __ 44. Check the processing capacity of your partition using the lparstat command with
an interval and count of two. What is the physical processor capacity consumed compared to the entitled capacity?
» The processing capacity consumed is equal to the new entitled capacity of 0.8. # lparstat 2 2
System configuration: type=Shared mode=Capped smt=4 lcpu=4 mem=1024MB psize=4 ent=0.80
%user %sys %wait %idle physc %entc lbusy app vcsw phint - - - --- 99.0 0.8 0.0 0.1 0.80 99.9 100.0 3.18 402 4 99.6 0.4 0.0 0.0 0.80 100.0 100.0 3.19 400 8
__ 45. Now, make two dynamic changes to the LPAR. Use DLPAR to change your partition back to an uncapped partition. Set the weight value to 128. Also, add one more virtual processor for a total of two.
» Using the HMC GUI, select your partition, then select Dynamic Logical Partitioning >
Processor Resources > Add or Remove. Check the uncapped box, and set the
» Note that the available system processing values on your training system will likely be different then those shown on the example screen above.
__ 46. Using the lparstat command, discover the current value of the consumed processing capacity (physc) on your partition.
» The processing capacity consumed value is now 2.0, as shown in the output of the
lpartstat command below. Note that it might be possible that your LPAR may have less than 2.0 physc. If other students are adjusting their entitled capacity and running
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-29 EXempty processes that take up a lot of available processing resources in the pool, then your
LPAR may have less than 2.0 processing units for physc.
# lparstat 2 2
System configuration: type=Shared mode=Uncapped smt=4 lcpu=8 mem=1024MB psize=4 ent=0.80
%user %sys %wait %idle physc %entc lbusy app vcsw phint - - - --- 99.8 0.2 0.0 0.0 2.00 249.9 100.0 1.99 800 16 99.8 0.2 0.0 0.0 2.00 249.9 100.0 1.99 800 10
__ 47. Did the transaction rate provided by the spload executable increase? Why or why not?
» The transaction rate increased when the number of virtual processors was increased to two. The physical capacity consumed by the logical partition can grow up to 2.0. The physical CPU capacity consumed by your partition depends also on the activity of the other partitions that consume extra CPU cycles from the shared processor pool. The transaction rate can be fluctuating or can be lower than the value shown in the example.
#./spload -t 2 284 289 285 286 287 286 285 285
__ 48. On your partition, use the mpstat command to check the number of context
switches occurring on the partition. Check the columns ilcs and vlcs (involuntary and voluntary context switches respectively).
» From the mpstat output, we can see that we have only involuntary logical context switches (ilcs). This means the partition is not ceding any idle cycles.
# mpstat -d 2
System configuration: lcpu=8 ent=0.8 mode=Uncapped
cpu cs ics bound rq push S3pull S3grd S0rd S1rd S2rd S3rd S4rd S5rd ilcs vlcs S3hrd S4hrd S5hrd 0 104 53 0 0 0 0 0 100 0 0 0 0 0 150 0 100 0 0 1 118 57 0 0 0 0 0 100 0 0 0 0 0 150 0 100 0 0 2 1 1 0 0 0 0 0 100 0 0 0 0 0 150 0 100 0 0 3 0 0 0 0 0 0 0 100 0 0 0 0 0 150 0 100 0 0 4 0 0 0 0 0 0 0 100 0 0 0 0 0 150 0 100 0 0 5 0 0 0 0 0 0 0 100 0 0 0 0 0 150 0 100 0 0 6 150 75 0 0 0 0 0 100 0 0 0 0 0 150 0 100 0 0 7 0 0 0 0 0 0 0 100 0 0 0 0 0 150 0 100 0 0 ALL 373 186 0 0 0 0 0 100 0 0 0 0 0 1200 0 100 0 0
» If simultaneous multithreading is enabled on a shared processor partition, the mpstat values for ilcs and vlcs reported for a logical processor are actually the number of context switches encountered by the virtual processor being used to run the logical processor. Since each virtual processor has four logical processors, this means the four logical processors from a single virtual processor will report the same ilcs and vlcs values. The ALL line of the mpstat output shows the total number of ilcs and vlcs for all of the virtual processors of the partition.
__ 49. Optional step: Use the nmon command to monitor CPU utilization. Run nmon then press the h key to view the nmon shortcut keys. Try out the p, c, C, and lowercase L (l) shortcut keys. See how many statistics you recognize. Use q to quit nmon when you’re finished.
__ 50. Kill the spload process.
» Example commands and their outputs:
# ps -ef | grep spload
root 4849716 7077978 493 16:22:20 pts/0 48:24 ./spload -t 2
# kill 4849716
# ps -ef | grep spload
End of exercise
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 2. Shared processors and virtual processor tuning 2-31 EXempty
Exercise review/wrap-up
This lab allowed the students to experiment with micro-partitioning configuration options and to see the impact these have on the ability of a partition to consume CPU resources from the shared processing pool.
Course materials may not be reproduced in whole or in part
© Copyright IBM Corp. 2010, 2013 Exercise 3. Configuring multiple shared processor pools and 3-1
EXempty
Exercise 3. Configuring multiple shared
processor pools and donating
dedicated processors
(with hints)
Estimated time
01:30
What this exercise is about
This exercise has three parts.
Part 1 provides the students with an opportunity to configure the multiple shared processor pools feature of the POWER6 or above systems. In this exercise, the students work with the pool ID# 0 (the default pool) and a user-defined pool.
In part 2, the students must work in teams of two. They will assign their logical partitions to the same shared processor pool. Then they will start CPU loads and examine the shared processor pool behavior. Part 3 provides the students with an opportunity to work with dedicated logical partitions running in donating mode.
What you should be able to do
After completing this exercise, you should be able to:
• Configure a user-defined shared processor pool and dynamically assign a partition to it
• Use commands to identify the LPARs assigned to the available shared processor pools
• Monitor the user-defined shared processor pool
• For a dedicated partition, activate the donating mode using the HMC or CLI
• View the changes in various AIX processor analysis tools when donating mode is enabled
• View the changes in the shared storage pool statistics when a dedicated partition is donating processor cycles
Requirements
One shared processor LPAR per student on a POWER7 system.
Instructor exercise overview
In the second and third parts of the exercise, students must work together with another student. Assign these teams before the exercise starts.