POWER7 and POWER7+ Optimization and Tuning Guide
Total Page:16
File Type:pdf, Size:1020Kb
Front cover POWER7 and POWER7+ Optimization and Tuning Guide Discover simple strategies to optimize your POWER7 environment Analyze and maximize performance with solid solutions Learn about the new POWER7+ processor Brian Hall Steve Munroe Mala Anand Francis P O’Connell Bill Buros Sergio Reyes Miso Cilimdzic Raul Silvera Hong Hua Randy Swanberg Judy Liu Brian Twichell John MacMillan Brian F Veale Sudhir Maddali Julian Wang K Madhusudanan Yaakov Yaari Bruce Mealey ibm.com/redbooks International Technical Support Organization POWER7 and POWER7+ Optimization and Tuning Guide November 2012 SG24-8079-00 Note: Before using this information and the product it supports, read the information in “Notices” on page vii. First Edition (November 2012) This edition pertains to Power Systems servers based on POWER7 and POWER7+ processor-based technology. Specific software levels and firmware levels used are noted throughout the text. © Copyright International Business Machines Corporation 2012. 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! . xiii Comments welcome. xiv Stay connected to IBM Redbooks . xiv Chapter 1. Optimization and tuning on IBM POWER7 and IBM POWER7+ . 1 1.1 Introduction . 2 1.2 Outline of this guide . 2 1.3 Conventions that are used in this guide . 4 1.4 Background . 4 1.5 Optimizing performance on POWER7 . 5 1.5.1 Lightweight tuning and optimization guidelines. 6 1.5.2 Deployment guidelines . 13 1.5.3 Deep performance optimization guidelines. 17 Chapter 2. The POWER7 processor. 21 2.1 Introduction to the POWER7 processor . 22 2.1.1 The POWER7+ processor . 23 2.2 Multi-core and multi-thread scalability. 23 2.3 Using POWER7 features . 25 2.3.1 Page sizes (4 KB, 64 KB, 16 MB, and 16 GB) . 25 2.3.2 Cache sharing. 29 2.3.3 SMT priorities . 35 2.3.4 Storage synchronization (sync, lwsync, lwarx, stwcx, and eieio) . 37 2.3.5 Vector Scalar eXtension (VSX). 39 2.3.6 Decimal floating point (DFP) . 44 2.3.7 Data prefetching using d-cache instructions and the Data Streams Control Register (DSCR) . 46 2.4 Related publications . 51 Chapter 3. The POWER Hypervisor . 55 3.1 Introduction to the POWER7 Hypervisor. 56 3.2 POWER7 virtualization . 57 3.2.1 Virtual processors . 57 3.2.2 Page table sizes for LPARs . 61 3.2.3 Placing LPAR resources to attain higher memory affinity. 61 3.2.4 Active memory expansion. 64 3.2.5 Optimizing Resource Placement – Dynamic Platform Optimizer . 65 3.3 Related publications . 65 Chapter 4. AIX . 67 4.1 AIX and system libraries . 68 4.1.1 AIX operating system-specific optimizations. 68 4.1.2 Using POWER7+ features under AIX . 83 4.2 AIX Active System Optimizer and Dynamic System Optimizer. 84 © Copyright IBM Corp. 2012. All rights reserved. iii 4.2.1 Concepts. 84 4.2.2 ASO and DSO optimizations. 86 4.2.3 Workloads . 87 4.2.4 The asoo command . 89 4.2.5 Environment variables . 89 4.2.6 Installing DSO . 91 4.2.7 Log files. 91 4.3 AIX preferred practices . 92 4.3.1 AIX preferred practices that are applicable to all Power Systems generations . 92 4.3.2 AIX preferred practices that are applicable to POWER7 . 93 4.3.3 POWER7 mid-range and high-end High Impact or Pervasive advisory . 93 4.4 Related publications . 94 Chapter 5. Linux . 97 5.1 Linux and system libraries. 98 5.1.1 Introduction . 98 5.1.2 Linux operating system-specific optimizations . 98 5.2 Related publications . 106 Chapter 6. Compilers and optimization tools for C, C++, and Fortran. 107 6.1 Compiler versions and optimization levels . 108 6.2 Advanced compiler optimization techniques . 109 6.2.1 Common prerequisites . 109 6.2.2 XL compiler family. 110 6.2.3 GCC compiler family . 112 6.3 IBM Feedback Directed Program Restructuring . 114 6.3.1 Introduction . 114 6.3.2 FDPR supported environments. 115 6.3.3 Acceptable input formats . 116 6.3.4 General operation . 116 6.3.5 Instrumentation and profiling. 117 6.3.6 Optimization . ..