Lag Info & Guidelines

For the record, we have to re-post this information every few months, for all the new people, so don’t take it personally if you fall under the “offenders” here.

For many of the players new to the server or this is your first time playing multiplayer. We won’t bore you with technical jargon (yet) but suffice to say that keeping a server running with the amount of people we have on simultaneously can be a daunting project. Spigot has helped immensely in assisting with this, and to be fair, it is 1000 times better performing than it would be in Vanilla, so let me give you some background on that, and why we may freak out a little when we see massive herds of sheep or we’re asked to have 4 beacons placed in the same chunk…

“On July 2nd, 2013, Tonya and I ran into a big problem. We had been hosting the server from our house, and 1.6 had just been released (the “horse” update). We had a decent box running the server, in Vanilla, but it just wasn’t cutting it. We had CPU spikes lasting minutes and crashes every half hour, and lag for days. It wasn’t a good thing.
It was at this point that we had to find a third-party hosting company to manage the server. We’ve been through 6 providers at this point, and I’m happy to say that we’ve been with Fragnet now for several years, and have had minimal problems with them.” ~Serverus

That being said, server hosting is expensive (at least it is for what we run), and we have two of them, so when a server becomes laggy, there are only three things you can do to alleviate the situation:

  • Install a framework that reduces lag (which we’ve done with Spigot)
  • Pay for a better plan with the provider (we’re currently at the 4GB plans with Fragnet)
  • Reduce lag on the server by eliminating resource-intensive entities

We’ve done the first, the second would cost us more money (which comes out of pocket and no we don’t take donations and I explain why that is in a separate post), and so we can only hope that we can educate everyone on the third.

Lately, we’ve received an amazing influx of new players. This is of course wonderful, and we are very happy to have more new blood running through the server’s veins. So it is understandable that we would need to update this again, and officially add this Lag page to the Server Rules information. Only by working together, and by being educated on the trials and tribulations of running a server, can we all find a place to play together where everyone wins.

What do you mean “chunk”? 

First, here is what we mean by “chunk”: Chunks are 16 blocks wide, 16 blocks long, and 256 blocks high (from bedrock all the way up to the maximum build height of the world). *This means: building vertical animal pens keeps all your mobs within the same chunk(s).

Visualization of the ground portion of a single chunk. The entire chunk extends up to a height of Y 256.

Visualization of the ground portion of a single chunk.
The entire chunk extends up to a height of Y 256.

Entities & Lag:

So without further ado, here are the ENTITIES that cause lag, from (supposedly) greatest to least:

  1. Horses

Horses are rideable, tamable, 4-legged lag beasts. They were the reason that we had to move to a third-party hosting provider when 1.6 came out. Having a bunch of them together in a single chunk or adjacent chunks can put intense strain on the server and especially for the players who are in those or surrounding chunks.

  1. Villagers

Villagers have an AI beyond what most of the entities in-game are given. Their complexities as part of the program are only restrained by the fact that they only take up 2 block spaces (as opposed to horses, which take up 4) so while it is easier for the server to track them, it is more difficult for it to understand what they are doing at any given time.
NOTE: Players have a maximum Villager limit of *11* which allows you to collect 1 of each Villager type or a mix of your choice. 

  1. Withers, Ghasts, Big Magma Cubes & Big Slimes

For different reasons, Withers because they are a boss mob, ghasts because they take up so many block spaces, and since both of them use projectiles. Magma Cubes and Slimes because they take up more blocks and can be broken up into smaller versions.

  1. Golems

Since Golems fight FOR you, they are intrinsically a more complicated mob than other aggressive mobs.

  1. Zombies

Yes Zombies! I know, you would think that one of the most common mobs in Minecraft would be low on the resource management list, but ever since they upgraded the AI to be super-efficient in finding and killing villagers, and since because of this, having a villager nearby seems to attract hordes of them at night, zombies are now one of the more laggy mobs. As an example of this, watch the following video:

 

  1. Endermen

I probably don’t need to explain this one.

  1. Anything riding anything else

Spider, chicken, and skeleton horse jockeys, to be more specific. Also, when you start riding anything.

  1. Pigs and Sheep

Again, for different reasons. Pigs, because you can put a saddle on them (meaning the server needs to keep track of whether it is saddled or not, being ridden or not, etc) and sheep because they can be any flavor of the Minecraft rainbow and therefore the server has to keep track of THAT.

  1. Wolves, Spiders and Zombie Pigmen

The server has to track whether or not the entity is aggressive depending on specific parameters (day/night cycle, been attacked, etc)

  1. Witches, Blazes, Creepers & Skeletons

Because they all use projectiles (well creepers blow up but same thing).

  1. Cows / Mooshrooms

They take up 4 blocks and go moo. That’s it (it’s harder for the server to keep track of any entity that takes up more than one block because of orientation, y-axis, etc)

  1. Silverfish, Chickens, Squids, Bats, Ocelots, and small slimes / magma cubes

These are the bottom of the lag list BUT chickens can be especially problematic for other reasons which I will outline below.

* Anything that is tamed is automatically more inclined to lag than an untamed mob of the same type.

Side Note: Entities also include item drops, which in excess can certainly slow things down in a chunk. This has been personally witnessed in games of paintball we’ve played where those killed dropped excessive numbers of snowballs, bogging the game down. However, since item drops are non-moving, they are typically the least offending entity. Ergo, chickens drop eggs so when they do they become more of a problem.

So what does this mean to you, in plain English?

For starters, the more resource-intensive mobs that you confine to a single chunk, the more heavy lifting the server has to do to track the movements of those mobs. Considering a person with a render distance of 5 can see literally dozens of chunks from their vantage point, this can exponentially increase the issue if you are standing in the middle of an animal farm.

The “recommended” number of mobs within a single chunk is as follows (not all together, these are “either”/”or”):

Possibilities for maximum number of mobs per chunk pen.

NOTE: These numbers would be cut in *half* if we ever roll-back to strictly Vanilla (no Spigot plugins to maintain resources). 

Having a larger area (multiple chunks) that is open for your mobs to free-roam with each other, does not work as well as them being sectioned off per chunk. In Example: Villagers like to congregate towards their “village center”. If you leave your villages free-roaming in one large 4-5 chunk area, this could result in all 11 of your villagers congregating & occupying the same chunk. Pens/houses/stalls should keep the mobs/entities in their own chunks.
Again: Do Not stack them vertically – they occupy the same chunk when you do that.

Other Sources of Lag:

Now let’s talk about the other things that cause lag…

The following things cause lag in different ways, and have no specific order, since they are more or less dependent on how they are used. However, quite a few of them cause terrible lag for one reason or another:

  1. Beacons

Especially beacons that cause area effect bonuses. I have no idea why this is, but I do know that having more than one in close proximity to each other will cause lag. Spigot seems to deal with some of this lag, I’ve noticed it’s MUCH worse when we are not running Spigot.
When running Spigot, we must regulate Beacons to only 1 active (running) per player. There must be at least 100 blocks between active Beacons.
If we go back to strictly Vanilla, Beacons will once again be on the “do not use” list.

  1. Redstone

Consider this, what is more complicated…a circuit board, or a piece of cardboard? Redstone is basically like laying down a circuit board inside the game to automate pretty much anything you would want it to. The more complicated it gets (using repeaters, lamps, switches, hoppers, and any number of compatible blocks), the more it lags the server.

The nice thing about redstone machines is that you can turn them off, which helps with the lag. We ask all people using redstone that they implement a way to turn the circuits off when not in use.

YouTube is filled with Redstone tutorials. How to create amazing redstone machinery, spawners, and autofarms (see next section) – however these are all best put into use on Single Player worlds. On a largely populated multiplayer server like ours, these generate unnecessary lag for those players with lower connection or processor speeds.
When it comes to redstone contraptions, machinery, and autofarms on our servers, please remember: Just because you CAN build a machine, doesn’t mean you SHOULD.
When in doubt, please contact a member of the Admin team to review.

  1. Autofarms

You don’t want me to get started on autofarms. I don’t even want to give you any ideas about autofarms. Please don’t use autofarms. If you must use an autofarm, put it somewhere that other players will not run through the region that it is being used, and get a CB to it (Main server only). Autofarms in public places are the bane of my existence. Chicken autofarms, doubly so. Auto-sorting machines fall under this category.
Again, when in doubt, ask an Admin.

  1. Command Blocks / Player Heads

Speaking of CBs, yes it’s true, command blocks are also cause for lag. However, we’ve been using them forever and have no current plans to ever stop using them as the preferred method of fast travel. Do not ask for /tp or /warp permissions. It will not happen.

Now that we’ve got that out of the way, you can see why we charge for command blocks on Main, and restrict the quantities in use on NuNu. If we didn’t restrict them, people would just ask us to put command blocks everywhere so they wouldn’t have to walk across their house (it’s happened). By charging for & restricting them, we reduce lag as much as we can, and make you play the actual game as it was (mostly) intended.

Player heads, since they pull in outside DAT info, can also cause a buffer to occur between the server and the Mojang skins server, which will cause connection lag (a little different but the outcome is the same).

  1. Running Water / Lava

Typically only where there is A LOT of it, but running water and lava can certainly worsen lag in areas where it is already present.

  1. Loading New Chunks

If you’re boldly going where no one has ever gone before on the server, then the server has to generate brand new chunks to put in storage. This generates strain on the server. If a lot of people are doing this simultaneously (as we discovered when moving to 1.7 for the new biomes & when opening the NuNu server for 1.8) then it can repeatedly crash the server.

  1. Going AFK at Spawners

Technically this falls under the whole “entity” category, but specifically, we create spawners to help with XP and item farming. For a lot of lazy people, this translates to:

  • Going to a spawner where the mobs cannot hurt you
  • Leaving your computer to go make a sandwich and watch a couple episodes of Mad Men
  • Returning to the computer to kill the hundred or so mobs that have generated in quick succession

By doing this, you are allowing the server to put TONS of mobs into a very confined area. This makes the server freak out. Please do not do it. This is actually one of our server rules. People who break this rule will be warned, then banned if the behavior persists.

We’ve alleviated this a lot by having a 20 minute timeout on the server that kicks you off if you are just standing around, but it doesn’t stop the spawner from having spawned a ton of mobs that are still in memory, so again, please don’t do it. No seriously, don’t even do it for 5 minutes.

  1. TNT

I know there are people out there that love TNT. It’s cool, I don’t mind you using it, but please keep in mind that setting off 100 blocks of it at once will create incredible strain on the server. So if you have to blow something serious up, just make sure that it’s really important that you do so, you can set off a few blocks at a time instead of wiring an entire mountain and you’re not just running around detonating TNT for the sheer thrill of it.

  1. Item Frames

Particularly, maps in item frames, since the maps have to load for all players in proximity, but really anything in item frames can cause strain if there are enough of them. This makes sense, as what you are basically doing when placing something in an item frame, is creating a persistent item drop in the game world. As item drops are entities, enough of them will lag the server.
This particular strain was illustrated when we built Hogwarts on the Main server & had all our “crafting classrooms” within the walls of the castle. We had to split up the crafting recipe examples (10 item frames each) into categories & place them around the server to space them out.
Your vaults can be another source of this problem. If you are finding yourself lagging when entering your vault, or going about your daily routine & lagging inside your vault, you may want to swap out some of your item frames for signs.

  1. Rain

Rain introduces many more particles to the viewing window. This is technically a client side issue, but since it happens for everyone simultaneously (and the server controls whether or not it happens) I qualify it as a server lag issue.

So if it’s raining and people are getting a lot of lag, any other lag-inducing activities will most likely amplify the problem.
Note: you are more likely to have a “lag-drop” into a floor when teleporting while it’s raining, so be careful where you TP to.

Keep in mind: in multiplayer mode, a grid with a default inradius of 10 (for a total of 21×21 or 441) chunks is loaded around each player and sent to the player by default. Chunks within the set range may have activity (mobs spawning, trees growing, water flowing, dropped items disappearing etc.), while chunks outside of this range are inactive, and are stored on the disk. Which means the more people who are on the server at a given time, the more the server must track & players will lag.

We think that’s it for now, or at least it’s all we can think of off the top of our heads. If you have anything to add to this, please comment below. 

Thanks,

-Serverus