State of the Server: Lag 3

So, as we add new features/mods and get closer to 1.6.3 (soon, I promise) people have commented on the one thing that is the bane of almost every modded server: lag, As some of you know, Minecraft simulates game time in “ticks”, with 20 of these ticks occuring per second. Ideally, a server operates at about 18.5 – 20 TPS… sometimes we fit that category. Unfortunately, all too often we’re sitting below 15… bordering on 10 – 13, which is considered very low to unplayable for a server.

Many things influence how many ticks per second occur, but for general purposes we’ll concern ourselves with the big two: CPU and Memory. Every mod, entity, tile entity, block, machine, etc that has to be simulated takes CPU. Every chunk that gets forced loaded, along with the various items/entities in them takes memory. Generating new chunks, excessive entities/dropped items/etc, bad timer settings can all use more CPU/memory than normal. If too much CPU is used or if the server is forced to shunt chunks to disk in order to free up memory then the TPS goes down.

Our biggest constraint at this time is how much CPU we can throw at the server. We are currently on a cloud hosted VPS (if that means nothing to you… it means we’re hosted on a subdivision of a bigger server), which puts us at the mercy of what our host feels is a fair share of the processing time available. Sometimes we have more than enough CPU time available, however, at others it’s obvious we’re being throttled (we can see it in the back-end and it’s obvious as heck to the people online).

To be honest, I’m not sure how we’re going to resolve this. Earlier in the week I changed a lot of Java settings again to optimize how the server runs, which has taken nicely and given us a boost in average TPS… however, we’re still hitting periods of low (< 15) TPS. I’m looking at other hosts (again), but I feel we may be reaching the limits of what conventional hosting may provide us (shared resources is so not working). We tried a cheap rack-mount server in the past… the results were not pretty… so our options at this point is to try and find a VPS host that can provide us with at least 3 – 4 CPU cores (dedicated) along with the memory we’re using now (4GB… although more is better) as well as SSD drives (this is another bottleneck for TPS, luckily we do have that atm). These hosts are crazy expensive… to the point where it may be more cost effective to simply build our own rack-mount or purchase a pre-configured one and co-locate it at a data center. However, that carries with it the substantial out of pocket up front to purchase the machine… so obviously we’re at a small impasse.

We will let our community know what’s going on as time passes.

Please note this is not a plea for money/donations at this time. We are simply stating the status of the server as well as a major underlying problem that exists beyond our current ability to control it. We will keep our community aware of what’s going on and thank everyone for their support so far!

Leave a comment

Your email address will not be published. Required fields are marked *


3 thoughts on “State of the Server: Lag

  • Jehdai

    If I remember correctly the server that runs forgecraft cost them about 80 per month, which is just a little much. (Pahimar has it linked on his website) (I also believe that Guude has both Mindcrack servers running from the same host)

    I don’t really notice the lag unless I am in a mining age. I suppose it would be noticeable if I was trying to fight mobs, but that is rare now.

    • CoderJ Post author

      I’ve had discussions with people who play on ForgeCraft… not Pahimar but others… when they first start they usually run about 19 TPS, near the end of a world cycle they get down to 12 – 14 (and crash a lot, but it is a dev server).

      $80/m is the highest Digital Ocean tier, but for that price I think we would rather own the hardware and colo it in a datacenter. $80/m is a lot for something you don’t even own :\