Performance Management Guide
Total Page:16
File Type:pdf, Size:1020Kb
Bull AIX 5L Performance Management Guide AIX ORDER REFERENCE 86 A2 32EF 02 Bull AIX 5L Performance Management Guide AIX Software September 2002 BULL CEDOC 357 AVENUE PATTON B.P.20845 49008 ANGERS CEDEX 01 FRANCE ORDER REFERENCE 86 A2 32EF 02 The following copyright notice protects this book under the Copyright laws of the United States of America and other countries which prohibit such actions as, but not limited to, copying, distributing, modifying, and making derivative works. Copyright Bull S.A. 1992, 2002 Printed in France Suggestions and criticisms concerning the form, content, and presentation of this book are invited. A form is provided at the end of this book for this purpose. To order additional copies of this book or other Bull Technical Publications, you are invited to use the Ordering Form also provided at the end of this book. Trademarks and Acknowledgements We acknowledge the right of proprietors of trademarks mentioned in this book. AIXR is a registered trademark of International Business Machines Corporation, and is being used under licence. UNIX is a registered trademark in the United States of America and other countries licensed exclusively through the Open Group. The information in this document is subject to change without notice. Groupe Bull will not be liable for errors contained herein, or for incidental or consequential damages in connection with the use of this material. Contents About This Book ................................vii Who Should Use This Book .............................vii Highlighting ...................................vii Case-Sensitivity in AIX...............................vii ISO 9000 ...................................vii Related Publications ...............................vii Chapter 1. Tuning Enhancements for AIX 5.2 ......................1 AIX Kernel Tuning Parameter Modifications .......................1 Modifications to vmtune and schedtune .........................1 Enhancements to no and nfso ............................2 AIX 5.2 Migration Installation and Compatibility Mode....................2 System Recovery Procedures ............................3 Chapter 2. Performance Concepts ..........................5 How Fast is That Computer?.............................5 Understanding the Workload .............................5 Program Execution Dynamics ............................6 System Dynamics ................................10 Introducing the Performance-Tuning Process ......................11 Performance Benchmarking.............................15 Related Information................................16 Chapter 3. Resource Management Overview .....................19 Performance Overview of the processor Scheduler ....................19 Performance Overview of the Virtual Memory Manager (VMM) ................25 Performance Overview of Fixed-Disk Storage Management .................33 Support for Pinned Memory.............................36 Large Page Support ...............................37 Chapter 4. Introduction to Multiprocessing ......................39 Symmetrical Multiprocessor (SMP) Concepts and Architecture ................39 SMP Performance Issues .............................45 SMP Workloads .................................46 SMP Thread Scheduling ..............................49 Thread Tuning .................................51 SMP Tools ...................................55 Chapter 5. Planning and Implementing for Performance .................63 Identifying the Components of the Workload ......................63 Documenting Performance Requirements .......................64 Estimating the Resource Requirements of the Workload ..................64 Designing and Implementing Efficient Programs .....................70 Using Performance-Related Installation Guidelines ....................78 Chapter 6. System Monitoring and Initial Performance Diagnosis .............83 The Case for Continuous Performance Monitoring ....................83 Using the vmstat, iostat, netstat, and sar Commands ...................83 Using the topas Monitor ..............................85 Using the Performance Diagnostic Tool ........................88 Using the Performance Toolbox ...........................88 Determining the Kind of Performance Problem Reported ..................90 Identifying the Performance-Limiting Resource ......................92 © Copyright IBM Corp. 1997, 2002 iii Managing Workload ...............................97 Chapter 7. Monitoring and Tuning CPU Use ......................99 Monitoring CPU Use ...............................99 Using the time Command to Measure CPU Use.....................106 Identifying CPU-Intensive Programs .........................108 Using the tprof Program to Analyze Programs for CPU Use ................110 Using the pprof Command to Measure CPU usage of Kernel Threads.............117 Detecting Instruction Emulation with the emstat Tool ...................119 Detecting Alignment Exceptions with the alstat Tool ...................121 Restructuring Executable Programs with the fdpr Program .................121 Controlling Contention for the CPU .........................123 CPU-Efficient User ID Administration (The mkpasswd Command) ..............129 Chapter 8. Monitoring and Tuning Memory Use ....................131 Determining How Much Memory Is Being Used .....................131 Finding Memory-Leaking Programs .........................144 Assessing Memory Requirements Through the rmss Command ...............145 Tuning VMM Memory Load Control with the schedtune Command ..............151 Tuning VMM Page Replacement with the vmtune Command ................155 Tuning Paging-Space Thresholds ..........................160 Choosing a Page Space Allocation Method ......................161 Using Shared Memory ..............................162 Using AIX Memory Affinity Support..........................163 Chapter 9. File System, Logical Volume, and Disk I/O Performance ............165 Monitoring Disk I/O ...............................165 Guidelines for Tuning File Systems .........................183 Changing File System Attributes that Affect Performance .................190 Changing Logical Volume Attributes That Affect Performance ................192 Physical Volume Considerations ..........................195 Volume Group Recommendations ..........................195 Reorganizing Logical Volumes ...........................196 Reorganizing File Systems ............................197 Reorganizing File System Log and Log Logical Volumes .................199 Tuning with vmtune ...............................200 Using Disk-I/O Pacing ..............................204 Tuning Logical Volume Striping ...........................206 Tuning Asynchronous Disk I/O ...........................209 Tuning Direct I/O ................................210 Using Raw Disk I/O ...............................211 Using sync/fsync Calls ..............................212 Setting SCSI-Adapter and Disk-Device Queue Limits ...................212 Expanding the Configuration ............................213 Using RAID ..................................213 Using SSA ..................................216 Using Fast Write Cache .............................217 Chapter 10. Monitoring and Tuning Communications I/O Use ..............219 UDP and TCP/IP Performance Overview .......................219 Analyzing Network Performance ..........................230 Tuning TCP and UDP Performance .........................256 Tuning mbuf Pool Performance ...........................274 Tuning Asynchronous Connections for High-Speed Transfers ................276 Tuning Name Resolution .............................277 Improving telnetd/rlogind Performance ........................278 iv Performance Management Guide Tuning the SP Network ..............................278 Chapter 11. Monitoring and Tuning NFS Use .....................283 NFS Overview .................................283 Analyzing NFS Performance ............................287 Tuning for NFS Performance ............................294 Chapter 12. Monitoring and Tuning Java ......................309 What is Java? .................................309 Why Java? ..................................309 Java Performance Guidelines ...........................309 Monitoring Java ................................310 Tuning Java ..................................310 Chapter 13. Analyzing Performance with the Trace Facility ...............313 Understanding the Trace Facility ..........................313 Example of Trace Facility Use ...........................315 Starting and Controlling Trace from the Command Line ..................317 Starting and Controlling Trace from a Program .....................318 Using the trcrpt Command to Format a Report .....................318 Adding New Trace Events .............................320 Chapter 14. Using Performance Diagnostic Tool (PDT) .................325 Structure of PDT ................................325 Scope of PDT Analysis ..............................326 Analyzing the PDT Report .............................327 Installing and Enabling PDT ............................330 Customizing PDT ................................330 Responding to PDT Report Messages ........................336 Chapter 15. Reporting Performance Problems ....................343 Measuring the Baseline ..............................343 What is a Performance Problem ..........................344 Performance Problem Description ..........................344 Reporting a Performance Problem ..........................344