Front cover IBM Power Systems Performance Guide Implementing and Optimizing
Leverages IBM Power virtualization
Helps maximize system resources
Provides sample scenarios
Dino Quintero Sebastien Chabrolles Chi Hui Chen Murali Dhandapani Talor Holloway Chandrakant Jadhav Sae Kee Kim Sijo Kurian Bharath Raj Ronan Resende Bjorn Roden Niranjan Srinivasan Richard Wale William Zanatta Zhi Zhang ibm.com/redbooks
International Technical Support Organization
IBM Power Systems Performance Guide: Implementing and Optimizing
February 2013
SG24-8080-00 Note: Before using this information and the product it supports, read the information in “Notices” on page vii.
First Edition (February 2013)
This edition applies to IBM POWER 750 FW AL730-095, VIO 2.2.2.0 & 2.2.1.4, SDDPCM 2.6.3.2 HMC v7.6.0.0, nmem version 2.0, netperf 1.0.0.0, AIX 7.1 TL2, SDDPCM 2.6.3.2, ndisk version 5.9, IBM SAN24B-4 (v6.4.2b), IBM Storwize V7000 2076-124 (6.3.0.1)
© Copyright International Business Machines Corporation 2013. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents
Notices ...... vii Trademarks ...... viii
Preface ...... ix The team who wrote this book ...... ix Now you can become a published author, too! ...... xi Comments welcome...... xii Stay connected to IBM Redbooks ...... xii
Chapter 1. IBM Power Systems and performance tuning ...... 1 1.1 Introduction ...... 2 1.2 IBM Power Systems ...... 2 1.3 Overview of this publication ...... 4 1.4 Regarding performance ...... 4
Chapter 2. Hardware implementation and LPAR planning ...... 7 2.1 Hardware migration considerations...... 8 2.2 Performance consequences for processor and memory placement...... 9 2.2.1 Power Systems and NUMA effect...... 10 2.2.2 PowerVM logical partitioning and NUMA ...... 12 2.2.3 Verifying processor memory placement ...... 14 2.2.4 Optimizing the LPAR resource placement ...... 18 2.2.5 Conclusion of processor and memory placement...... 26 2.3 Performance consequences for I/O mapping and adapter placement ...... 26 2.3.1 POWER 740 8205-E6B logical data flow ...... 27 2.3.2 POWER 740 8205-E6C logical data flow ...... 28 2.3.3 Differences between the 8205-E6B and 8205-E6C ...... 30 2.3.4 POWER 770 9117-MMC logical data flow ...... 30 2.3.5 POWER 770 9117-MMD logical data flow ...... 31 2.3.6 Expansion units...... 32 2.3.7 Conclusions ...... 33 2.4 Continuous availability with CHARM...... 33 2.4.1 Hot add or upgrade ...... 34 2.4.2 Hot repair ...... 35 2.4.3 Prepare for Hot Repair or Upgrade utility ...... 35 2.4.4 System hardware configurations...... 36 2.5 Power management ...... 37
Chapter 3. IBM Power Systems virtualization ...... 41 3.1 Optimal logical partition (LPAR) sizing ...... 42 3.2 Active Memory Expansion...... 48 3.2.1 POWER7+ compression accelerator ...... 51 3.2.2 Sizing with the active memory expansion planning tool ...... 52 3.2.3 Suitable workloads ...... 56 3.2.4 Deployment...... 57 3.2.5 Tunables ...... 60 3.2.6 Monitoring ...... 61 3.2.7 Oracle batch scenario ...... 63 3.2.8 Oracle OLTP scenario ...... 64
© Copyright IBM Corp. 2013. All rights reserved. iii 3.2.9 Using amepat to suggest the correct LPAR size...... 66 3.2.10 Expectations of AME...... 69 3.3 Active Memory Sharing (AMS) ...... 69 3.4 Active Memory Deduplication (AMD) ...... 70 3.5 Virtual I/O Server (VIOS) sizing ...... 70 3.5.1 VIOS processor assignment ...... 70 3.5.2 VIOS memory assignment ...... 72 3.5.3 Number of VIOS ...... 72 3.5.4 VIOS updates and drivers...... 73 3.6 Using Virtual SCSI, Shared Storage Pools and N-Port Virtualization ...... 74 3.6.1 Virtual SCSI ...... 75 3.6.2 Shared storage pools ...... 76 3.6.3 N_Port Virtualization ...... 79 3.6.4 Conclusion ...... 82 3.7 Optimal Shared Ethernet Adapter configuration ...... 82 3.7.1 SEA failover scenario ...... 83 3.7.2 SEA load sharing scenario ...... 84 3.7.3 NIB with an SEA scenario...... 85 3.7.4 NIB with SEA, VLANs and multiple V-switches...... 86 3.7.5 Etherchannel configuration for NIB ...... 87 3.7.6 VIO IP address assignment ...... 88 3.7.7 Adapter choices ...... 89 3.7.8 SEA conclusion...... 89 3.7.9 Measuring latency...... 90 3.7.10 Tuning the hypervisor LAN ...... 92 3.7.11 Dealing with dropped packets on the hypervisor network...... 96 3.7.12 Tunables ...... 99 3.8 PowerVM virtualization stack configuration with 10 Gbit...... 100 3.9 AIX Workload Partition implications, performance and suggestions...... 103 3.9.1 Consolidation scenario ...... 104 3.9.2 WPAR storage ...... 108 3.10 LPAR suspend and resume best practices ...... 117
Chapter 4. Optimization of an IBM AIX operating system...... 119 4.1 Processor folding, Active System Optimizer, and simultaneous multithreading . . . . . 120 4.1.1 Active System Optimizer...... 120 4.1.2 Simultaneous multithreading (SMT) ...... 120 4.1.3 Processor folding ...... 123 4.1.4 Scaled throughput...... 124 4.2 Memory ...... 125 4.2.1 AIX vmo settings ...... 126 4.2.2 Paging space ...... 128 4.2.3 One TB segment aliasing ...... 129 4.2.4 Multiple page size support ...... 138 4.3 I/O device tuning ...... 140 4.3.1 I/O chain overview ...... 140 4.3.2 Disk device tuning...... 143 4.3.3 Pbuf on AIX disk devices ...... 148 4.3.4 Multipathing drivers...... 150 4.3.5 Adapter tuning...... 150 4.4 AIX LVM and file systems ...... 157 4.4.1 Data layout ...... 157 4.4.2 LVM best practice ...... 159 iv IBM Power Systems Performance Guide: Implementing and Optimizing 4.4.3 File system best practice...... 163 4.4.4 The filemon utility ...... 176 4.4.5 Scenario with SAP and DB2 ...... 178 4.5 Network ...... 186 4.5.1 Network tuning on 10 G-E...... 186 4.5.2 Interrupt coalescing...... 189 4.5.3 10-G adapter throughput scenario ...... 191 4.5.4 Link aggregation ...... 193 4.5.5 Network latency scenario ...... 196 4.5.6 DNS and IPv4 settings ...... 198 4.5.7 Performance impact due to DNS lookups...... 199 4.5.8 TCP retransmissions...... 200 4.5.9 tcp_fastlo...... 205 4.5.10 MTU size, jumbo frames, and performance ...... 205
Chapter 5. Testing the environment ...... 207 5.1 Understand your environment...... 208 5.1.1 Operating system consistency ...... 208 5.1.2 Operating system tunable consistency ...... 209 5.1.3 Size that matters ...... 210 5.1.4 Application requirements ...... 210 5.1.5 Different workloads require different analysis ...... 211 5.1.6 Tests are valuable...... 211 5.2 Testing the environment ...... 211 5.2.1 Planning the tests ...... 211 5.2.2 The testing cycle ...... 212 5.2.3 Start and end of tests ...... 213 5.3 Testing components ...... 213 5.3.1 Testing the processor ...... 214 5.3.2 Testing the memory ...... 215 5.3.3 Testing disk storage ...... 221 5.3.4 Testing the network...... 223 5.4 Understanding processor utilization ...... 226 5.4.1 Processor utilization ...... 226 5.4.2 POWER7 processor utilization reporting...... 227 5.4.3 Small workload example ...... 230 5.4.4 Heavy workload example ...... 233 5.4.5 Processor utilization reporting in power saving modes...... 234 5.4.6 A common pitfall of shared LPAR processor utilization ...... 236 5.5 Memory utilization ...... 237 5.5.1 How much memory is free (dedicated memory partitions) ...... 237 5.5.2 Active memory sharing partition monitoring ...... 242 5.5.3 Active memory expansion partition monitoring ...... 244 5.5.4 Paging space utilization ...... 247 5.5.5 Memory size simulation with rmss ...... 249 5.5.6 Memory leaks ...... 250 5.6 Disk storage bottleneck identification ...... 251 5.6.1 Performance metrics...... 251 5.6.2 Additional workload and performance implications...... 252 5.6.3 Operating system - AIX...... 253 5.6.4 Virtual I/O Server ...... 255 5.6.5 SAN switch ...... 256 5.6.6 External storage ...... 258
Contents v 5.7 Network utilization ...... 259 5.7.1 Network statistics ...... 260 5.7.2 Network buffers...... 263 5.7.3 Virtual I/O Server networking monitoring ...... 264 5.7.4 AIX client network monitoring ...... 268 5.8 Performance analysis at the CEC ...... 268 5.9 VIOS performance advisor tool and the part command ...... 271 5.9.1 Running the VIOS performance advisor in monitoring mode ...... 271 5.9.2 Running the VIOS performance advisor in post processing mode ...... 271 5.9.3 Viewing the report ...... 273 5.10 Workload management ...... 275
Chapter 6. Application optimization ...... 279 6.1 Optimizing applications with AIX features ...... 280 6.1.1 Improving application memory affinity with AIX RSETs ...... 280 6.1.2 IBM AIX Dynamic System Optimizer...... 288 6.2 Application side tuning ...... 292 6.2.1 C/C++ applications ...... 292 6.2.2 Java applications ...... 305 6.2.3 Java Performance Advisor ...... 305 6.3 IBM Java Support Assistant ...... 308 6.3.1 IBM Monitoring and Diagnostic Tools for Java - Memory Analyzer ...... 308 6.3.2 Other useful performance advisors and analyzers ...... 311
Appendix A. Performance monitoring tools and what they are telling us...... 315 NMON ...... 316 lpar2rrd...... 316 Trace tools and PerfPMR...... 316 AIX system trace basics ...... 317 Using the truss command ...... 325 Real case studies using tracing facilities...... 327 PerfPMR ...... 334 The hpmstat and hpmcount utilities ...... 334
Appendix B. New commands and new commands flags ...... 337 amepat ...... 338 lsconf ...... 339
Appendix C. Workloads ...... 341 IBM WebSphere Message Broker ...... 342 Oracle SwingBench ...... 342 Self-developed C/C++ application ...... 343 1TB segment aliasing demo program illustration ...... 343 “latency” test for RSET, ASO and DSO demo program illustration...... 347
Related publications ...... 353 IBM Redbooks ...... 353 Online resources ...... 353 Help from IBM ...... 353
vi IBM Power Systems Performance Guide: Implementing and Optimizing Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A.
The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in any manner serve as an endorsement of those websites. The materials at those websites are not part of the materials for this IBM product and use of those websites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.
Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurements may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment.
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.
This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.
© Copyright IBM Corp. 2013. All rights reserved. vii Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. These and other IBM trademarked terms are marked on their first occurrence in this information with the appropriate symbol (® or ™), indicating US registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at http://www.ibm.com/legal/copytrade.shtml
The following terms are trademarks of the International Business Machines Corporation in the United States, other countries, or both:
Active Memory™ Informix® Rational® AIX® Jazz™ Redbooks® alphaWorks® Micro-Partitioning® Redbooks (logo) ® DB2® Power Systems™ RS/6000® developerWorks® POWER6+™ Storwize® DS6000™ POWER6® System p® DS8000® POWER7+™ System Storage® Easy Tier® POWER7® SystemMirror® EnergyScale™ PowerHA® Tivoli® eServer™ PowerPC® WebSphere® FDPR® PowerVM® XIV® HACMP™ POWER® z/VM® IBM Systems Director Active Energy pSeries® zSeries® Manager™ PureFlex™ IBM® PureSystems™
The following terms are trademarks of other companies:
Linux is a trademark of Linus Torvalds in the United States, other countries, or both.
Microsoft, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.
Java, and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Other company, product, or service names may be trademarks or service marks of others.
viii IBM Power Systems Performance Guide: Implementing and Optimizing Preface
This IBM® Redbooks® publication addresses performance tuning topics to help leverage the virtualization strengths of the POWER® platform to solve clients’ system resource utilization challenges, and maximize system throughput and capacity. We examine the performance monitoring tools, utilities, documentation, and other resources available to help technical teams provide optimized business solutions and support for applications running on IBM POWER systems’ virtualized environments.
The book offers application performance examples deployed on IBM Power Systems™ utilizing performance monitoring tools to leverage the comprehensive set of POWER virtualization features: Logical Partitions (LPARs), micro-partitioning, active memory sharing, workload partitions, and more. We provide a well-defined and documented performance tuning model in a POWER system virtualized environment to help you plan a foundation for scaling, capacity, and optimization.
This book targets technical professionals (technical consultants, technical support staff, IT Architects, and IT Specialists) responsible for providing solutions and support on IBM POWER systems, including performance tuning.
The team who wrote this book
This book was produced by a team of specialists from around the world working at the International Technical Support Organization, Poughkeepsie Center.
Dino Quintero is an IBM Senior Certified IT Specialist with the ITSO in Poughkeepsie, NY. His areas of knowledge include enterprise continuous availability, enterprise systems management, system virtualization, and technical computing and clustering solutions. He is currently an Open Group Distinguished IT Specialist. Dino holds a Master of Computing Information Systems degree and a Bachelor of Science degree in Computer Science from Marist College.
Sebastien Chabrolles is an IT Specialist at the Product and Solution Support Center in Montpellier, France. His main activity is to perform pre-sales customer benchmarks on Power Systems in the European Benchmark Center. He graduated from a Computer Engineering school (ESIEA) and has 10 years of experience in AIX® and Power Systems. His areas of expertise include IBM Power Systems, PowerVM®, AIX, and Linux.
Chi Hui Chen is a Senior IT Specialist at the IBM Advanced Technical Skills (ATS) team in China. He has more than eight years of experience in IBM Power Systems. He provides AIX support to GCG ISVs in the areas of application design, system performance tuning, problem determination, and application benchmarks. He holds a degree in Computer Science from University of Science and Technology of China.
Murali Dhandapani is a Certified IT Specialist in Systems Management in IBM India. He is working for the IBM India Software Lab Operations team, where he is a technical lead for IBM Rational® Jazz™ products infrastructure, high availability, and disaster recovery deployment. His areas of expertise include Linux, AIX, IBM POWER virtualization, PowerHA® SystemMirror®, System Management, and Rational tools. Murali has a Master of Computer Science degree. He is an IBM developerWorks® Contributing Author, IBM Certified Specialist
© Copyright IBM Corp. 2013. All rights reserved. ix in System p® administration and an IBM eServer™ Certified Systems Expert - pSeries® High Availability Cluster Multi-Processing (IBM HACMP™).
Talor Holloway is a senior technical consultant working for Advent One, an IBM business partner in Melbourne, Australia. He has worked extensively with AIX and Power Systems and System p for over seven years. His areas of expertise include AIX, NIM, PowerHA, PowerVM, IBM Storage, and IBM Tivoli® Storage Manager.
Chandrakant Jadhav is an IT Specialist working at IBM India. He is working for the IBM India Software Lab Operations team. He has over five years of experience in System P, Power Virtualization. His areas of expertise include AIX, Linux, NIM, PowerVM, IBM Storage, and IBM Tivoli Storage Manager.
Sae Kee Kim is a Senior Engineer at Samsung SDS in Korea. He has 13 years of experience in AIX Administration and five years of Quality Control in the ISO20000 field. He holds a Bachelor's degree in Electronic Engineering from Dankook University in Korea. His areas of expertise include IBM Power Systems and IBM AIX administration.
Sijo Kurian is a Project Manager in IBM Software Labs in India. He has seven years of experience in AIX and Power Systems. He holds a Masters degree in Computer Science. He is an IBM Certified Expert in AIX, HACMP and Virtualization technologies.His areas of expertise include IBM Power Systems, AIX, PowerVM, and PowerHA.
Bharath Raj is a Performance Architect for Enterprise Solutions from Bangalore, India. He works with the software group and has over five years of experience in the performance engineering of IBM cross-brand products, mainly in WebSphere® Application Server integration areas. He holds a Bachelor of Engineering degree from the University of RVCE, Bangalore, India. His areas of expertise include performance benchmarking IBM products, end-to-end performance engineering of enterprise solutions, performance architecting, designing solutions, and sizing capacity for solutions with IBM product components. He wrote many articles that pertain to performance engineering in developerWorks and in international science journals.
Ronan Resende is a System Analyst at Banco do Brasil in Brazil. He has 10 years of experience with Linux and three years of experience in IBM Power Systems. His areas of expertise include IBM AIX, Linux in pSeries, and zSeries® (z/VM®).
Bjorn Roden is a Systems Architect for IBM STG Lab Services and is part of the IBM PowerCare Teams working with High End Enterprise IBM Power Systems for clients. He has co-authored seven other IBM Redbooks publications, been speaker at IBM Technical events. Bjorn holds MSc, BSc and DiplSSc in Informatics from Lund University in Sweden, and BCSc and DiplCSc in Computer Science from Malmo University in Sweden. He also has certifications as IBM Certified Infrastructure Systems Architect (ISA), Certified TOGAF Architect, Certified PRINCE2 Project Manager, and Certified IBM Advanced Technical Expert, IBM Specialist and IBM Technical Leader since 1994. He has worked with designing, planning, implementing, programming, and assessing high availability, resiliency, security, and high performance systems and solutions for Power/AIX since AIX v3.1 1990.
Niranjan Srinivasan is a software engineer with the client enablement and systems assurance team.
Richard Wale is a Senior IT Specialist working at the IBM Hursley Lab, UK. He holds a B.Sc. (Hons) degree in Computer Science from Portsmouth University, England. He has over 12 years of experience supporting AIX. His areas of expertise include IBM Power Systems, PowerVM, AIX, and IBM i.
x IBM Power Systems Performance Guide: Implementing and Optimizing William Zanatta is an IT Specialist working in the Strategic Outsourcing Delivery at IBM Brazil. He holds a B.S. degree in Computer Engineering from Universidade Metodista de Sao Paulo, Brazil. He has over 10 years of experience in supporting different UNIX platforms, and his areas of expertise include IBM Power Systems, PowerVM, PowerHA, AIX and Linux.
Zhi Zhang is an Advisory Software Engineer in IBM China. He has more than 10 years of experience in the IT field. He is a certified DB2® DBA. His areas of expertise include IBM AIX, DB2 and WebSphere Application Performance Tuning. He is currently working in the IBM software group as performance QA.
Thanks to the following people for their contributions to this project:
Ella Buslovich, Richard Conway, Octavian Lascu, Ann Lund, Alfred Schwab, and Scott Vetter International Technical Support Organization, Poughkeepsie Center
Gordon McPheeters, Barry Knapp, Bob Maher and Barry Spielberg IBM Poughkeepsie
Mark McConaughy, David Sheffield, Khalid Filali-Adib, Rene R Martinez, Sungjin Yook, Vishal C Aslot, Bruce Mealey, Jay Kruemcke, Nikhil Hedge, Camilla McWilliams, Calvin Sze, and Jim Czenkusch IBM Austin
Stuart Z Jacobs, Karl Huppler, Pete Heyrman, Ed Prosser IBM Rochester
Linda Flanders IBM Beaverton
Rob Convery, Tim Dunn and David Gorman IBM Hursley
Nigel Griffiths and Gareth Coates IBM UK
Yaoqing Gao IBM Canada
Now you can become a published author, too!
Here’s an opportunity to spotlight your skills, grow your career, and become a published author—all at the same time! Join an ITSO residency project and help write a book in your area of expertise, while honing your experience using leading-edge technologies. Your efforts will help to increase product acceptance and customer satisfaction, as you expand your network of technical contacts and relationships. Residencies run from two to six weeks in length, and you can participate either in person or as a remote resident working from your home base.
Find out more about the residency program, browse the residency index, and apply online at: ibm.com/redbooks/residencies.html
Preface xi Comments welcome
Your comments are important to us!
We want our books to be as helpful as possible. Send us your comments about this book or other IBM Redbooks publications in one of the following ways: Use the online Contact us review Redbooks form found at: ibm.com/redbooks Send your comments in an email to: [email protected] Mail your comments to: IBM Corporation, International Technical Support Organization Dept. HYTD Mail Station P099 2455 South Road Poughkeepsie, NY 12601-5400
Stay connected to IBM Redbooks