Course contents

Module 07

Java Performance Engineering

Find and fix bottlenecks the way high-scale teams do: measure, profile, reduce memory footprint and tune, with real case studies.

Premium5 free lessons9 topics46 lessons & question sets2 ready

By the end of this module you can

  • Measure before optimising, with the right metrics and tools
  • Find CPU, memory, I/O and contention bottlenecks
  • Reduce memory footprint and GC pressure in real code

Performance mindset

Latency, throughput, percentiles and measuring first.

  1. Latency vs throughputLessonFreeSoon
  2. Percentiles and tail latencyLessonFreeSoon
  3. Measure first: a performance workflowLessonFreeSoon
  4. Little's law and capacityLessonPremiumSoon
  5. Performance mindset: interview questions & scenariosInterview Q&APremiumSoon

Finding bottlenecks

Recognising CPU, memory, I/O, contention and GC problems.

  1. CPU-bound bottlenecksLessonPremiumSoon
  2. Allocation and memory bottlenecksLessonPremiumSoon
  3. I/O-bound bottlenecksLessonPremiumSoon
  4. Lock contentionLessonPremiumSoon
  5. GC pausesLessonPremiumSoon
  6. Finding bottlenecks: interview questions & scenariosInterview Q&APremiumSoon

Tooling

Profilers, flame graphs and benchmarking done right.

  1. Java Flight Recorder and Mission ControlLessonPremiumSoon
  2. How to read a flame graphLesson · 15 minFree
  3. async-profiler in practiceLessonPremiumSoon
  4. jcmd, jstat and VisualVMLessonPremiumSoon
  5. Benchmarking with JMHLessonPremiumSoon
  6. Tooling: interview questions & scenariosInterview Q&APremiumSoon

Memory footprint

Making the same work use less memory.

  1. Object overhead and compressed oopsLessonPremiumSoon
  2. Boxing vs primitivesLessonPremiumSoon
  3. Sizing collectionsLessonPremiumSoon
  4. String memory optimisationsLessonPremiumSoon
  5. Off-heap memoryLessonPremiumSoon
  6. Memory footprint: interview questions & scenariosInterview Q&APremiumSoon

CPU & JIT

Writing code the JIT can optimise.

  1. JIT-friendly codeLessonPremiumSoon
  2. Inlining and megamorphic callsLessonPremiumSoon
  3. False sharingLessonPremiumSoon
  4. CPU & JIT: interview questions & scenariosInterview Q&APremiumSoon

Concurrency performance

Scaling with threads instead of fighting them.

  1. Reducing contentionLessonPremiumSoon
  2. Tuning thread poolsLessonPremiumSoon
  3. Virtual threads for I/O-heavy servicesLessonPremiumSoon
  4. Concurrency performance: interview questions & scenariosInterview Q&APremiumSoon

I/O & serialization

The hidden cost of I/O, JSON and connections.

  1. Buffering and batching I/OLessonPremiumSoon
  2. Serialization and JSON costsLessonPremiumSoon
  3. Connection poolsLessonPremiumSoon
  4. I/O & serialization: interview questions & scenariosInterview Q&APremiumSoon

GC tuning

Heap sizing, pause goals and allocation rate.

  1. Java memory management: heap, G1 and the signals that matterLesson · 21 minFree
  2. Heap sizingLessonPremiumSoon
  3. Pause-time goalsLessonPremiumSoon
  4. Allocation rate and GC pressureLessonPremiumSoon
  5. GC tuning: interview questions & scenariosInterview Q&APremiumSoon

Case studies

Real incidents from symptom to root cause to fix.

  1. Case study: the slow endpointLessonPremiumSoon
  2. Case study: memory keeps growingLessonPremiumSoon
  3. Case study: the CPU spikeLessonPremiumSoon
  4. Case study: thread pool exhaustionLessonPremiumSoon
  5. Case studies: interview questions & scenariosInterview Q&APremiumSoon

Module interview question bank

Finish the module

Module interview question bank

Every interview question worth practising for Java Performance Engineering, grouped by topic, with model answers, how to say them and what-if follow-ups.

Being written: it grows as the topics in this module are finished

PremiumSoon