search for books and compare prices
Tables of Contents for Linux Performance Tuning and Capacity Planning
Chapter/Section Title
Page #
Page Count
Introduction
1
2
Part I Introduction and Overview
3
40
Overview of Performance Tuning
5
10
What Is Performance Tuning?
6
1
Why Consider Tuning?
7
1
What Can I Tune?
7
1
Defining Performance-Tuning Objectives
8
1
Identifying Critical Resources
9
1
Minimizing Critical Resource Requirements
9
1
Reflecting Priorities in Resource Allocations
10
1
Methodology
11
1
The Beater Box Theory
11
1
Local Documentation
11
1
Under the Gun Versus Proactive Mode
11
1
Roles of the Performance Analyst
12
1
The Relationship Between Users and Performance
13
1
Summary
13
2
Aspects of Performance Tuning
15
28
Operating System Structure
16
2
Kernel Architecture
18
5
CPU Scheduling
18
2
Program Loading
20
2
Process and Thread Management
22
1
Virtual Memory Overview
23
2
Filesystem Caching
25
1
I/O Overview
25
2
I/O Performance Management
26
1
Layers for File I/O
26
1
NFS Performance
27
1
Methodology
28
3
Assessment
28
1
System Configuration
28
1
Application Configuration
29
1
Performance Expectations
29
1
Known Peak Periods
29
1
Sudden Changes
30
1
Duration of the Problem
30
1
Understanding the Options
31
1
Measurements
31
2
Queue Versus Load Average
31
1
Per-process CPU Metrics
32
1
Metric Documentation
32
1
Metric Accuracy
33
1
Qualitative Versus Quantitative Measurements
33
1
Interpretation and Analysis
33
5
Compute Versus I/O-Intensive
33
1
Application Architecture
33
1
Speed of CPU
34
1
Type of Disks
34
1
Managing Disk Space
35
1
Identifying Bottlenecks
36
2
Tuning or Upgrade?
38
2
Determine Particular Bottlenecks
38
1
Determine a Simple Test for Measuring
38
1
Do Not Tune Randomly
38
1
Look for Common Causes
39
1
Prioritize Goals
40
1
Understand the Limits of the Architecture
40
1
Risk Evaluation and Tuning
40
1
Different Levels of Risks
40
1
Kernel Changes
40
1
Service Changes
41
1
System Reconfiguration
41
1
Time Versus Benefits
41
1
Conclusion
41
2
Part II Performance Tuning Tools
43
40
Popular Unix Performance-Monitoring Tools for Linux
45
24
The Scope of These Tools and the Chapter
46
1
Interpreting Results and Other Notes
47
1
All-Purpose Tools
47
6
The top Utility
47
3
vmstat
50
1
xload and xosview
51
2
Uptime
53
1
Benchmarking Your Disks with Bonnie
53
2
Other Tools
55
6
ps
55
5
free
60
1
time
61
1
Some Network-Monitoring Tools
61
4
ping
62
1
traceroute
63
1
Using the Sniffer tcpdump
64
1
ntop
65
2
Summary
67
2
Linux-Specific Tools
69
14
The sysstat for Linux Distribution
70
4
iostat for Linux
71
2
Additional iostat Options
73
1
ktop and gtop
74
5
Using the/proc Filesystem to Monitor System Activities
79
3
Other Free Utilities
82
1
Summary
82
1
Part III Performance Monitoring Techniques
83
70
Apparent and Nonapparent Bottlenecks
85
14
There Is Always a Bottleneck
86
1
User Expectations
86
1
Performance Agreements
86
1
Tuning CPU Bottlenecks
87
2
Hardware Solutions
87
1
Software Solutions
88
1
General Application Tuning
89
1
Specific Clustering Solutions
89
1
Beowulf
89
1
MOSIX
90
1
Tuning CPU-Related Parameters in the Kernel
90
1
Tuning CPU-Related Parameters in Software
91
1
Memory Bottlenecks
92
5
Hardware Factors
92
3
Factors to Keep in Mind
95
2
Conclusion
97
2
X Window Performance
99
20
Analyzing the X Server's Performance
100
4
Understanding x11 perf
100
2
Using x11perf
102
2
Measuring the Results
104
1
Tuning the X Server for Local Use
104
11
Increase the Server's Priority
105
2
Verify the Server Configuration File
107
1
Decrease Color Depth or Display Resolution
107
1
Disable Unused Modules and Server Extensions
108
2
Use Chipset-Specific Configuration Options
110
1
Rebuild the Server
110
1
Load Fewer Fonts
111
2
Use a Font Server
113
1
Upgrade the Server
113
1
Upgrade the Hardware
114
1
Tuning X Desktop Performance
115
3
About Those ``Desktop Environments...''
115
1
Improving X Client Performance
116
2
Summary
118
1
Network Performance
119
34
Overview of Network-Performance Issues
120
1
Hardware Methods
120
2
Application Network Tuning
122
1
Examples: Database Work
122
1
HTTP Speed-ups
123
1
The Value of Knowing Your Domain
123
1
Tuning Samba
124
6
Filesystem Buffers
125
1
Fake Oplocks
126
1
Caching getwd Calls
126
1
Hiding/Vetoing Files
127
1
Considering Packet Transmit Size
127
1
Raw Reads and Writes
128
1
Socket Options
129
1
Write Cache Size
129
1
Tuning NFS
130
2
Tuning NIS
132
1
Making Kernel Changes to Improve Performance
132
5
Device Backlogs
133
1
Disabling ICMP
133
1
Local Port Range
133
1
Path Discovery
134
1
Fragmentation Thresholds
134
1
ECN
134
1
Keepalive Times
135
1
tcp_sack
135
1
Urgent Pointers
136
1
Window Scaling
136
1
Large Windows
136
1
TCP Timestamps
136
1
Bonding
137
4
Enforced Bandwidth Limitations
141
2
New and Interesting Capabilities
143
2
TUX
143
1
Zero-Copy Networking
144
1
High Availability/Load Balancing
145
2
Tools
147
5
Ethereal
148
1
tcpdump
149
1
Netwatch
149
1
SNMP
150
1
Testing Tools
150
2
Conclusion
152
1
Part IV Tuning and Performance Mechanics
153
80
Job Control
155
8
Background Mode
156
1
The at Facilities
157
1
Using at
157
1
Using batch
158
1
Using cron
158
2
The cron Format
159
1
nice and renice
160
1
The nice Command
160
1
The renice Command
161
1
How nice Comes into Play
161
1
Summary
161
2
The Linux Kernel
163
32
Why Alter the Kernel?
165
1
Modular and Monolithic Kernels
165
4
Tuning via the/proc Interface
169
3
Data-Presentation Areas
172
2
Modifiable Parameters
172
1
Filesystem Limits
172
1
Kernel Parameters
173
1
Network Manipulation
174
1
Virtual Memory
175
3
Recompiling the Kernel
178
16
Getting the Sources
178
2
Configuring the Kernel
180
3
make dep, make bz Image, and Similar Commands
183
1
Installing the New Kernel
184
3
Choosing the Right Drivers
187
1
Changing Driver Configuration
188
1
Patching Your Kernel
188
5
Trapping Kernel Oopses
193
1
Summary
194
1
Disk Configurations for Performance
195
16
Managing Disk Space
196
6
GFS/SAN
196
2
LVM
198
4
Disk I/O Utilization
202
2
Swap Strategies
204
1
Using RAID
204
1
Software RAID
205
3
Understanding the Limitations of the Bus
207
1
Alternative Solutions
208
1
Summary
209
2
Linux and Memory Management
211
12
Determining Physical RAM Requirements
212
2
Single-User Systems
212
1
Multiuser Systems
213
1
RAM Requirements
214
1
Getting Additional RAM
214
1
Swap Space
214
4
Calculating Swap Space
215
1
Assigning Swap Space
215
1
Managing Swap Space
216
1
Configuring Swap Space
216
2
Swap Priorities
218
1
Swap Partitions Versus Swap Files
218
2
Swap Files
219
1
Swap Partitions
219
1
Advanced Topics
220
2
Industry Guidelines
220
1
Application Effects and Memory Operations
221
1
The Crash Test Dummy
221
1
Summary
222
1
Linux System Services
223
10
A ``Typical'' inetd.conf File
224
1
The Internet Server inetd
224
3
TCP Wrappers
227
1
The rc.d Scripts
228
3
The Role of Other Files in /etc/rc.d
230
1
Starting, Stopping, and Restarting
231
1
Summary
231
2
Part V Capacity Planning
233
46
Thinking About Capacity Planning
235
26
What Is Capacity Planning?
236
5
Never a Quick Fix
237
1
Having a Global View of Requirements
238
1
A Twofold Approach
239
1
Grounding Planning Reliability in the Real World
240
1
Classic System Requirements
241
1
Application-Specific Requirements
241
4
Actual Versus Potential Needs
242
2
Pay Attention to Requirements and Administrators
244
1
Structured Approaches
245
1
Thinking Outside the Box
246
1
The Interrelationship of Performance Tuning and Capacity Planning
247
1
Planning May Preempt the Need for Tuning
247
1
Predictive Analysis Versus Actual Results
248
5
The Never-Ending Need for Data
249
1
Quality Versus Quantity
249
1
Ways of Gathering Relevant Data
250
1
Data Storage: When Enough Is Enough
251
1
Tuning the Data Collection Process
252
1
How to Evaluate Your Need for Capacity Planning
253
7
Large Enterprise
253
2
Medium Business
255
2
Small Technical Outfits
257
3
Summary
260
1
Methods for Capacity Planning
261
18
A Blueprint for Capacity Planning
262
1
General Principles
262
3
Gathering Requirements
262
1
Gathering Statistics
262
1
Achieving a Global View
263
1
Using Upcoming Technologies
263
2
Identifying the Way Forward
265
1
Software and Hardware Requirements
265
3
Determining Planned Component Update Points
266
1
Handling Configuration Management Migration
267
1
How to Develop a Structure
268
2
Determining Who Is Involved
268
1
Creating the Group
268
1
Outsourcing
269
1
Ensuring Flexibility in the Future
270
5
Building a Contract
270
1
Handling Project Management
270
1
Navigating Political Aspects
271
1
Knowing Your Application Needs
272
1
Commerical Products
273
1
Network Analysis Tools
273
1
Pollers
274
1
Example
275
2
Summary
277
2
Part VI Case Studies
279
16
Case Studies: Web Server Performance
281
10
Web Server Performance
282
1
The Symptoms
282
1
The Quick Checks
282
1
Some Quick Guesses
282
1
The Web Server Culprit
283
1
Possible Solutions
283
1
A Classic Memory Problem
283
1
The System Configuration
283
1
The Beginnings of a Problem
283
1
Detailed Analysis Says
284
1
Quick Solutions
284
1
Changing the Disk Configuration (s)
284
1
Increasing Network Latency
284
1
A Day in the Life of an FTP Server
285
1
The First Look
285
1
And the Answer Is
285
1
Another Memory Problem
285
2
The Symptoms
285
1
Tracing the Problem
285
1
Finding a Solution
286
1
Conclusion
287
1
Linux Virtual Server (LVS) Walkthrough
287
2
Concept
287
1
Assumptions
287
1
Configuration
288
1
Summary
289
2
Where to Go From Here
291
4
World Wide Web Resources
292
1
Magazines, Journals, and Newsletters
293
1
Newsgroups and Mailing Lists
293
1
Summary
294
1
Index
295