Easy JVM CPU profiling with WarmRoast

WarmRoast is a web-based CPU sampler for the Java Virtual Machine.

  • Adjustable sampling frequency.
  • Supports loading MCP mappings for deobfuscating class and method names.
  • Web-based — perform the profiling on a remote server and view the results in your browser.
  • Collapse and expand nodes to see details.
  • Easily view CPU usage per method at a glance.
  • Hover to highlight all child methods as a group.
  • See the percentage of CPU time for each method relative to its parent methods.
  • Maintains style and function with use of “File -> Save As” (in tested browsers).


Just start WarmRoast up using your terminal/shell (or even desktop).


Connect to it with your web browser. If you’ve filtered all threads out but the main server thread, then you’ll see only the server thread.


Let’s expand it out to see where most of the tile entities run. (We’ll use a modded server in this example.) The numbers on the left indicate how much the selected entry takes up as a percentage of each parent routine.

Note: Only a non-modded Bukkit server, you need to look for playerJoinedWorld() and entityJoinedWorld(). That’s for entity and tile entity ticking, contrary to the names of those routines.


To understand what all this means, note that the first routine called is run(). 100% of the time in this routine was actually spent in the run() below it. However, 99.92% of the total time was actually spent in q(). If we keep going down to the highlighted line, then we can see that 17.32% of the total time was spent calling g() in the class “” That tells us that 17.32% of the entire server’s CPU time (in the game thread) was spent on that particular function of that mod.

h() happens to be the “run all the tile entity ticking code” routine (hovering over the orange labels gives possibilities for unobfuscated names), so that basically tells us that 19.35% of the “entity ticking code” was spent on the particular function of that mod.

If we examine the results further, we see where blocks are processed (as opposed to entities and tile entities). Blocks consume less than 4% of server CPU on this server.


If we wanted to do something here, then we might consider lowering how much CPU the tile entities take (by removing mods or disabling features).

Get WarmRoast

See the README for download and usage information.

  • Jadedwolf


  • Artemis2

    Very good work! I hope it will help some beginners admins to understand from where lag comes.

    sk89q, amazing (as usual).

    • sk89q

      Ha, I am using locale-specific number formatting for the percentage point numbers, so it prints XX,YY% rather than XX.YY% (comma versus full stop) for half of the world, but web browsers only accept full stops as the decimal mark.

  • Dave

    Having some trouble getting started. If anyone has any insight into Error: Could not find or load main class java.library.path=.usr.bin I’d appreciate it. Running in CentOS. Have java 7 and jdk installed.

    • Verttex

      Your %PATH% isn’t set up correctly.

  • Martin Frühauf

    It says the following, after I ran that command: ‘java -Djava.library.path=/usr/lib64/jvm/jre1.7.0_21/jre/bin -cp /usr/lib64/jvm/jre1.7.0_21/lib/tools.jar:warmroast.jar com.sk89q.warmroast.WarmRoast –thread “Server thread”‘:

    Fehler: Hauptklasse com.sk89q.warmroast.WarmRoast konnte nicht gefunden oder geladen werden
    (Error: Main class com.sk89q.warmroast.WarmRoast could not be found or loaded)

    What did I do wrong?

    • sk89q

      Does warmroast.jar exist?

      That error means that it looked in the files:

      * /usr/lib64/jvm/jre1.7.0_21/lib/tools.jar
      * warmroast.jar

      For the class com.sk89q.warmroast.WarmRoast, but it didn’t find it. Java won’t complain if one of those files doesn’t exist.

      • Martin Frühauf

        Yes, (now) it exists, but there is a new error:
        I believe the tools.jar does not exist in the folder “/usr/lib64/jvm/jre1.7.0_21/lib/” (I didn’t found it)…

        • sk89q

          You need to be using the JDK and not the JRE.

  • jakimfett

    When I start up warmroast and attempt to select my server, I get this error: Unable to open socket file: target process not responding or HotSpot VM not loaded
    at com.sk89q.warmroast.WarmRoast.main(

    • sk89q

      Are you using it under the same user as the server process?

      • jakimfett

        In theory, yes. I’m running Multicraft, so everything is running under the “root” account. Also, the root account is the only user account that shows any java processes other than the warmroast process.

        • Tatara88

          multicraft starts its processes under the multicraft user account.

          • jakimfett

            Actually…multicraft runs under the user that you specify in the config. The multicraft daemon runs as the root user, and then you can specify either a single user to run the servers as (by default, username ‘multicraft), or each server as its own user. My config is set to run each server under its own user, but when i run warmroast under that user, nothing shows up except the warmroast process. The root user shows all the running servers, but when I select one of them, the error I pasted above happens.

  • Karl

    Works perfectly, but one issue though, when I try to select another VM.
    The default VM: [1] com.sk89q.warmroast.WarmRoast –thread Server thread

    works just fine.

    But the craftbukkit VM doesn’t work;

    • sk89q

      Are you running the server under a JRE?

      And WarmRoast under a JDK?

      And who maintains the JRE? Is it OpenJDK? What about the JDK? Oracle?

      • Karl

        Right, let’s see,

        The server is running under JRE; java-1.7.0-openjdk-
        WarmRoast is running under The Oracle JDK. jdk1.7.0_25

        That’s it, I think.

        • sk89q

          Since you have the JDK now, you might as well just run the server under the JDK too.

          • Karl

            Awesome, thanks!

            Everything works now.

            Just a question. Is it supposed to show something on the main page, or are you required to click View sampler results button thingy?

  • Fl_Dutchman

    I get this Error:

    Exception in thread “main” java.lang.UnsatisfiedLinkError: no attach in java.library.path

    at java.lang.ClassLoader.loadLibrary(Unknown Source)

    at java.lang.Runtime.loadLibrary0(Unknown Source)

    at java.lang.System.loadLibrary(Unknown Source)




    at com.sk89q.warmroast.WarmRoast.main(

    I do use the same user for this programm and for the minecraft server.

    • DerFlash

      Same here. Started from within /home/games/bin/ with:
      java -Djava.library.path=/home/games/minecraft/servers/main -cp /home/games/bin/jdk1.7.0_40/lib/tools.jar:/home/games/bin/warmroast.jar com.sk89q.warmroast.WarmRoast –thread “Server thread”

  • fabio sepulveda

    como mierda se descarga

  • Daniel Gaardbo Christensen

    I get this error :(

    Failed to attach VM well-known file is not secure
    at Method)
    at 117)
    at com.sk89q.warmroast.WarmRoast.main(

  • Trollface

    hey SK, your plugins work very well for my server! Finally i can remove p***s pixelarts from my creative server :D

  • an

    Would love to compare previous results with current results.

    • an

      Or even as far as automagically showing anomalous changes.

  • fredghostkyle

    win. 8 got to love it :P

  • Slind14

    How does this work with opne jdk ? There is no tools.jar

    • sk89q

      Unfortunately, I don’t think it does.

  • pyrex

    I got it installed and running. When I go to the website, it loads but no threads are displayed.

    • sk89q

      Try removing –thread “Server thread”

  • Philip Lawall

    I installed it and it is running but the WebInterface doesn’t show any Data

    • sk89q

      Make sure to click “View sampler results”

    • user921

      gives this error

      Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/tools/attach/
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
      at java.lang.Class.getMethod0(Unknown Source)
      at java.lang.Class.getMethod(Unknown Source)
      at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
      at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
      Caused by: java.lang.ClassNotFoundException:
      at$ Source)
      at$ Source)
      at Method)
      at Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      … 6 more

      • sk89q

        Check the path that you have to PATH_TO_JDK/jre/bin and make sure that it has an attach.dll in it (or .so on Linux probably).


    why i can’t open it

    • TANJX

      how to start WarmRoast up?
      i can’t understand the description.
      please make a video.thanks

  • hook

    I cant use the Oracle JDK, is it possible to get this to run on openjdk?

    • hook

      PS. tools.jar does exist when openjdk-6-jdk is installed.

      But I get the error:

      Exception in thread “main” java.lang.UnsupportedClassVersionError: com/sk89q/warmroast/WarmRoast : Unsupported major.minor version 51.0

  • therealduckie

    Runs, but errors our on starting webserver.

    Any clues in this?

    Posted image of error plus pastebin of same.

    Running BungeeCord on Debian Linux with JDK1.7.0

    Using this command: /opt/jvm/jdk1.7.0/bin/java -Djava.library.path=/opt/jvm/jdk1.7.0/jre/bin -cp /opt/jvm/jdk1.7.0/lib/tools.jar:warmroast-1.0.0-SNAPSHOT.jar com.sk89q.warmroast.WarmRoast –thread “Server thread”

    Thanks for any help you can offer.

    • sk89q

      That error would be thrown if you weren’t using Java 7. Maybe try using a newer version of Java 7?

  • Danny

    Not sure what this means. Unless Warmroast doesn’t like openjdk.

    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
    at sun.rmi.transport.StreamRemoteCall.executeCall(
    at sun.rmi.server.UnicastRef.invoke(
    at Source)
    at com.sk89q.warmroast.WarmRoast.connect(
    at com.sk89q.warmroast.WarmRoast.main(
    Caused by:
    at sun.rmi.transport.StreamRemoteCall.executeCall(

    • Danny

      Decided to stop all my servers, uninstall openjdk and install oracle jdk on all of them. Warmroast works perfectly fine.

  • Rob

    I would really love to give this a try but this is what I get when I run it with a .bat.

    A:MinecraftServerwarmroast>java -Djava.library.path=C:Program Files (x86)Ja
    vajdk1.7.0_71jrebin -cp C:Program Files (x86)Javajdk1.7.0_71libtools.jar
    ;warmroast-1.0.0-SNAPSHOT.jar com.sk89q.warmroast.WarmRoast –thread “Server thr

    Error: Could not find or load main class Files


    Press any key to continue . . .

    • sk89q

      You need to put quotation marks around the staff after -cp but before com.sk89q

      • Rob

        Ok so I’ve tried placing the quotation marks like you suggested, I ended up with the same result. I’ve also read through as many comments on this as I could find, as a result I’ve uninstalled all of my java programs. I reinstalled the 64bit Version 7 Oracle JDK (I downloaded the 32bit the first time) and set up my server to run off the JDK enviroment. I updated my paths to run the 64bit version but now when I run the .bat this is what my console tells me:

        C:UsersScotDesktopwarmroast>java -Djava.library.path=C:Program FilesJavajdk1.7.0_71jrebin -cp “C:ProgramFilesJavajdk1.7.0_71libtools.jar;warmroast-1.0.0-SNAPSHOT.jar” com.sk89q.warmroast.WarmRoast –thread “Server thread”

        Error: Could not find or load main class FilesJavajdk1.7.0_71jrebin


        Press any key to continue . . .

        I’m gunna keep tinkering, hopefully I’ll figure it out! :)

        • Rob

          Just to make sure, you need to have the warmroast.jar in the same folder as the .bat correct?

        • Rob

          Hey got it working!!!!! Just some formatting issues. If anyone has the same issue I’m running Windows 7 Ultimate 64bit with JDK7 64bit, this is the .bat I used:

          java -Djava.library.path=”C:Program FilesJavajdk1.7.0_71jrebin” -cp “C:Program FilesJavajdk1.7.0_71libtools.jar;warmroast-1.0.0-SNAPSHOT.jar” com.sk89q.warmroast.WarmRoast –thread “Server thread”



          Your file path will obviously be different but at least this might give you an idea of the format.

          Thanks sk89q!!!! I’m going to love using this, no more trial and error lag trouble shooting! :D

  • Ixchel

    I’m having some trouble. I went here and downloaded the zip (on the right side.) I got a bunch of folders inside of folders and when something says it is a java file it won’t execute it. I also have winrar btw idk if that helps

  • 1010790

    I managed to download the source first by accident but got the jar correctly, i then made the .bat file i would need. Placed the jar and the bat file in the same folder and proceeded to use this code java -Djava.library.path=C:Program FilesJavajdk1.8.0_51/jre/bin -cp C:Program FilesJava

    jdk1.8.0_51tools.jar;Roast.jar com.sk89q.warmroast.WarmRoast –thread “Server thread”

    I changed it to roast.jar instead because it was shorter and i had already done it before i made the .bat file. Anyways when this is run i added pause to the end to see the console before it shuts off and cmd says it cannot find or load main class file in the ending file jdk1.8.0_51/jre/bin. Any help would be GREATLY apreciated as to what’s going wrong. Besides the name and location no other piece of the run command is changed. Side note i have run it without changing anything and i recieve the same errors.

    • 1010790

      Disreguard this, i added the quotes i needed after scrolling down and i’m posting a picture of my new error.