Skip to content

Server Optimization

Minecraft BINGO is often a lot more demanding on the server than regular gameplay! The game sometimes doesn’t run very well, especially if you’re playing on a mid-range server with lots of players… and in a game where the objective is to explore as much as possible.

Ideally, you should look for a server to host on with at least 6GB RAM and adequate CPU power.

If you can get a dedicated server or use a machine that you own, that’s even better! (you won’t be competing for resources with shared hosting)

Game Settings

If you encounter significant lag, you might need to compromise with some of your game settings:

  • Reduce the view-distance and simulation-distance in server.properties
  • Set the bingo “Team Distance” to 0, so that every player starts out loading the same chunks. (less chunks will be loaded at the start of a game)
  • Install Chunky, and wait for the world to pre-generate before starting a game. (see the Chunky integration page for more info!)

JVM Flags

Check which version of Java you’re using!

If you have Java 22 or above (newer versions will have better results!) and more than ~8GB of RAM, I recommend the following:

-Xms10G -Xmx10G -XX:+UseZGC -XX:+ZGenerational -XX:+AlwaysPreTouch -XX:+PerfDisableSharedMem

Note that -Xms10G -Xmx10G will need to be changed depending on your available memory.

For example, if your host has 8GB of RAM, try setting these to -Xms7G -Xmx7G - you will need to provide a bit of overhead for other programs on the system.

Otherwise, use Aikar’s Flags. The Paper Documentation has some additional information on setting these up.

Optimization Mods

This is a list of server-side performance mods I’ve been using with a fair amount of success:

  • Lithium is a fairly standard optimization mod that doesn’t change any game behavior.

  • FerriteCore adds some widely-compatible memory usage enhancements.

  • ServerCore has a few improvements based on PaperMC, Purpur, and Airplane. A lot of these are turned off by default - I recommend only setting fast_biome_lookups = true on its default config to start with.

  • Krypton makes a lot of changes to server networking that I’ve seen improvements from. If you’re using a heavily modded server, you may want to leave this out, but it should work with most installs. See the Krypton FAQ/Wiki for more information.

  • C2ME drastically speeds up chunk generation, which makes elytra mode (and exploration in general) a lot more playable.

  • Very Many Players makes additional improvements to game logic & networking that can help with high player counts.

  • Async is fairly new and unstable (at the time of writing), but can significantly speed up entity performance.

Auto-save

Occasionally, you might notice a lag spike accompanied by a chat message that the game is saving. This can happen if your server is on an HDD instead of an SSD, or has a slow disk write speed.

If your server has plenty of RAM (for vanilla, probably about 10G or higher), then you can try turning off auto-save to avoid these lag spikes.

  • Minecraft does not have an option to configure the auto-save interval by default.
  • Your hosting provider might have an option for this (or an “auto save interval” config) that you can turn off or set to “0”.
  • Otherwise, you can turn this off by running /save-off before starting a game.

This means that the server will not save the game while you are playing. However, this should not affect most bingo games, as you aren’t keeping the world afterwards anyway!

If you start to see constant lag at some point during a game, then your server is likely running out of memory due to not saving its chunks! You’ll want to turn auto-save back on if that is the case.

Server Profiling

If you’ve done all this and you still have lag issues, you might just need a more powerful machine - but it’s worth checking a few things first:

What is the lag?

These are a few types of “lag issues” that I’ve encountered in the game - it’s good to categorize these when looking for a solution:

  • Client-side lag: things that only happen for one player, or don’t appear to have any effect on the server. For example, players might complain about rain causing lag; this is common on low-end graphics cards, and is not an issue with the server.

  • Desync issues: inconsistent game behavior that can be observed under a lot of lag or with buggy networking (which might be a connection issue or incompatible mods). This includes rubber-banding, blocks that won’t let you break them, and inventory items disappearing, which are usually fixed after logging off and back on.

  • Lag spikes: an occasional pause where the server cannot complete a task in the expected time, and needs to hold everything up until it’s done. This is usually caused by a specific action or event (such as a player entering the Nether), and the server can recover from it perfectly fine. These can become less noticeable with a more powerful server, but there is usually a root cause to these that can be fixed.

  • Constant lag: everything you do is delayed, and the server cannot complete its normal behavior in a reasonable time. This might indicate some kind of configuration issue, or that your machine just isn’t powerful enough to run the game. You might want to look into reducing the server view-distance and simulation-distance, or getting a more powerful machine.

Spark

I recommend installing spark to capture what your server is doing when running the game. You can use /spark profiler open to get a bunch of information about what’s taking up CPU time.

Note that a mod with a higher “Server thread” percentage does not necessarily mean that it is causing more lag. For example, Lithium usually gets a high percentage because it replaces a lot of server logic that would otherwise take a longer time to run.

Here are some of the numbers I’d recommend looking at:

  • Compare the “TPS” and “CPU (process)” graphs. Does the TPS drop at the same time as high CPU load? If the CPU is close to maxed out, that indicates that your system/host might not be powerful enough.

  • Look at “Memory (process)” - unfortunately, I don’t think this is recorded over time, so it only shows the most recent value. If this reaches 100%, you either need more RAM or something is allocating too many resources.

  • You might also want to look at the “Chunks” and “Entities” graphs. The PTA Gamers server stays around 20,000 chunks and 2,000 entities in an 8 player game (this may vary with server view-distance). These graphs should not show sharp increases/decreases unless players leave/join the game partway through.

  • Check the four areas labelled as “GC”. These measure whenever the JVM pauses to run garbage collection and clean up its memory allocations.

    If these average more than 100ms, they may be causing noticeable lag spikes. Make sure that you’re using the JVM Flags above and that they are configured correctly (note the adjusted values when using more than 12G of RAM).

    Using too much RAM can make the server perform worse because the GC has more work to do! For a vanilla server with 10 or so players, 6-10GB is a reasonable range.