Sei sulla pagina 1di 314
IBM Certification Study Guide AIX Performance and System Tuning Thomas C. Cederlöf André de Klerk
IBM Certification Study Guide AIX Performance and System Tuning Thomas C. Cederlöf André de Klerk

IBM Certification Study Guide AIX Performance and System Tuning

Thomas C. Cederlöf André de Klerk Thomas Herlin Tomasz Ostaszewski
Thomas C. Cederlöf
André de Klerk
Thomas Herlin
Tomasz Ostaszewski
André de Klerk Thomas Herlin Tomasz Ostaszewski Developed specifically for the purpose of preparing for AIX

Developed specifically for the purpose of preparing for AIX certification

for the purpose of preparing for AIX certification Makes an excellent companion to classroom education For

Makes an excellent companion to classroom education

certification Makes an excellent companion to classroom education For experienced AIX professionals ibm.com /redbooks

For experienced AIX professionals

certification Makes an excellent companion to classroom education For experienced AIX professionals ibm.com /redbooks
SG24-6184-00 International Technical Support Organization IBM Certification Study Guide AIX Performance and System Tuning

SG24-6184-00

International Technical Support Organization

IBM Certification Study Guide AIX Performance and System Tuning

December 2000

Take Note!

Before using this information and the product it supports, be sure to read the general information in Appendix D, “Special notices” on page 265.

First Edition (December 2000)

This edition applies to AIX Version 4.3 (5765-C34) and subsequent releases running on an RS/6000 or pSeries server.

Comments may be addressed to:

IBM Corporation, International Technical Support Organization Dept. JN9B Building 003 Internal Zip 2834 11400 Burnet Road Austin, Texas 78758-3493

When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you.

© Copyright International Business Machines Corporation 2000.

Note to U.S Government Users – Documentation related to restricted rights – Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp.

All rights reserved.

Contents

Figures

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.ix

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.xi

. The team that wrote this

Preface .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.xiii

xiv

Comments

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

xv

Chapter 1. Certification overview

 

1

1.1 IBM Certified Advanced Technical Expert - RS/6000 AIX

 

1

1.1.1 Required prerequisite

 

.1

1.1.2 Recommended prerequisite

 

1

1.1.3 Registration for the certification

 

1

1.1.4 Core requirement (select three of the following tests)

 

2

1.2 Certification education courses

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 16

1.3 Education on CD-ROM: IBM AIX Essentials

 

17

Chapter 2.

Performance tuning - getting started

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 19

2.1 Introduction to

concepts

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 19

2.2 CPU performance overview

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 21

2.3 Memory performance

 

27

2.4 Disk I/O performance

35

2.5 Network performance overview

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 42

2.6 Summary

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

45

2.7 Quiz .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

46

2.7.1

Answers

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

46

Chapter 3. CPU and memory performance monitoring tools

 

47

3.1 The sar command

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

47

3.1.1

Examples of using the sar command

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 47

3.1.2

The sar command summary

 

51

3.1.3

The sadc command

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 59

3.1.4

The sa1 and sa2

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 59

3.2 The

vmstat command

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 60

3.3 The ps command

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 68

3.3.1 Use of the ps command in a CPU usage study

 

69

3.3.2 Use of the ps command in a memory usage study

 

.

.

.

.

.

.

.

.

.

.

. 71

3.4 The tprof command

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 73

3.4.1

Using the tprof general report

 

74

3.4.2

Using tprof on a program

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

76

The

3.5 svmon

command .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 77

© Copyright IBM Corp. 2000

iii

3.5.1

The svmon global

report

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 77

3.5.2

The svmon user report

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 80

3.5.3

The svmon process report

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 83

3.5.4

The svmon segment report .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 85

3.5.5

The svmon detailed segment report

 

88

3.5.6

The svmon command report

 

90

3.5.7

The svmon Workload Manager class report

 

92

3.5.8

The svmon command

 

94

3.6 The

topas command

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 97

3.7 The

emstat

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

100

3.8 Quiz .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 102

3.8.1

Answers

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 106

3.9 Exercises

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

106

Chapter 4.

Disk I/O performance monitoring

 

109

4.1 Overview

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 109

4.2 iostat command

The

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

110

4.2.1

Historical disk

I/O .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

112

4.2.2

TTY and CPU utilization report

 

113

4.2.3

The iostat command on SMP systems

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 115

4.2.4

Disk utilization report

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 115

4.3 lockstat command .

The

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

117

4.4 LVM performance analysis using lslv

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

120

4.4.1 Logical volume attributes

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

120

4.4.2 Logical volume fragmentation

 

124

4.4.3 Logical volume allocation

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

125

4.4.4 Highest LVM performance

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

127

4.5 LVM and file system monitoring

 

127

4.5.1 The filemon command

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

127

4.5.2 Report

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 129

4.5.3 Typical AIX system

 

135

4.6 File system performance

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

136

4.6.1 AIX file system organization

 

136

4.6.2 The fileplace

command.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

137

4.6.3 File system de-fragmentation

 

140

4.7 General recommendations on I/O performance

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 140

4.8 Overhead of using performance tools

 

142

4.9 Command summary

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

143

4.9.1 The filemon command

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

143

4.9.2 The fileplace

command.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

144

4.9.3 The lslv command

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

144

4.10

Quiz .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

145

4.10.1

Answers .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 149

iv IBM Certification Study Guide AIX Performance and System Tuning

4.11

Exercises

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 149

Chapter 5.

Network performance tools

 

151

5.1 Overview

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 151

5.2 Adapter transmit and receive queue tuning

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 153

5.3 Protocols tuning

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

155

5.4 Network performance monitoring tools

 

157

5.4.1 The vmstat command .

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 157

5.4.2 The ping

command

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

158

5.4.3 The traceroute command

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. 158

5.4.4 The netstat

command

 

.

.

.

.

.

.

.