This tutorial/guide will teach you how to use the Lag Goggles Minecraft mod to diagnose lag on both the server and client.
Lag Goggles is a client-side and server-side mod that allows players to see a visual representation of the amount of delay that blocks, and entities are currently causing on the server. Completed scans with Lag Goggles are measured in nanoseconds (ns).
Like most mods, Lag Goggles can be downloaded on Curseforge. [link] If you are unsure of how to add files to your mods folder, you can follow the steps listed here. It is required to have Optifine installed or included in your mods folder to avoid crashes.
Getting started with profiling
Upon logging into the server, press the Insert* key on your keyboard. On the screen, you will be presented with the Lag Goggles UI. To start a profile click “Profile for 20 seconds” and wait for the profiling process to finish. You can change the length of profiling by hovering over the button and using your scroll wheel. You can select between profiles lasting 5, 10, 15, and 20 seconds respectively on Mystical Machines. However, in a singleplayer world, profiles are not bound to a short time frame.
* If the keybinding does not work, go to Options -> Controls, rebind the hotkey and try again.
Lag Goggles UI presented to a player.
Understanding the lag threshold
Once your profile has finished, you will see blocks and entities marked with colors ranging from green to red.* Items with a higher value of nanoseconds will be shown with a hue closer to red or blue (depending on the player’s set COLORS* option). The higher the value an item has, the more impact it has on the server performance and may produce delays in interactions across the server if the value reaches an extremely high amount. With modded Minecraft, modded elements may not have efficient coding which can contribute to degraded server performance. It is highly recommended to be sensible with modded elements for this reason. Should you use such an element, it is best to explore alternatives that are less impactful and still get the job done all while checking back using Lag Goggles to moderate stability of your builds and setups. Once you are done viewing your profiling results, press the Insert key again and click “Hide latest scan results.” Before profiling again, you can bring back your previous results by clicking “Show latest scan results.” Keep in mind that this will only show results from the last profile that was run during your current game session.
* This option can be changed to assist those with colorblindness. See ‘Options’.
A finished profile with displayed results using the Green to Red COLORS option.
Mob entities when meeting the minimum number of nanoseconds to be detected by Lag Goggles.
At the bottom of the UI, you will find the Options button for the mod. Here, you can alter the color gradient to suit your needs if you are colorblind. You can also set the threshold of microseconds a block or entity would have to meet or pass before it is shown in deep red or deep blue referring to a high amount of delay in the WORLD scan process. You can do the same for the FPS scan which will detect an impact on the client’s Frames Per Second. Lastly, you can set the minimum amount of microseconds before a block or entity is detected by Lag Goggles. This option only affects WORLD scans.
Lag Goggles configuration screen.
This wiki article was written by HeLiX_iS_BeTa. Mystical Machines appreciates wiki article contributions a lot! Want to help out as well? Would you love to submit a wiki article about your favorite mod? Feel free to reach out to an Administrator to see how to submit an article!