Use Observable to Diagnose Lag in Minecraft

Overview

Observable is a mod that can profile entities and blocks (tile entities) in a server and show you in an organized way what is taking the most tick time. It is extremely useful in troubleshooting lag and identifying sources of lag. It uses an in-game GUI paired with (in later versions) a web-based results list. It even has an in-game 3d overlay that highlights laggy blocks and mobs. You can also easily teleport to any laggy entitiy, block, or chunk!

Download Observable from their Curseforge page here.

Observable is not a replacement for spark. Spark does several things observable cannot, such as give detailed traces of server processes that are taking up tick time, show detailed RAM info, sort by specific laggy ticks, and many other things. However, observable does many things spark cannot, such as give a simple visualization of lag, find specific laggy chunks, quickly show individual laggy entities and blocks, and let you teleport to these places. Both mods can be used to effectively troubleshoot lag on a server.

🚧

The default hotkey to open the Observable GUI is R. If it is included in your modpack by default, it may be a different key. You can check the key binding in the controls menu. Look for "Show profiler Screen"

How to use Observable

Here is a handy guide on how to use observable and some of its features. For this tutorial, we will be using the 1.19.2/1.19.3 version of Observable. The main difference is this version includes a web-based results list, while older versions had the results directly in the GUI. Functionally, they are almost identical so you can use this tutorial with older versions, but it may look a bit different. This tutorial is made with the Cottage Witch modpack which has several mods you may see in the results. Also, many of the screenshots have relatively normal stats from a server that is not lagging.

  1. Press the Observable hotkey to open the interface. Here you will see several buttons. The one we care about now, and the only one you're likely to need regularly, is the Profile TPS button. Click this and it will run with a timer visible on screen. You can close the GUI while this is running.

  1. When the profile is finished, Observable will put the URL of the results into the chat for you. Click that and click Yes to view the results.

  1. Now we're looking at the web page that has the results. The default tab is the Individual Results tab. Here you can see a list of mobs and entities and blocks sorted in order of us/t or microseconds per tick. The higher this number, the more lag that entity produces. So check to see if any entities in this list have a much higher us/t than everything else. In these results below, you can see that a player is using a lot of us/t, which is relatively normal. Generally, most things should be below 1000 us/t. Things to check for are very high numbers or if a single type is showing up several times in the page. On this page you can see that the Hexerei mixing cauldron shows up a lot, because every cauldron uses more us/t than the average block. So do beacons and hoppers. So avoid placing a huge number of these blocks!

  1. Now we're looking at the Aggregate Results tab. This combines all entries of the same type into one entry so you can get a good idea of the total us/t a single type is causing. You can also see how many ticks total each entry ticked. Most entries will not be active every single tick, so keep an eye on the ones with the highest total ticks because these can cause a bit more lag than entries with a low total of ticks. This tab is good for finding entities, mobs and blocks that don't have any very laggy individuals but together can cause huge amounts of lag. For example, if you have someone using 300 hoppers to move items around, each hopper won't be laggy so they might not show up in the individual results tab, but the lag will add up among all of them and you will be able to see that here. In this screenshot you can see that Hexerei mixing cauldrons are causing a bit of lag. Same with players, but players are usually at the top no matter what so we can ignore that unless the number is very very high. In this instance, it might be good to tell everyone to limit their usage of Hexerei cauldrons to one per player, and to try not to chunkload them.

  1. The final tab we'll be looking at is the Chunks tab. This lists all chunks in order of us/t they take. This is a good way to find very laggy bases or large groups of mobs. It doesn't have very much information on the page other than chunk location and tick time. But if you click the "Visit" link, it will copy a teleport command to your clipboard so you can paste it into minecraft with CTRL+V and visit that chunk! We will show an example of how to teleport to locations and find lag in the rest of the tutorial.

Example of a Laggy Server's Observable Results

Below is a series of images that show a server with a large lag source that we will find using Observable.

  1. The initial scan. The individual results tab looked normal so we skipped that. Here is the aggregate results tab, which shows cows as the laggiest object, and they are active during a high number of total ticks as well.

  1. Here is the list of chunks. You can see one that stands out at the top. To visit, I will click "Visit". Then that copies a teleport command to my clipboard.

  1. Now, I enter into spectator mode to more easily find objects, which is /gamemode spectator. Then I paste in the teleport command I just copied from the results page and run it. In the next 3 images you can see the 3d overlay feature of Observable. Note how the color changes depending on the amount of lag each block or mob is generating. Not every red box is bad, but if there are a lot of them in one place, that's something to be concerned about. You can see the Tom's Crafting Terminal and Hexerei Mixing Cauldron from the following screenshots in the previous results list as well.

  1. Now I fly outside of the building and see this. Lag source found! Once most of the cows were gone the server lag settled down.

  1. Now that the lag is gone, you can disable the 3D lag overlay by pressing the Observable hotkey, then unchecking the "Overlay" box.