Friends of OpenJDK Today

Java Profiling Overview

November 14, 2022

Author(s)

  • Johannes Bechberger
    Johannes Bechberger

    A JVM developer working on profilers and their underlying technology, e.g. JEP Candidate 435, in the SapMachine team at SAP.

When I ask Java developers whether they do profile, the answer is usually "no".

The few that profiled before usually used VisualVM as a student and maybe JProfiler or YourKit years ago at work.

One of the reasons for this is a lack of available information and thus knowledge for everyday Java developers.

This is a pity as profiling should be a part of the tool belt for every experienced developer (not just for Java). The problem is that most of the open-source profilers are targeted to the OpenJDK developers (or their colleagues), even if they won't admit it. This can be seen in the lack of entry-level material on this topic and even the little that is out there is distributed across multiple conference websites, blogs, YouTube channels, and Twitter accounts.

A few months ago I started working on this topic and as a result, held a talk at the Java User Group Karlsruhe in the middle of October: It is an introductory talk answering the simple questions: Why should we profile? Which profilers to use? How to obtain and view these profiles? A recording can be seen on YouTube:

The gist of this talk is:

  • Why? Profiling helps you find the parts of your code that are slow and that are worth to be fixed.
  • Which and how? The consensus seems to be to use JFR or async-profiler with --jfrsync and JMC as a profile viewer.

While working on this talk, I collected a list of interesting conference talks on this topic:

This list includes talks on a variety of profilers, ranging from deep dives to overviews. Many of these talks and people were recommended elsewhere on the internet, on blogs, on Twitter, or in private conversations. Which I present in the following.

I start with a collection of notable blogs which you definitely read if you're interested to go deeper into profiling:

Even the decade-old posts on these blogs are worth reading, as the foundations of profiling did not change in the last few years. Only the tools themselves got more powerful.

In addition to the profiling-focused blogs there are also one-of resources in other locations:

My collection process started before people considered leaving Twitter, so here is a list of people that can be followed on Twitter (and Mastodon) that tweet regularly on the topic of profiling and performance engineering:

Following these users, you can keep up to date in the field of open-source profiling and discover new talks and discussions regularly.

I know that these resources probably won't cover the need of everyone. The lack of entry- and mid-level tutorials and talks is still a problem. So I hope that many people from the vibrant profiler community see this outreach not as a burden, but as a virtue: Helping people to discover the joy in profiling and all the neat features that modern profilers have to offer.

If you think I missed a nice resource: Send me a tweet @parttimen3rd or a toot @[email protected] and open a Pull Request to the collection repo on GitHub. I'm also happy to hold a talk on the topic of profiling at your local user group.

This whole endeavor is part of my work in the SapMachine team at SAP. This blog post first appeared on my personal blog mostlynerdless.de.

Topics:

Related Articles

View All
  • Continuous Production Profiling and Diagnostics

    I’ve gotten a lot of questions about continuous production profiling lately. Why would anyone want to profile in production, or, if production profiling seems reasonable, why the heck leave it on continuously?

    I thought I’d take a few moments and share my take on the problem and the success I’ve seen the past years applying continuous production profiling in systems in the real world.

    Profiling these days is no longer limited to high overhead development profilers. The capabilities of the production time profilers are steadily increasing and their value is becoming less controversial, some preferring them for complex applications even during development.

    Read More
    November 09, 2020
  • External Debugging Tools 1: dtrace and strace

    With these tools, track bugs within an application and its external dependencies without the source or deep knowledge of the environment!

    Read More
    August 05, 2022
  • Get Started with JDK Flight Recorder

    Java Flight Recorder is the profiler you can use in production, continuously.

    Flight Recorder has been available before in the JDK, e.g., it shipped as part of the JDK 8, but to use it, it required that you set specific commercial VM flags to unlock Flight Recorder, this is not anymore necessary from Java 11 onwards.

    Read More
    Avatar photo
    November 02, 2020

Author(s)

  • Johannes Bechberger
    Johannes Bechberger

    A JVM developer working on profilers and their underlying technology, e.g. JEP Candidate 435, in the SapMachine team at SAP.

Comments (1)

Your email address will not be published. Required fields are marked *

Highlight your code snippets using [code lang="language name"] shortcode. Just insert your code between opening and closing tag: [code lang="java"] code [/code]. Or specify another language.

Save my name, email, and website in this browser for the next time I comment.

Java Profiling Overview – JUGBD

[…] post Java Profiling Overview appeared first on […]

Subscribe to foojay updates:

https://foojay.io/feed/
Copied to the clipboard