Synopses & Reviews
System Performance Tuning answers one of the most fundamental questions you can ask about your UNIX-based computer: How can I get it to do more work without buying more hardware? Anyone who has ever used a computer has wished that the system was faster, particularly at times when it was under heavy load.If your system gets sluggish when you start a big job, if it feels as if you spend hours waiting for remote file access to complete, if your system stops dead when several users are active at the same time, you need to read this book. Some performance problems do require you to buy a bigger or faster computer, but many can be solved simply by making better use of the resources you already have.Contents include:
- Real and perceived performance problems.
- Simple tricks to improve keyboard response.
- Locating your problem; finding out what your system is doing.
- Using tools such as at and batch to manage system load.
- Surviving without a lot of memory.
- Configuring your I/O system for the best throughput.
- Detecting an overworked or malfunctioning network.
- Building a kernel that uses your system more efficiently.
Synopsis
This book answers one of the most fundamental questions you can ask about your computer: How can I get it to do more work without buying more hardware? Some performance problems do require you to buy a bigger or faster computer, but many can be solved simply by making better use of the resources you already have--Mike Loukides tells you how.
About the Author
Mike Loukides is an editor for O'Reilly & Associates. He is the author of System Performance Tuning and UNIX for FORTRAN Programmers. Mike's interests are system administration, networking, programming languages, and computer architecture. His academic background includes degrees in electrical engineering (B.S.) and English literature (Ph.D.).
Table of Contents
Table of Contents
Preface
Audience
Organization
UNIX Versions
Conventions Used in This Handbook
Acknowledgements
Chapter 1. Introduction to System Performance
System Performance Issues
How Users Perceive Performance
System Resources
The CPU
The Memory Subsystem
The I/O Subsystem
User Communities
Performance Agreements
Chapter 2. Monitoring System Activity
Tools of the Trade: What Your System is Really Doing
System Load Average
Process Summary and Status
ps Under BSD UNIX
ps Under System V
Some Quick Remedies
Other Options and Ideas
Idle Time
The cron Facility
BSD cron
System V cron
Accounting
BSD Accounting Utilities
System V Accounting Utilities
Administrative Setup for sar
Running sadc at Startup
Running sadc Periodically
Some sar Basics
SunOS Performance Meters
Benchmarks
Chapter 3. Managing the Workload
Some Tricks for Users
Cleanup: Reducing the Workload
Daemons You Can Do Without
Disabling Unnecessary Daemons
Fighting with sendmail
Scheduling Priority
Setting Priorities with nice
Changing a Job's Priority Under BSD UNIX
Off-peak Job Submission
The at Command
System V.4 Batch Queues
More Complex Queueing Systems
Shell Time Limits
CPU Capacity
What the Basic Kernel Tables Are
How These Parameters are Defined
Some Other Important Definitions
When to Change These Parameters
The X Window System and Table Size
Measuring Table Usage (BSD)
Measuring Table Usage (System V)
Time Slice (System V)
Chapter 4. Memory Performance
Paging and Swapping
How to Tell if Your System is Paging
Using vmstat
Some Examples
Watching vmstat Automatically
Sun vmstat
XENIX vmstat
Memory Statistics (System V.3)
Memory Statistics (System V.4)
A System V Example
Conserving Memory
Shared Text Segments
Shared Libraries
Programming Techniques
Setting Memory Limits
The Buffer Cache
BSD Network Buffers
STREAMS Buffers
Kernel Tables
Tuning the Paging Algorithm
Managing the Swap Area
Filesystem Paging
Swap Area Size
Swap Area Distribution
Computing Memory Requirements
Estimating Memory for BSD Systems
Special Considerations for SunOS
Estimating Memory for System V
Summary
Chapter 5. Disk Performance Issues
I/O Subsystem Configuration
Disk Specifications
Partitions and Filesystems
Filesystem Types
Disk Organization (BSD)
Disk Organization (System V)
Planning and Creating Filesystems
Filesystem Tools
Filesystem Block Size
Inodes
Rotational Delay
Fragmentation Control (BSD Only)
Fragmentation Control (System V Only)
Balancing I/O Workload
Disk Locality
Filesystem Buffers
Disk Updates (System V)
In-memory Filesystems
Striped Filesystems
Conserving Disk Space
Filesystem Free Space
Filesystem Usage
Disk Rationing
Disk Housekeeping
Chapter 6 Network Performance
UNIX Networking
Introduction to TCP/IP Problems
Basic Network Etiquette
Network Performance Issues
Unreachable Hosts
Data Corruption on the Network
Gathering Network Integrity Data from NFS
Tracking Down Network Problems
Data Corruption at a Gateway
Network Congestion
Networks and CPU Load
Living with Slow Servers
NFS Workload and Kernel Table Size
RFS: System V Remote File Sharing
Filesystem Organization with RFS
RFS Buffer Usage
Server Usage
Special Considerations for STREAMS
STREAMS and SunOS
Chapter 7. Terminal Performance
Chattering Terminal Lines
Detecting Chattering Terminals (BSD)
Detecting Chattering Terminals (System V)
Other Techniques
Disabling a Bad Terminal Line (BSD)
Disabling a Bad Terminal Line (System V)
Character Lists
Terminal Drivers and STREAMS
Chapter 8. Kernel Configuration
Why Build a Custom Kernel?
How We'll Proceed
A Word on BSD and System V Kernels
Measuring Memory
Words to the Wise
Configuring a BSD Kernel
Structure of a Configuration File
The maxusers Parameter
Devices
Pseudo-devices
Root and Swap Configuration
Options
Other Configuration Definitions
Configuring a System V Kernel
The Configuration Process
Configuring a XENIX Kernel
Configuring an Interactive 386/ix Kernel
General V.3 Configuration Rules
Configuring a System V.4 Kernel
System V Configuration Parameters
Appendix A. Real-time Processes in System V.4
Real-time and Time-sharing Processes
Manipulating Priorities with priocntl (V.4)
Configuring the Scheduler (V.4)
Scheduler Configuration Tables
Real-time Scheduler Table
Time-sharing Scheduler Table
Appendix B. A Performance Tuning Strategy
Preparation: Setting Up Record Keeping
Before the Problem Strikes
When the Problem Strikes
Detecting Memory Problems
Detecting Disk I/O Problems
Detecting Network Problems
Terminal I/O
General Tips
Glossary
Index
Figures
2-1 A performance meter
5-1 Typical BSD disk partitioning
5-2 Disk partitioning-Fujitsu Eagle
5-3 Blocks and fragments in the BSD filesystem
5-4 The buffer cache
6-1 The redesigned network
A-1 Global priority scheme
Tables
2-1 Reports Available from sar
3-1 Configuration Parameters for Kernel Tables
3-2 Other Parameters Determining System Capacity
8-1 Filesystem Parameters
8-2 Process Management Parameters
8-3 Memory Management Parameters
8-4 STREAMS Parameters
8-5 Message Facility Parameters
8-6 Shared Memory
8-7 Semaphore Configuration Parameters
8-8 System V.4 Process Limit Parameters