Minecraft – Block Lag on 1.9 Public Server

minecraft-java-editionminecraft-java-edition-server

I'm hitting my head against the wall here. I'm running a vanilla Minecraft server (1.9) on a VPS server. Right now, it has 6gb of RAM allocated to it, and it's being run with Multicraft. When watching the RAM usage, it seems to be quickly climbing to 50% of the allocated RAM and then over the course of an hour it eventually climbs to 100%. It seems to be caching something, but I'm not sure what or how to fix it, and I believe the shortage of ram is what causes the block lag after it's been running for a bit (there's a direct correlation between the RAM usage and the block lag).

At the moment, I have a pretty bare bones setup with the command blocks, and I've tried re-working the command room a few times to help reduce the load on the server. I've tried disabling anything that isn't completely necessary for players (turning off a lot of the staff functionality) to see if it would help and it hasn't made any difference either way, which leads me to believe that it's not my command setup.

For the 1.8 server I had before 1.9 was released, I had mini-games, etc, on top of the basic command blocks and I was able to run the server without any issues with 4gb of ram and 5-15 players online at a time. I'd like to avoid adding a ridiculous amount of RAM as a workaround, as VPS RAM is really expensive.

As a work-around, I have the server restarting hourly to clear out whatever's being cached, but when there are a lot of players online, it's still a problem.

Does anyone have any idea what's going on? Is it 1.9 itself, or is it something that I should check out server-side that I'm not thinking of? Any configuration ideas that I could try? I'm at a complete loss.

Best Answer

Last time I was having issue with ram steadily rising and not falling, it was a Java issues. Java was not performing garbage collection correctly. I fixed it by reinstalling Java and it worked fine!