Leanpub Header

Skip to main content

Software Performance Engineering in 2026

A Practical Guide to Building Fast, Scalable Systems from Hardware to Distributed Architecture

Software Performance Engineering in 2026
This book is 100% completeLast updated on 2026-08-31

Why is your system slow, and how do you know what to fix? This practical guide takes you from CPU and memory behavior to databases, networks and distributed systems. Learn how to profile, benchmark and diagnose real performance problems with working examples across modern languages and tools.

Minimum price

$19.00

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
WEB
APP
236
Pages
About

About

About the Book

This book provides a rigorous, end-to-end treatment of modern software performance engineering for experienced engineers who want to understand why optimizations work at every layer of the stack. From CPU microarchitecture and memory hierarchy through runtime behavior, database internals, network protocols, and distributed system design, each chapter grounds practical techniques in first-principles understanding. You will find examples in C, C++, Rust, Go, Java, Python, and JavaScript/TypeScript, systematic profiling workflows using production-grade tools, realistic benchmarking methodology, and full case studies that walk through real performance problems from symptom to solution. The goal is not to teach you a list of tricks but to equip you with the mental models and methods to diagnose and fix performance issues in any system you encounter.

Author

About the Author

Steve Publications

Steve is a technology professional with more than 20 years of experience in software development, server infrastructure, cybersecurity, vulnerability research and reverse engineering. Throughout his career, he has designed, secured, analyzed and tested complex software and infrastructure, with a particular focus on understanding how systems fail and how they can be made more secure.

Outside of work, Steve enjoys sharing knowledge with the technology community. He collaborates with researchers, industry experts and technology professionals to write practical books covering software development, cybersecurity, cloud computing, networking, DevOps, artificial intelligence and enterprise technologies. His books focus on practical learning through clear explanations, real-world examples and hands-on exercises. With more than two decades of industry experience, his goal is to help IT professionals, students and technology enthusiasts build useful skills and stay current in a rapidly changing industry.

We believe readers deserve to know how our books are created. Most of our authors are not native English speakers, so we use AI to help translate, proofread manuscripts, fix grammar, improve sentence structure and make technical explanations easier to read. AI is used as an editing tool only. It does not replace the research, technical knowledge or hands-on experience behind our books. Some of our authors also prefer to remain anonymous for privacy or professional reasons. In those cases, we publish their work under a different name. The author's name may be different, but the quality of the content and our review process remain the same.

Every book is written, reviewed and maintained by experienced technology professionals, with contributions from our private technical community of more than 420 engineers and researchers. We spend far more time validating technical accuracy and keeping our content up to date than generating text. We are always interested in working with experienced professionals who have deep expertise in a particular technology or domain. If you would like to publish a book with us or help review an existing manuscript, we'd love to hear from you. Send us a message describing your area of expertise. We are especially interested in niche technologies, specialized skills and emerging topics that are underrepresented in existing technical literature.

If you look through the contents of our books, you'll see practical examples, detailed explanations and material that is regularly updated. Our goal is to publish books that professionals can actually rely on, not low-effort AI-generated content. If you ever feel that one of our books does not meet that standard, Leanpub offers a 60-day money-back guarantee. Feel free to request a refund if you are not satisfied with your purchase.

Contents

Table of Contents

A Practical Guide to Building Fast, Scalable Systems from Hardware to Distributed Architecture

Chapter 1: The Performance Engineering Mindset

  1. What Is Performance (Latency, Throughput, Efficiency, Scalability)
  2. The Performance Lifecycle (Requirements, Baseline, Profile, Optimize, Validate, Monitor)
  3. First Principles Thinking for Performance
  4. Common Anti-Patterns and Misconceptions
  5. How to Use This Book

Chapter 2: Defining Performance Requirements and SLOs

  1. Translating Business Needs into Performance Metrics
  2. Designing SLIs and SLOs That Matter
  3. Understanding Latency Distributions and Tail Latency
  4. Capacity Planning Fundamentals
  5. Setting Realistic Performance Targets by Domain

Chapter 3: CPU Microarchitecture and Instruction-Level Behavior

  1. How Modern CPUs Execute Instructions (Pipelines, Superscalar, Out-of-Order)
  2. Branch Prediction and Control Flow Performance
  3. Instruction-Level Parallelism and Dependency Chains
  4. CPU Microarchitectures in 2026 (x86, ARM Server, RISC-V Progress)
  5. Writing Code That Cooperates with the CPU

Chapter 4: Memory Systems, Caches, and Locality

  1. The Memory Hierarchy and Latency Wall
  2. Cache Architecture (L1, L2, L3, TLB)
  3. Spatial and Temporal Locality in Practice
  4. False Sharing and NUMA Awareness
  5. Data Structures Optimized for Cache Behavior

Chapter 5: Memory Allocation and Garbage Collection

  1. The Hidden Cost of malloc and new
  2. Custom Allocators (Arena, Pool, Slab)
  3. Garbage Collection in Java (G1, Shenandoah, ZGC)
  4. Go’s Garbage Collector and Allocation Patterns
  5. When to Use Each Memory Management Strategy

Chapter 6: Concurrency, Parallelism, and Asynchronous Programming

  1. Concurrency vs Parallelism: The Distinction That Matters
  2. Threads, Locks, and Contention
  3. Lock-Free and Wait-Free Data Structures
  4. Async/Await and Event Loop Architectures
  5. Choosing the Right Concurrency Model for Your Workload

Chapter 7: Operating System Performance: Scheduling, Syscalls, and I/O

  1. Linux Process Scheduling and CPU Affinity
  2. System Call Overhead and Alternatives
  3. I/O Multiplexing (epoll, kqueue, io_uring)
  4. Virtual Memory, Page Faults, and Memory Mapping
  5. Tuning the OS for Performance Workloads

Chapter 8: Filesystems and Storage Performance

  1. Storage Hardware in 2026 (NVMe, CXL Memory Expansion)
  2. Filesystem Performance Characteristics (ext4, XFS, btrfs, ZFS)
  3. Kernel Page Cache and Read-Ahead Behavior
  4. Distributed and Cloud Storage Trade-offs
  5. Storage Tuning for Different Workload Types

Chapter 9: Database Performance and Query Optimization

  1. How Databases Execute Queries (Planners, Optimizers)
  2. Indexing Strategies and Trade-offs
  3. PostgreSQL Performance Tuning in Practice
  4. Connection Pooling and Query Caching
  5. Distributed Database Performance Patterns

Chapter 10: Networking Performance and Protocols

  1. TCP Behavior and Its Performance Implications
  2. HTTP/2, HTTP/3, and QUIC in Production
  3. Serialization Formats: Protobuf, MessagePack, FlatBuffers
  4. Compression Trade-offs (CPU vs Bandwidth)
  5. Network-Aware Application Design

Chapter 11: Distributed Systems Performance

  1. Latency Amplification in Distributed Calls
  2. Consistency Models and Their Latency Costs
  3. Partitioning and Sharding for Performance
  4. Backpressure and Flow Control Patterns
  5. Designing for Tail Latency in Distributed Systems

Chapter 12: Compiler Optimizations and JIT Compilation

  1. How Compilers Optimize Your Code (LLVM Passes)
  2. Auto-Vectorization and SIMD
  3. Link-Time Optimization and Whole-Program Analysis
  4. JIT Compilation in JVM and V8
  5. Verifying Compiler Optimizations with Compiler Explorer

Chapter 13: Profiling Tools, Flame Graphs, and Performance Diagnosis

  1. Sampling Profilers vs Tracing Profilers
  2. Linux Performance Tools (perf, ftrace, bpftrace)
  3. Creating and Interpreting Flame Graphs
  4. Language-Specific Profilers (async-profiler, pprof, py-spy)
  5. Systematic Diagnosis from Profile Data

Chapter 14: Benchmarking Methodology and Load Testing

  1. Designing Valid Microbenchmarks
  2. Common Benchmarking Pitfalls and How to Avoid Them
  3. Load Testing Methodology (Ramp-up, Sustained, Spike)
  4. Statistical Significance in Performance Testing
  5. Tools: wrk, k6, JMH, Criterion

Chapter 15: Observability, Tracing, and Production Monitoring

  1. The Three Pillars: Metrics, Logs, Traces
  2. Distributed Tracing with OpenTelemetry
  3. Designing Performance Dashboards
  4. Alerting on Performance Degradation
  5. Diagnosing Production Incidents Systematically

Chapter 16: Cloud, Containers, and Kubernetes Performance

  1. Container Runtime Overhead and cgroups
  2. Kubernetes Resource Management (Requests, Limits, QoS Classes)
  3. Cloud Networking Performance Characteristics
  4. Serverless Cold Starts and Optimization Strategies
  5. Getting Predictable Performance on Shared Infrastructure

Chapter 17: End-to-End Case Studies

  1. Case Study 1: Optimizing a High-Throughput API Service (Go)
  2. Case Study 2: Database Query Performance Rescue (PostgreSQL)
  3. Case Study 3: Reducing Tail Latency in a Distributed System
  4. Case Study 4: Memory and GC Optimization in Java

References

General Performance Engineering

CPU Microarchitecture and Hardware

Memory Systems and Locality

Memory Allocation and Garbage Collection

Concurrency and Parallelism

Operating System Performance

Filesystems and Storage

Database Performance

Networking Performance

Distributed Systems

Compiler Optimizations and JIT

Profiling Tools and Flame Graphs

Benchmarking Methodology

Observability and Tracing

Cloud and Container Performance

Tools and Utilities

Academic Papers and Research

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub