WarmRoast is a web-based CPU sampler for the Java Virtual Machine with a few select features tailored for diagnosing Minecraft servers and clients.
- 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 “appeng.me.tile.TileController.” 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).