Workshop: Profiling JVM Applications in Production
Profiling JVM applications it not very easy in the first place. Many profilers, such as JVisualVM and jstack, will simply lie to your face about which call stacks are hottest and where your bottlenecks lie. Profiling in production environments has even more challenges, because you have to carefully manage overhead, account for other processes running on the system, and choose non-invasive tools that don't require an application restart. This is the workshop for you -- we will learn, understand, and experiment first-hand with JVM profiling tools designed for production use.
We will build a simple checklist for verifying JVM application performance, and finding the area to focus on in a closer investigation. Then, we will experiment with two approaches for CPU profiling on Linux: the perf multi-tool, combined with perf-map-agent, and the async-profiler project, an innovative tool that brings perf together with traditional JVM profiling techniques. We will visualize stack traces using flame graphs, and understand where the CPU bottlenecks lie, through a series of hands-on labs. In the second half of this workshop, we will talk about more complicated scenarios: diagnosing errors when opening files, tracing database queries, monitoring system I/O load, understanding the reasons for excessive garbage collection, figuring out why threads are blocked off-CPU, and more.
Outline:
- Linux and JVM performance information sources: tracepoints, {k,u}probes, USDT, JMX, JVMTI, Java SA, JFR, GC/JIT logs
- Linux JVM performance checklist: top, sar, free, iostat, pidstat, vmstat, jstack, jstat (based on hsperfdata), jcmd, jattach
- Linux perf, CPU sampling, getting stack reports, problem with symbols
- Generating perf maps with perf-map-agent, inline frames, source info
- Visualizing JVM profiles with flame graphs
- JVMTI profiling with an agent & jattach: GetAllStackTraces, exceptions, class loads, monitor contention [link] etc.
- Full-stack JVM profiling with async-profiler, how it works, pros and cons
- Introduction to BPF
- BPF scenarios and the BCC toolkit, Java-specific tools, JVM USDT probes, -XX:+ExtendedDTraceProbes
- Dedicated BCC tools: fileslower, opensnoop, gethostlatency, runqlat, cpudist
- General-purpose BCC tools: trace, argdist, funccount, stackcount, funclatency
- Heap allocation profiling (based on TLAB sampling) with async-profiler vs. funccount/stackcount vs. grav
Tracks
Monday, 4 April
-
Architectures You've Always Wondered About
Hard-earned lessons from the names you know on scalability, reliability, security & performance.
-
Innovations in ML Systems
Discover how to operationalize machine learning applications that are scalable, secure, interpretable.
-
Developer Enablement - The Secret Weapon
How to supercharge developer productivity and happiness.
-
Performance & Mechanical Sympathy
Wrangling computer architectures to achieve your performance goals.
-
Current Trends in Frontends
Emerging frameworks and tools for web & mobile frontends.
Tuesday, 5 April
-
Building and Evolving APIs
How would you design and implement your APIs if you were starting today?
-
Staff-Plus Engineer Path
What are the skills you need to develop if you want to stay on the technical track to technical lead, staff, or principal? What will it take to thrive in this type of role?
-
Debug, Analyze & Optimise... in Production!
Learn how to make the most out of your observability.
-
Resilient Architectures
Building systems that can handle failures.
-
Modern Java
New, shiny, and proven – making your Java life better.
Wednesday, 6 April
-
WebAssembly & Modern Systems Programming Languages
Writing efficient code with modern systems languages like Rust and WebAssembly
-
Effective Microservices: What It Takes to Get the Most Out of This Approach
Patterns for building, organizing, observing & operating microservices in the real world.
-
Modern Data Pipelines & DataMesh
Learn about emerging solutions for creating modern data pipelines for common data challenges.
-
Optimising for Speed & Flow
Discover processes, practices & organizational structures that can help us build & release faster.
-
Enterprise Blockchain
Real-world examples and case studies on blockchain, DeFi, Web3, and more.