|
With just 30 minutes of troubleshooting, how close can you get to finding the root cause of a Java
performance problem? What observability tools would you use? What subsystems would you investigate?
This book is a short curriculum in Java performance tuning for Java server-side developers. It explores
one methodical approach to getting the most out of your 30 minutes and aims to show that much more is
possible than is generally thought, even for Java developers with little exposure to performance tuning.
The brevity of this book is attributed to a sharp focus on only the worst problems seen in the author’s
10 years of working exclusively as a lead Java performance engineer with Java distributed systems. That said,
the tools and techniques can be used to find pretty much any defect.
This book is heavy on walkthroughs of performance problems that you can download from github.com
and run on your own machine. The hands-on examples provide a rich, in-the-trenches experience that a
book-only approach can’t provide, not even a much larger book.
The reader will learn a methodical, easy-to-remember four-step tuning approach, called the P.A.t.h.
Checklist, that directs the reader’s attention to the right parts of the system and the right tools to find the
performance defects. If you’re wondering why I’ve chosen to capitalize the acronym that way, you’ll find out
in Chapter 4. Only open-source and freely available tools are used. In most cases, you will even see how the
monitoring data looks before and after a performance fix is applied. Here is the checklist:
• P: Persistence. Learn how to recognize and fix the most common JDBC performance
issues, ones that also apply to the NoSQL world.
• A: Alien systems. Detect when network calls to other systems cause slowdowns.
• t: threads. Learn how to identify CPU and response time issues using a low overhead
tool that can be used in any environment, even production.
• h: heap. With the Quick GC Health Check, the reader will use a red-yellow green
approach to assess whether GC performance is healthy. It also provides direction for
more advanced techniques like finding/fixing memory leaks.
Generating a production-like workload is required to identify these defects, so there are a few chapters
to get you up and going quickly to create load scripts to stress out your system. Among other topics like
load scripting priorities and avoiding common pitfalls, the reader will learn a unique approach to deciding
exactly how many threads of load to apply to show whether your system is scalable. |