System Performance Tuning. 2nd Edition - Helion
ISBN: 978-05-965-5204-6
stron: 352, Format: ebook
Data wydania: 2002-02-05
Księgarnia: Helion
Cena książki: 126,65 zł (poprzednio: 147,27 zł)
Oszczędzasz: 14% (-20,62 zł)
System Performance Tuning 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? In the current economic downturn, performance tuning takes on a new importance. It allows system administrators to make the best use of existing systems and minimize the purchase of new equipment. Well-tuned systems save money and time that would otherwise be wasted dealing with slowdowns and errors. Performance tuning always involves compromises; unless system administrators know what the compromises are, they can't make intelligent decisions.Tuning is an essential skill for system administrators who face the problem of adapting the speed of a computer system to the speed requirements imposed by the real world. It requires a detailed understanding of the inner workings of the computer and its architecture. System Performance Tuning covers two distinct areas: performance tuning, or the art of increasing performance for a specific application, and capacity planning, or deciding what hardware best fulfills a given role. Underpinning both subjects is the science of computer architecture. This book focuses on the operating system, the underlying hardware, and their interactions. Topics covered include:
- Real and perceived performance problems, introducing capacity planning and performance monitoring (highlighting their strengths and weaknesses).
- An integrated description of all the major tools at a system administrator's disposal for tracking down system performance problems.
- Background on modern memory handling techniques, including the memory-caching filesystem implementations in Solaris and AIX. Updated sections on memory conservation and computing memory requirements.
- In depth discussion of disk interfaces, bandwidth capacity considerations, and RAID systems.
- Comprehensive discussion of NFS and greatly expanded discussion of networking.
- Workload management and code tuning.
- Special topics such as tuning Web servers for various types of content delivery and developments in cross-machine parallel computing
Osoby które kupowały "System Performance Tuning. 2nd Edition", wybierały także:
- Windows Media Center. Domowe centrum rozrywki 66,67 zł, (8,00 zł -88%)
- Ruby on Rails. Ćwiczenia 18,75 zł, (3,00 zł -84%)
- Przywództwo w świecie VUCA. Jak być skutecznym liderem w niepewnym środowisku 58,64 zł, (12,90 zł -78%)
- Scrum. O zwinnym zarządzaniu projektami. Wydanie II rozszerzone 58,64 zł, (12,90 zł -78%)
- Od hierarchii do turkusu, czyli jak zarządzać w XXI wieku 58,64 zł, (12,90 zł -78%)
Spis treści
System Performance Tuning. 2nd Edition eBook -- spis treści
- System Performance Tuning, 2nd Edition
- SPECIAL OFFER: Upgrade this ebook with OReilly
- Preface
- Who Should Buy This Book?
- A Note on Coverage
- How to Read This Book
- This Book as a Story
- This Book as a Reference
- Organization
- Typographic Conventions
- Comments and Questions
- Personal Comments and Acknowledgments
- Acknowledgments from Mike Loukides
- 1. An Introduction to Performance Tuning
- 1.1. An Introduction to Computer Architecture
- 1.1.1. Levels of Transformation
- 1.1.1.1. Software: algorithms and languages
- 1.1.1.2. The Instruction Set Architecture
- 1.1.1.3. Hardware: microarchitecture, circuits, and devices
- 1.1.2. The von Neumann Model
- 1.1.3. Caches and the Memory Hierarchy
- 1.1.4. The Benefits of a 64-Bit Architecture
- 1.1.4.1. What does it mean to be 64-bit?
- 1.1.4.2. Performance ramifications
- 1.1.1. Levels of Transformation
- 1.2. Principles of Performance Tuning
- 1.2.1. Principle 0: Understand Your Environment
- 1.2.2. Principle 1: TANSTAAFL!
- 1.2.3. Principle 2: Throughput Versus Latency
- 1.2.4. Principle 3: Do Not Overutilize a Resource
- 1.2.5. Principle 4: Design Tests Carefully
- 1.3. Static Performance Tuning
- 1.3.1. Other Miscellaneous Things to Check
- 1.4. Concluding Thoughts
- 1.1. An Introduction to Computer Architecture
- 2. Workflow Management
- 2.1. Workflow Characterization
- 2.1.1. Simple Commands
- 2.1.2. Process Accounting
- 2.1.2.1. Enabling process accounting
- 2.1.2.2. Reviewing accounting records
- 2.1.3. Automating sar
- 2.1.3.1. Enabling sar
- 2.1.3.2. Retrieving data
- 2.1.4. Virtual Adrian
- 2.1.5. Network Pattern Analysis
- 2.1.5.1. Pattern 1: request-response
- 2.1.5.2. Pattern 1B: inverse request-response
- 2.1.5.3. Pattern 2: data transfer
- 2.1.5.4. Pattern 3: message passing
- 2.1.5.5. Packet size distributions
- 2.2. Workload Control
- 2.2.1. Education
- 2.2.1.1. Usage and performance agreements
- 2.2.2. The maxusers and the pt_cnt Parameters
- 2.2.3. Limiting Users
- 2.2.3.1. Quotas
- 2.2.3.2. Environmental limits
- 2.2.4. Complex Environments
- 2.2.1. Education
- 2.3. Benchmarking
- 2.3.1. MIPS and Megaflops
- 2.3.1.1. MIPS
- 2.3.1.2. Megaflops
- 2.3.2. Component-Specific Benchmarks
- 2.3.2.1. Linpack
- 2.3.2.2. SPECint and SPECfp
- 2.3.3. Commercial Workload Benchmarks
- 2.3.3.1. TPC
- 2.3.3.2. SPECweb99
- 2.3.4. User Benchmarks
- 2.3.4.1. Choose your problem set
- 2.3.4.2. Choose your runtime
- 2.3.4.3. Automate heavily
- 2.3.4.4. Set benchmark runtime rules
- 2.3.1. MIPS and Megaflops
- 2.4. Concluding Thoughts
- 2.1. Workflow Characterization
- 3. Processors
- 3.1. Microprocessor Architecture
- 3.1.1. Clock Rates
- 3.1.2. Pipelining
- 3.1.2.1. Variable-length instructions
- 3.1.2.2. Branches
- 3.1.3. The Second Generation of RISC Processor Design
- 3.2. Caching
- 3.2.1. The Cache Hierarchy
- 3.2.2. Cache Organization and Operation
- 3.2.3. Associativity
- 3.2.4. Locality and "Cache-Busters"
- 3.2.4.1. Unit stride
- 3.2.4.2. Linked lists
- 3.2.4.3. Cache-aligned block copy problems
- 3.2.5. The Cache Size Anomaly
- 3.3. Process Scheduling
- 3.3.1. The System V Model: The Linux Model
- 3.3.1.1. Finding a processs priority
- 3.3.1.2. Adjusting a process's effective priority
- 3.3.1.3. Modifications for SMP systems
- 3.3.2. Multilayered Scheduling Classes: The Solaris Model
- 3.3.2.1. The Solaris threading model
- 3.3.2.2. Scheduling classes
- 3.3.2.3. The dispatcher
- 3.3.2.4. Checking a process's priority
- 3.3.2.5. Tuning the dispatch tables
- 3.3.2.6. Adjusting priorities
- 3.3.1. The System V Model: The Linux Model
- 3.4. Multiprocessing
- 3.4.1. Processor Communication
- 3.4.1.1. Buses
- 3.4.1.2. Crossbars
- 3.4.1.3. UltraSPARC-III systems: Fireplane
- 3.4.1.4. "Interconnectionless" architectures
- 3.4.2. Operating System Multiprocessing
- 3.4.3. Threads
- 3.4.4. Locking
- 3.4.5. Cache Influences on Multiprocessor Performance
- 3.4.1. Processor Communication
- 3.5. Peripheral Interconnects
- 3.5.1. SBus
- 3.5.1.1. Clock speed
- 3.5.1.2. Burst transfer size
- 3.5.1.3. Transfer mode
- 3.5.1.4. Summary of SBus implementations
- 3.5.1.5. SBus card utilization
- 3.5.2. PCI
- 3.5.2.1. PCI bus transactions
- 3.5.2.2. CompactPCI
- 3.5.3. A Summary of Peripheral Interconnects
- 3.5.4. Interrupts in Linux
- 3.5.5. Interrupts in Solaris
- 3.5.1. SBus
- 3.6. Processor Performance Tools
- 3.6.1. The Load Average
- 3.6.2. Process Queues
- 3.6.3. Specific Breakdowns
- 3.6.4. Multiprocessor Systems
- 3.6.5. top and prstat
- 3.6.6. Lock Statistics
- 3.6.7. Controlling Processors in Solaris
- 3.6.7.1. psrinfo
- 3.6.7.2. psradm
- 3.6.7.3. psrset
- 3.6.8. Peripheral Interconnect Performance Tools
- 3.6.9. Advanced Processor Performance Statistics
- 3.7. Concluding Thoughts
- 3.1. Microprocessor Architecture
- 4. Memory
- 4.1. Implementations of Physical Memory
- 4.2. Virtual Memory Architecture
- 4.2.1. Pages
- 4.2.2. Segments
- 4.2.3. Estimating Memory Requirements
- 4.2.4. Address Space Layout
- 4.2.5. The Free List
- 4.2.5.1. Virtual memory management in Linux
- 4.2.6. Page Coloring
- 4.2.7. Transaction Lookaside Buffers (TLB)
- 4.3. Paging and Swapping
- 4.3.1. The Decline and Fall of Interactive Performance
- 4.3.2. Swap Space
- 4.3.2.1. Anonymous memory
- 4.3.2.2. Sizing swap space
- 4.3.2.3. Organizing swap space
- 4.3.2.4. Swapfiles
- 4.4. Consumers of Memory
- 4.4.1. Filesystem Caching
- 4.4.2. Filesystem Cache Writes: fsflush and bdflush
- 4.4.2.1. Solaris: fsflush
- 4.4.2.2. Linux: bdflush
- 4.4.3. Interactions Between the Filesystem Cache and Memory
- 4.4.3.1. Priority paging
- 4.4.3.2. Cyclic caching
- 4.4.4. Interactions Between the Filesystem Cache and Disk
- 4.5. Tools for Memory Performance Analysis
- 4.5.1. Memory Benchmarking
- 4.5.1.1. STREAM
- 4.5.1.2. lmbench
- 4.5.2. Examining Memory Usage System-Wide
- 4.5.2.1. vmstat
- 4.5.2.2. sar
- 4.5.2.3. memstat
- 4.5.3. Examining Memory Usage of Processes
- 4.5.3.1. Solaris tools
- 4.5.4. Linux Tools
- 4.5.1. Memory Benchmarking
- 4.6. Concluding Thoughts
- 5. Disks
- 5.1. Disk Architecture
- 5.1.1. Zoned Bit Rate (ZBR) recording
- 5.1.1.1. Disk caches
- 5.1.2. Access Patterns
- 5.1.3. Reads
- 5.1.4. Writes
- 5.1.4.1. UFS write throttling
- 5.1.5. Performance Specifications
- 5.1.5.1. One million bytes is a megabyte?
- 5.1.5.2. Burst speed versus internal transfer speed
- 5.1.5.3. Internal transfer speed versus actual speed
- 5.1.5.4. Average seek time
- 5.1.5.5. Storage capacity and access capacity
- 5.1.1. Zoned Bit Rate (ZBR) recording
- 5.2. Interfaces
- 5.2.1. IDE
- 5.2.1.1. Improving IDE performance in Linux
- 5.2.1.2. Limitations of IDE drives
- 5.2.2. IPI
- 5.2.3. SCSI
- 5.2.3.1. Multi-initiator SCSI
- 5.2.3.2. Bus transactions
- 5.2.3.3. Synchronous versus asynchronous transfers
- 5.2.3.4. Termination
- 5.2.3.5. Command queuing
- 5.2.3.6. Differential signaling
- 5.2.3.7. Bus utilization
- 5.2.3.8. Mixing different speed SCSI devices
- 5.2.3.9. SCSI implementations
- 5.2.4. Fibre Channel
- 5.2.5. IEEE 1394 (FireWire)
- 5.2.6. Universal Serial Bus (USB)
- 5.2.1. IDE
- 5.3. Common Performance Problems
- 5.3.1. High I/O Skew
- 5.3.2. Memory-Disk Interactions
- 5.3.3. High Service Times
- 5.4. Filesystems
- 5.4.1. vnodes, inodes, and rnodes
- 5.4.1.1. The directory name lookup cache (DNLC)
- 5.4.2. The Unix Filesystem (UFS)
- 5.4.2.1. inode density
- 5.4.2.2. Filesystem cluster size
- 5.4.2.3. Minimum free space
- 5.4.2.4. Rotational delay
- 5.4.2.5. fstyp and tunefs
- 5.4.2.6. Bypassing memory caching
- 5.4.2.7. The inode cache
- 5.4.2.8. The buffer cache
- 5.4.3. Logging Filesystems
- 5.4.3.1. Solstice:DiskSuite
- 5.4.3.2. Solaris
- 5.4.4. The Second Extended Filesystem (EXT2)
- 5.4.5. The Third Extended Filesystem (EXT3)
- 5.4.5.1. Tuning the elevator algorithm
- 5.4.5.2. Choosing a journaling mode
- 5.4.5.3. Transitioning from ext2 to ext3
- 5.4.6. The Reiser Filesystem (ReiserFS)
- 5.4.6.1. Tail packing
- 5.4.7. The Journaled Filesystem (JFS)
- 5.4.8. The Temporary Filesystem (tmpfs)
- 5.4.9. Veritas VxFS
- 5.4.10. Caching Filesystems (CacheFS)
- 5.4.10.1. Minimizing seek times by filesystem layout
- 5.4.1. vnodes, inodes, and rnodes
- 5.5. Tools for Analysis
- 5.5.1. Enabling Disk Caches
- 5.5.2. Disk Performance Benchmarking
- 5.5.2.1. hdparm
- 5.5.2.2. tiobench
- 5.5.2.3. iozone
- 5.5.3. Second-Time-Through Improvements?
- 5.5.4. Using iostat
- 5.5.4.1. Historical limitations: iostat and queuing terminology
- 5.5.5. Using sar
- 5.5.6. I/O Tracing
- 5.5.6.1. Using the kernel probes
- 5.5.6.2. Using process filtering
- 5.5.6.3. Restarting prex
- 5.6. Concluding Thoughts
- 5.1. Disk Architecture
- 6. Disk Arrays
- 6.1. Terminology
- 6.2. RAID Levels
- 6.2.1. RAID 0: Striping
- 6.2.2. RAID 1: Mirroring
- 6.2.3. RAID 2: Hamming Code Arrays
- 6.2.4. RAID 3: Parity-Protected Striping
- 6.2.5. RAID 4: Parity-Protected Striping with Independent Disks
- 6.2.6. RAID 5: Distributed, Parity-Protected Striping
- 6.2.7. RAID 10: Mirrored Striping
- 6.3. Software Versus Hardware
- 6.3.1. Software
- 6.3.2. Hardware
- 6.3.2.1. RAID overlap
- 6.4. A Summary of Disk Array Design
- 6.4.1. Choosing a RAID Level
- 6.5. Software RAID Implementations
- 6.5.1. Solaris: Solstice DiskSuite
- 6.5.1.1. State databases
- 6.5.1.2. RAID 0: stripes
- 6.5.1.3. RAID 1: mirrors
- 6.5.1.4. RAID 5 arrays
- 6.5.1.5. Hot spare pools
- 6.5.2. Linux: md
- 6.5.2.1. Persistent superblocks
- 6.5.2.2. Chunk size
- 6.5.2.3. Linear mode
- 6.5.2.4. RAID 0: stripes
- 6.5.2.5. RAID 1: mirrors
- 6.5.2.6. RAID 5 arrays
- 6.5.2.7. Creating the array
- 6.5.2.8. Autodetection
- 6.5.2.9. Booting from an array device
- 6.5.1. Solaris: Solstice DiskSuite
- 6.6. RAID Recipes
- 6.6.1. Attribute-Intensive Home Directories
- 6.6.2. Data-Intensive Home Directories
- 6.6.3. High Performance Computing
- 6.6.4. Databases
- 6.6.5. Case Study: Applications Doing Large I/O
- 6.7. Concluding Thoughts
- 7. Networks
- 7.1. Network Principles
- 7.1.1. The OSI Model
- 7.2. Physical Media
- 7.2.1. UTP
- 7.2.1.1. A note on terminology: plugs and jacks
- 7.2.2. Fiber
- 7.2.1. UTP
- 7.3. Network Interfaces
- 7.3.1. Ethernet
- 7.3.1.1. Fundamentals of Ethernet signaling
- 7.3.1.2. Topologies
- 7.3.1.3. 10BASE-T
- 7.3.1.4. 100BASE-T4
- 7.3.1.5. 100BASE-TX
- 7.3.1.6. Gigabit Ethernet topologies
- 7.3.1.7. The 5-4-3 rule
- 7.3.1.8. Collisions
- 7.3.1.9. Autonegotiation
- 7.3.1.10. Displaying and setting modes
- 7.3.2. FDDI
- 7.3.3. ATM
- 7.3.4. Ethernet Versus ATM/FDDI
- 7.3.1. Ethernet
- 7.4. Network Protocols
- 7.4.1. IP
- 7.4.1.1. Fragmentation
- 7.4.1.2. Time-to-live
- 7.4.1.3. Protocols
- 7.4.1.4. IP addresses
- 7.4.1.5. Classful addressing
- 7.4.1.6. Subnetting classful networks
- 7.4.1.7. Moving to a classless world
- 7.4.1.8. Routing
- 7.4.2. TCP
- 7.4.2.1. Connection initiation and SYN flooding
- 7.4.2.2. Path MTU discovery and the maximum segment size
- 7.4.2.3. Buffers, watermarks, and windows
- 7.4.2.4. Retransmissions
- 7.4.2.5. Deferring acknowledgments
- 7.4.2.6. Window congestion and the slow start algorithm
- 7.4.2.7. TCP timers and intervals
- 7.4.2.8. The Nagle algorithm
- 7.4.3. UDP
- 7.4.4. TCP Versus UDP for Network Transport
- 7.4.1. IP
- 7.5. NFS
- 7.5.1. Characterizing NFS Activity
- 7.5.2. Tuning Clients
- 7.5.2.1. Obtaining statistics for an NFS-mounted filesystem
- 7.5.2.2. The rnode cache
- 7.5.2.3. Tuning NFS clients for bursty transfers
- 7.5.2.4. Tuning NFS clients for sequential transfer
- 7.5.3. Tuning Servers
- 7.5.3.1. Designing disk subsystems for NFS servers
- 7.5.3.2. NVRAM caching
- 7.5.3.3. Memory requirements
- 7.5.3.4. The two basic types of NFS servers
- 7.5.3.5. Tuning the number of NFS threads
- 7.5.3.6. Adjusting the buffer cache
- 7.5.3.7. The maxusers parameter
- 7.5.3.8. The directory name lookup cache (DNLC)
- 7.5.3.9. The inode cache
- 7.5.3.10. Observing NFS server performance with nfsstat
- 7.5.4. Wide Area Networks and NFS
- 7.6. CIFS via Unix
- 7.7. Concluding Thoughts
- 7.1. Network Principles
- 8. Code Tuning
- 8.1. The Two Critical Approaches
- 8.1.1. String Searching Algorithms
- 8.1.1.1. Algorithm 1: naive searching
- 8.1.1.2. Algorithm 2: Knuth-Morris-Pratt searching
- 8.1.1.3. Algorithm 3: Boyer-Moore searching
- 8.1.2. Caveats in Optimization
- 8.1.1. String Searching Algorithms
- 8.2. Techniques for Code Analysis
- 8.2.1. Application Timing: time, timex, and ptime
- 8.2.1.1. time
- 8.2.1.2. timex
- 8.2.1.3. ptime
- 8.2.1.4. Mechanisms of timing
- 8.2.2. Timing-Specific Code Sections
- 8.2.2.1. Timing via gethrtime
- 8.2.2.2. Timing via the TICK register
- 8.2.3. Probe-Based Analysis: Solaris TNF
- 8.2.3.1. Inserting probes
- 8.2.3.2. Caveats
- 8.2.4. Profiler-Based Analysis: gprof
- 8.2.4.1. Implementing profiling
- 8.2.4.2. Compiling with profiling
- 8.2.4.3. Execution with profiling
- 8.2.4.4. Profile analysis
- 8.2.4.5. Caveats
- 8.2.1. Application Timing: time, timex, and ptime
- 8.3. Optimization Patterns
- 8.3.1. Arithmetic
- 8.3.2. Loops
- 8.3.3. Strings
- 8.4. Interacting with Compilers
- 8.4.1. Typical Optimizations: -fast
- 8.4.2. Optimization Level: -xO
- 8.4.3. Specifying Instruction Set Architecture: -xarch
- 8.4.4. Specifying Processor Architecture: -xchip
- 8.4.5. Function Inlining: -xinlining and -xcrossfile
- 8.4.6. Data Dependency Analysis: -xdepend
- 8.4.7. Vector Operations: -xvector
- 8.4.8. Default Floating Point Constant Size: -xsfpconst
- 8.4.9. Data Prefetching: -xprefetch
- 8.4.10. Quick and Dirty Compiler Flags
- 8.4.11. Profiling Feedback
- 8.5. Concluding Thoughts
- 8.1. The Two Critical Approaches
- 9. Instant Tuning
- 9.1. Top Five Tuning Tips
- 9.1.1. Where Is the Disk Bottleneck?
- 9.1.2. Do You Have Enough Memory?
- 9.1.3. Are the Processors Overloaded?
- 9.1.4. Are Processes Blocked on Disk I/O?
- 9.1.5. Does System Time Heavily Dominate User Time?
- 9.2. Instant Tuning Recipes
- 9.2.1. Single-User Development Workstations
- 9.2.1.1. Filesystems
- 9.2.1.2. Swap space
- 9.2.1.3. Kernel tuning
- 9.2.2. Workgroup Servers
- 9.2.2.1. Memory
- 9.2.2.2. Disks
- 9.2.2.3. Filesystems
- 9.2.2.4. Swap space
- 9.2.2.5. Optimizing NFS
- 9.2.2.6. Kernel tuning
- 9.2.3. Web Servers
- 9.2.3.1. Memory
- 9.2.3.2. Disks
- 9.2.3.3. Filesystems
- 9.2.3.4. Swap space
- 9.2.3.5. Networks
- 9.2.3.6. Kernel tuning
- 9.2.3.7. Special case: proxy servers
- 9.2.1. Single-User Development Workstations
- 9.1. Top Five Tuning Tips
- About the Authors
- Colophon
- SPECIAL OFFER: Upgrade this ebook with OReilly