Skip to product information
System Performance Engineering
System Performance Engineering
Description
Book Introduction
System Performance Engineering provides a comprehensive coverage of the concepts, strategies, tools, and tuning techniques for understanding and optimizing the performance of operating systems and applications.
A deep understanding of these tools and techniques is essential for developers, and the strategies presented in this book directly translate into improved user experiences and reduced costs.
These improvements are especially significant in cloud environments where billing is per instance.
The author concisely summarizes operating system, hardware, and application theory, allowing even readers with no prior performance analysis experience to quickly grasp the core concepts.
It provides an in-depth overview of cutting-edge analysis tools and techniques, including extended BPF (eBPF), and presents practical methods for achieving optimal performance in cloud, web, and enterprise systems.
  • You can preview some of the book's contents.
    Preview

index
Chapter 1 Introduction
1.1 System Performance
1.2 Role
1.3 Activities
1.4 Perspective
1.5 Difficulties in Performance Analysis
__1.5.1 Subjectivity
__1.5.2 Complexity
__1.5.3 Complex causes
__1.5.4 Various performance issues
1.6 Latency
1.7 Observability
__1.7.1 Counters, Statistics, and Indicators
__1.7.2 Profiling
__1.7.3 Tracing
1.8 Experiment
1.9 Cloud Computing
1.10 Methodology
__1.10.1 60-second Linux performance analysis
1.11 Case Study
__1.11.1 Slow disk
__1.11.2 Software Changes
__1.11.3 Additional Materials
1.12 References

Chapter 2 Methodology
2.1 Terminology
2.2 Model
__2.2.1 System under test
__2.2.2 Queue System
2.3 Concept
__2.3.1 Delay time
__2.3.2 Time scale
__2.3.3 Tradeoffs
__2.3.4 Tuning efforts
__2.3.5 Level of Conformity
__2.3.6 When to stop analysis
__2.3.7 Temporariness of Performance Improvements
__2.3.8 Load vs.
architecture
__2.3.9 Scalability
__2.3.10 indicator
__2.3.11 Usage Rate
__2.3.12 Saturation
__2.3.13 Profiling
__2.3.14 Caching
__2.3.15 Things I Know I Don't Know
2.4 Perspective
__2.4.1 Resource Analysis
__2.4.2 Workload Analysis
2.5 Methodology
__2.5.1 Streetlight Countermethodology
__2.5.2 Random Change Semimethodology
__2.5.3 Counter-methodology of blaming others
__2.5.4 Dedicated Checklist Methodology
__2.5.5 Problem Statement
__2.5.6 Scientific Methodology
__2.5.7 Diagnostic Cycle
__2.5.8 Tool Methodology
__2.5.9 USE Methodology
__2.5.10 RED Methodology
__2.5.11 Workload Characterization
__2.5.12 Drill-down Analysis
__2.5.13 Latency Analysis
__2.5.14 R Methodology
__2.5.15 Event Tracing
Statistics as of __2.5.16
__2.5.17 Static Performance Tuning
__2.5.18 Cache Tuning
__2.5.19 Micro Benchmarking
__2.5.20 Guidelines for Performance Optimization
2.6 Modeling
__2.6.1 Enterprise Environment vs.
Cloud environment
__2.6.2 Visual Performance Identification
__2.6.3 Amdahl's Scalability Law
__2.6.4 General Scalability Law
__2.6.5 Queue Theory
2.7 Capacity Planning
__2.7.1 Resource Limits
__2.7.2 Factor Analysis
__2.7.3 Scaling Solution
2.8 Statistics
__2.8.1 Quantifying Performance Improvements
__2.8.2 average
__2.8.3 Standard deviation, percentile, and median
__2.8.4 Coefficient of variation
__2.8.5 Multimodal distribution
__2.8.6 Extreme values
2.9 Monitoring
__2.9.1 Patterns over time
__2.9.2 Monitoring Products
__2.9.3 Summary from boot time
2.10 Visualization
__2.10.1 Broken Line Chart
__2.10.2 Scatterplot
__2.10.3 Heatmap
__2.10.4 Timeline Chart
__2.10.5 Surface
__2.10.6 Visualization Tools
2.11 Practice Problems
2.12 References

Chapter 3 Operating System
3.1 Terminology
3.2 Background knowledge
__3.2.1 kernel
__3.2.2 Kernel and User Mode
__3.2.3 System Call
__3.2.4 Interrupts
__3.2.5 Clock and Idle
__3.2.6 Process
__3.2.7 Stack
__3.2.8 Virtual Memory
__3.2.9 Scheduler
__3.2.10 file system
__3.2.11 Caching
__3.2.12 Networking
__3.2.13 device driver
__3.2.14 Multiprocessor
__3.2.15 Preemption
__3.2.16 Resource Management
__3.2.17 Observability Tools
3.3 Kernel
__3.3.1 Unix
__3.3.2 BSD
__3.3.3 Solaris
3.4 Linux
__3.4.1 Linux Kernel Development
__3.4.2 systemd
__3.4.3 KPTI (Meltdown)
__3.4.4 Extended BPF
3.5 Other Topics
__3.5.1 PGO Kernel
__3.5.2 Unikernel
__3.5.3 Microkernels and Hybrid Kernels
__3.5.4 Distributed Operating Systems
3.6 Kernel Comparison
3.7 Practice Problems
3.8 References
__3.8.1 Additional Materials

Chapter 4 Observability Tools
4.1 Scope of tool application
__4.1.1 Static Performance Analysis Tool
__4.1.2 Emergency Tools
4.2 Tool Types
__4.2.1 Fixed Counter
__4.2.2 Profiling
__4.2.3 Tracing
__4.2.4 Monitoring
4.3 Observability Sources
__4.3.1 /proc
__4.3.2 /sys
__4.3.3 Delay Accounting
__4.3.4 netlink
__4.3.5 tracepoint
__4.3.6 kprobe
__4.3.7 uprobe
__4.3.8 USDT
__4.3.9 Hardware Counter (PMC)
__4.3.10 Other Observability Sources
4.4 sar
__4.4.1 sar(1) scope
__4.4.2 sar(1) monitoring
__4.4.3 sar(1) real-time monitoring
__4.4.4 sar(1) related documentation
4.5 Tracing Tools
4.6 Observing the Observability Tool
4.7 Practice Problems
4.8 References

Chapter 5 Applications
5.1 Application Basics
__5.1.1 Objectives
__5.1.2 Optimizing for the General Case
__5.1.3 Observability
__5.1.4 Big O Notation
5.2 Application Performance Techniques
__5.2.1 Changing I/O Size
__5.2.2 Caching
__5.2.3 Buffering
__5.2.4 Polling
__5.2.5 Concurrency and Parallelism
__5.2.6 Non-blocking I/O
__5.2.7 Processor Binding
__5.2.8 Guidelines for Performance Optimization
5.3 Programming Languages
__5.3.1 Compiled Language
__5.3.2 Interpreter Language
__5.3.3 Virtual Machine
__5.3.4 Garbage Collection
5.4 Methodology
__5.4.1 CPU Profiling
__5.4.2 Off-CPU Analysis
__5.4.3 System Call Analysis
__5.4.4 USE Methodology
__5.4.5 Thread State Analysis
__5.4.6 Lock Analysis
__5.4.7 Static Performance Tuning
__5.4.8 Distributed Tracing
5.5 Observability Tools
__5.5.1 perf
__5.5.2 profle
__5.5.3 ofcputime
__5.5.4 strace
__5.5.5 execsnoop
__5.5.6 syscount
__5.5.7 bpftrace
5.6 Notes
__5.6.1 Missing Symbols
__5.6.2 Missing Stack
__5.7 Practice Problems
__5.8 References

Chapter 6 CPU
6.1 Terminology
6.2 Model
__6.2.1 CPU Architecture
__6.2.2 CPU Memory Cache
__6.2.3 CPU Run Queue
6.3 Concept
__6.3.1 Clock speed
__6.3.2 Command
__6.3.3 Command Pipeline
__6.3.4 Command Width
__6.3.5 Command Size
__6.3.6 SMT
__6.3.7 IPC, CPI
__6.3.8 CPU Usage
__6.3.9 User Time/Kernel Time Ratio
__6.3.10 Saturation
__6.3.11 Preemption
__6.3.12 Priority Inversion
__6.3.13 Multiprocess, multithread
__6.3.14 Word size
__6.3.15 Compiler Optimization
6.4 Architecture
__6.4.1 Hardware
__6.4.2 Software
6.5 Methodology
__6.5.1 Tool Methodology
__6.5.2 USE Methodology
__6.5.3 Workload Characterization
__6.5.4 Profiling
__6.5.5 Cycle Analysis
__6.5.6 Performance Monitoring
__6.5.7 Static Performance Tuning
__6.5.8 Priority Tuning
__6.5.9 Resource Control
__6.5.10 CPU binding
__6.5.11 Micro Benchmarking
6.6 Observability Tools
__6.6.1 uptime
__6.6.2 vmstat
__6.6.3 mpstat
__6.6.4 sar
__6.6.5 ps
__6.6.6 top
__6.6.7 pidstat
__6.6.8 time, ptime
__6.6.9 turbostat
__6.6.10 showboost
__6.6.11 pmcarch
__6.6.12 tlbstat
__6.6.13 perf
__6.6.14 profle
__6.6.15 cpudist
__6.6.16 runqlat
__6.6.17 runqlen
__6.6.18 softirqs
__6.6.19 hardirqs
__6.6.20 bpftrace
__6.6.21 Other Tools
6.7 Visualization
__6.7.1 Usage Heatmap
__6.7.2 Sub-second offset heatmap
__6.7.3 Flame Graph
__6.7.4 FlameScope
6.8 Experiment
__6.8.1 Random load generation
__6.8.2 SysBench
6.9 Tuning
__6.9.1 Compiler Options
__6.9.2 Scheduling Priorities and Classes
__6.9.3 Scheduler Options
__6.9.4 Scaling Governor
__6.9.5 Processor Power States
__6.9.6 CPU binding
__6.9.7 Exclusive CPU Set
__6.9.8 Resource Control
__6.9.9 Secure Boot Options
__6.9.10 Process Options (BIOS Tuning)
6.10 Practice Problems
6.11 References

Chapter 7 Memory
7.1 Terminology
7.2 Concept
__7.2.1 Virtual Memory
__7.2.2 Paging
__7.2.3 Demand Paging
__7.2.4 Memory Overcommit
__7.2.5 Process Swapping
__7.2.6 Using the file system cache
__7.2.7 Usage and Saturation
__7.2.8 Memory Allocator
__7.2.9 Shared Memory
__7.2.10 Working set size
__7.2.11 Word size
7.3 Architecture
__7.3.1 Hardware
__7.3.2 Software
__7.3.3 Process Virtual Address Space
7.4 Methodology
__7.4.1 Tool Methodology
__7.4.2 USE Methodology
__7.4.3 Understanding usage characteristics
__7.4.4 Cycle Analysis
__7.4.5 Performance Monitoring
__7.4.6 Memory Leak Detection
__7.4.7 Static Performance Tuning
__7.4.8 Resource Control
__7.4.9 Micro Benchmarking
__7.4.10 Memory Reduction Methodology
7.5 Observability Tools
__7.5.1 vmstat
__7.5.2 PSI
__7.5.3 swapon
__7.5.4 sar
__7.5.5 slabtop
__7.5.6 numastat
__7.5.7 ps
__7.5.8 top
__7.5.9 pmap
__7.5.10 perf
__7.5.11 drsnoop
__7.5.12 wss
__7.5.13 bpftrace
__7.5.14 Other Tools
7.6 Tuning
__7.6.1 Tuning Parameters
__7.6.2 Multiple page sizes
__7.6.3 Memory Allocator
__7.6.4 NUMA binding
__7.6.5 Resource Control
7.7 Practice Problems
7.8 References

Chapter 8 File System
8.1 Terminology
8.2 Model
__8.2.1 File System Interface
__8.2.2 File System Cache
__8.2.3 Two-stage cache
8.3 Concept
__8.3.1 File System Latency
__8.3.2 Cache
__8.3.3 Random Access I/O vs.
Sequential access I/O
__8.3.4 Prefetch
__8.3.5 Preview
__8.3.6 Write-Back Cache
__8.3.7 Synchronous Write
__8.3.8 Raw I/O and Direct I/O
__8.3.9 Non-blocking I/O
__8.3.10 Memory-mapped files
__8.3.11 Metadata
__8.3.12 Logical I/O vs.
Physical I/O
__8.3.13 Operations are not equivalent
__8.3.14 Special File Systems
__8.3.15 Access Timestamp
__8.3.16 capacity
8.4 Architecture
__8.4.1 File System I/O Stack
__8.4.2 VFS
__8.4.3 File System Cache
__8.4.4 File System Features
__8.4.5 File System Type
__8.4.6 Volume and Pool
8.5 Methodology
__8.5.1 Disk Analysis
__8.5.2 Latency Analysis
__8.5.3 Workload Characterization
__8.5.4 Performance Monitoring
__8.5.5 Static Performance Tuning
__8.5.6 Cache Tuning
__8.5.7 Workload Separation
__8.5.8 Micro Benchmarking
8.6 Observability Tools
__8.6.1 mount
__8.6.2 free
__8.6.3 top
__8.6.4 vmstat
__8.6.5 sar
__8.6.6 slabtop
__8.6.7 strace
__8.6.8 fatrace
__8.6.9 LatencyTOP
__8.6.10 opensnoop
__8.6.11 fletop
__8.6.12 cachestat
__8.6.13 ext4dist (xfs, zfs, btrfs, nfs)
__8.6.14 ext4slower (xfs, zfs, btrfs, nfs)
__8.6.15 bpftrace
__8.6.16 Other Tools
__8.6.17 Visualization
8.7 Experiment
__8.7.1 Random load generation
__8.7.2 Micro Benchmark Tool
__8.7.3 Cache Flushing
8.8 Tuning
__8.8.1 Calling the application
__8.8.2 ext4
__8.8.3 ZFS
8.9 Practice Problems
8.10 References

9 discs
9.1 Terminology
9.2 Model
__9.2.1 Basic Disk
__9.2.2 On-disk cache
__9.2.3 Controller
9.3 Concept
__9.3.1 Time Measurement
__9.3.2 Time scale
__9.3.3 Caching
__9.3.4 Random Access I/O vs.
Sequential access I/O
__9.3.5 Read/Write Ratio
__9.3.6 I/O size
__9.3.7 Even if the IOPS is the same, they are all different
__9.3.8 Non-data transfer disk commands
__9.3.9 Usage Rate
__9.3.10 Saturation
__9.3.11 I/O Wait Rate
__9.3.12 Motive vs.
Asynchronous
__9.3.13 Disk I/O vs.
Application I/O
9.4 Architecture
__9.4.1 Disk Type 599
____9.4.1.1 Magnetic rotary drive
____9.4.1.2 Semiconductor Drive
____9.4.1.3 Persistent Memory
__9.4.2 Interface
__9.4.3 Storage Device Type
__9.4.4 Operating System Disk I/O Stack
9.5 Methodology
__9.5.1 Tool Methodology
__9.5.2 USE Methodology
__9.5.3 Performance Monitoring
__9.5.4 Workload Characterization
__9.5.5 Latency Analysis
__9.5.6 Static Performance Tuning
__9.5.7 Cache Tuning
__9.5.8 Resource Control
__9.5.9 Micro Benchmarking
__9.5.10 Scaling
9.6 Observability Tools
__9.6.1 iostat
__9.6.2 sar
__9.6.3 PSI
__9.6.4 pidstat
__9.6.5 perf
__9.6.6 biolatency
__9.6.7 biosnoop
__9.6.8 iotop, biotop
__9.6.9 biostacks
__9.6.10 blktrace
__9.6.11 bpftrace
__9.6.12 MegaCli
__9.6.13 smartctl
__9.6.14 SCSI Logging
__9.6.15 Other Tools
9.7 Visualization
__9.7.1 Broken Line Chart
__9.7.2 Delay Time Scatterplot
__9.7.3 Latency Heatmap
__9.7.4 Offset Heatmap
__9.7.5 Usage Heatmap
9.8 Experiment
__9.8.1 Random Load Generation
__9.8.2 Building a load generator
__9.8.3 Micro Benchmark Tool
__9.8.4 Random Access Read Example
__9.8.5 ioping
__9.8.6 fo
__9.8.7 blkreplay
9.9 Tuning
__9.9.1 Operating System Tuning Options
__9.9.2 Disk Device Tuning Parameters
__9.9.3 Disk Controller Tuning Options
9.10 Practice Problems
9/11 References

Chapter 10 Network
10.1 Terminology
10.2 model
__10.2.1 Network Interface
__10.2.2 Network Controller
__10.2.3 Protocol Stack
10.3 Concept
__10.3.1 Network and Routing
__10.3.2 Protocol
__10.3.3 Encapsulation
__10.3.4 Packet size
__10.3.5 Delay Time
__10.3.6 Buffering
__10.3.7 Connection Backlog
__10.3.8 Interface Negotiation
__10.3.9 Congestion Avoidance
__10.3.10 Usage Rate
__10.3.11 Local connection
10.4 Architecture
__10.4.1 Protocol
__10.4.2 Hardware
__10.4.3 Software
10.5 Methodology
__10.5.1 Tool Methodology
__10.5.2 USE Methodology
__10.5.3 Workload Characterization
__10.5.4 Latency Analysis
__10.5.5 Performance Monitoring
__10.5.6 Packet Sniffing
__10.5.7 TCP Analysis
__10.5.8 Static Performance Tuning
__10.5.9 Resource Control
__10.5.10 Micro Benchmarking
10.6 Observability Tools
__10.6.1 ss
__10.6.2 ip
__10.6.3 ifconfg
__10.6.4 nstat
__10.6.5 netstat
__10.6.6 sar
__10.6.7 nicstat
__10.6.8 ethtool
__10.6.9 tcplife
__10.6.10 tcptop
__10.6.11 tcpretrans
__10.6.12 bpftrace
__10.6.13 tcpdump
__10.6.14 Wireshark
__10.6.15 Other Tools
10.7 Experiment
__10.7.1 ping
__10.7.2 traceroute
__10.7.3 pathchar
__10.7.4 iperf
__10.7.5 netperf
__10.7.6 tc
__10.7.7 Other Tools
__10.8 Tuning
__10.8.1 System Unit Tuning
__10.8.2 Socket Options
__10.8.3 Settings
10.9 Practice Problems
10.10 References

Chapter 11 Cloud Computing
11.1 Background knowledge
__11.1.1 Instance Type
__11.1.2 Scalable Architecture
__11.1.3 Capacity Planning
__11.1.4 Storage
__11.1.5 Multi-tenancy
__11.1.6 Orchestration (Kubernetes)
11.2 Hardware Virtualization
__11.2.1 Implementation
__11.2.2 Overhead
__11.2.3 Resource Control
__11.2.4 Observability
____11.2.4.1 Privileged Guests/Hosts
____11.2.4.2 Guest
____11.2.4.3 Strategy
11.3 OS Virtualization
__11.3.1 Implementation
__11.3.2 Overhead
__11.3.3 Resource Control
__11.3.4 Observability
____11.3.4.1 Existing Tools
____11.3.4.2 Host
____11.3.4.3 Guest (Container)
____11.3.4.4 Strategy
11.4 Lightweight Virtualization
__11.4.1 Implementation
__11.4.2 Overhead
__11.4.3 Resource Control
__11.4.4 Observability
11.5 Other types
11.6 Comparison
11.7 Practice Problems
11.8 References

Chapter 12 Benchmarking
12.1 Background knowledge
__12.1.1 Why Benchmark?
__12.1.2 Effective Benchmarking
__12.1.3 Benchmarking failure
12.2 Benchmarking Types
__12.2.1 Micro-Benchmarking
__12.2.2 Simulation
__12.2.3 Replay
__12.2.4 Industry Standards
12.3 Methodology
__12.3.1 Passive Benchmarking
__12.3.2 Active Benchmarking
__12.3.3 CPU Profiling
__12.3.4 USE Methodology
__12.3.5 Workload Characterization
__12.3.6 Custom Benchmark
__12.3.7 Continuous load increase
__12.3.8 Normality check
__12.3.9 Statistical Analysis
__12.3.10 Benchmarking Checklist
12.4 Benchmark Questions
12.5 Practice Problems
12.6 References

Chapter 13 perf
13.1 Subcommand Overview
13.2 One Liner
__Available Events
__Event Aggregation
__Profiling
__Static tracing
__Dynamic tracing
__Reporting
13.3 perf event
13.4 Hardware Events
__13.4.1 Frequency Sampling
13.5 Software Events
13.6 Tracepoint Events
13.7 Probe Event
__13.7.1 kprobe
__13.7.2 uprobe
__13.7.3 USDT
13.8 perf stat
__13.8.1 Options
__13.8.2 Interval Statistics
__13.8.3 CPU-specific balance
__13.8.4 Event Filter
__13.8.5 Shadow Statistics
13 9 perf record
__13.9.1 Options
__13.9.2 CPU Profiling
__13.9.3 Stack Trace
13.10 perf report
__13.10.1 TUI
__13.10.2 STDIO
13.11 perf script
__13.11.1 Flame Graph
__13.11.2 Trace script
13.12 perf trace
__13.12.1 kernel version
13.13 Other Commands
13.14 perf documentation
13.15 References

Chapter 14 Ftrace
14.1 Overview of Availability
14.2 tracefs(/sys)
__14.2.1 tracefs component
14.3 Ftrace Function Profiler
14.4 Ftrace Function Tracing
__14.4.1 Using trace
__14.4.2 Using trace_pipe
__14.4.3 Options
14.5 tracepoint
__14.5.1 Filter
__14.5.2 Trigger
14.6 kprobe
__14.6.1 Event Tracing
__14.6.2 Argument
__14.6.3 Return Value
__14.6.4 Filters and Triggers
__14.6.5 kprobe profiling
14.7 uprobe
__14.7.1 Event Tracing
__14.7.2 Arguments and Return Values
__14.7.3 Filters and Triggers
__14.7.4 uprobe profiling
14.8 Ftrace function_graph
__14.8.1 Graph Tracing
__14.8.2 Options
14.9 Ftrace hwlat
14.10 Ftrace Histogram Trigger
__14.10.1 Single Key
__14.10.2 field
__14.10.3 Directive
__14.10.4 PID Filter
__14.10.5 Multiple Keys
__14.10.6 Stack Trace Key
__14.10.7 Synthesis Event
14.11 trace-cmd
__14.11.1 Subcommand Overview
__14.11.2 trace-cmd one-liner
__14.11.3 trace-cmd vs.
perf(1)
__14.11.4 trace-cmd function_graph
__14.11.5 KernelShark
__14.11.6 trace-cmd documentation
14.12 perf ftrace
14.13 perf-tools
__14.13.1 Tool Usage Areas
__14.13.2 Single-purpose tools
__14.13.3 Multipurpose tool
__14.13.4 perf-tools one-liner
__14.13.5 Example
__14.13.6 perf-tools vs. BCC/BPF
__14.13.7 Document
14.14 Ftrace Documentation
14.15 References

Chapter 15 BPF
15 1 BCC
__15.1.1 Installation
__15.1.2 Tool Usage Areas
__15.1.3 Single-purpose tools
__15.1.4 Multipurpose tool
__15.1.5 One Liner
__15.1.6 Multipurpose Tool Case
__15.1.7 BCC vs.
bpftrace
__15.1.8 Document
15.2 bpftrace
__15.2.1 Install 1033
__15.2.2 Tool 1033
__15.2.3 One Liner
__15.2.4 Programming
__15.2.5 References
__15.2.6 Document
15.3 References

Chapter 16 Case Studies
16.1 Unknown performance improvements
__16.1.1 Problem Definition
__16.1.2 Analysis Strategy
__16.1.3 Statistics
__16.1.4 Configuration
__16.1.5 PMC
__16.1.6 Software Event
__16.1.7 Tracing
__16.1.8 Conclusion
16.2 Additional Information
16.3 References

Appendix A USE Methodology: Linux
Appendix B Sar Summary
Appendix C bpftrace One-Liner
Appendix D: Practice Problem Solutions (Partial)
Appendix E Key Figures in System Performance

Publisher's Review
[What this book covers]

● Hardware, kernel, application internal structure and performance characteristics
● Performance analysis methodology for quickly diagnosing complex systems
● Optimization of CPU, memory, file system, disk, and network resource usage
● Precision profiling and tracing using perf, Ftrace, and BPF (BCC and bpftrace)
● Performance issues faced in cloud hypervisor environments
● More effective benchmarking techniques
GOODS SPECIFICS
- Date of issue: November 4, 2025
- Page count, weight, size: 1,172 pages | 2,152g | 188*240*56mm
- ISBN13: 9788966264964
- ISBN10: 8966264964

You may also like

카테고리