Is there any way to improve Infinity server performance?

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

KITTYONFYRE

New Member
Jul 29, 2019
3
0
0
My friends and I have some great computers, but the VPS we rent has an opteron from like 2009. Last time we played, I removed like 1/3 the mods, but I want to try Infinity Evolved now. Is there anything we can do to improve server performance? I'm not sure the exact CPU but I know it's 6 core/12 threads.
 

GreenZombie

New Member
Jul 29, 2019
2,402
-1
0
The number of cores is not going to help: The minecraft server is a single threaded process.

So, given everything else, the only things you really have control over is the servers allocated memory. And the CPU friendly nature of your builds.

Even with a crap CPU a minecraft server can maintain a solid 20tps on multiple dimensions. A dedicated server doesn't have to do any of the heavy lifting associated with loading textures or actually rendering the world.

So, to keep your world performing nicely - while using an all-the-things pack
* try to minimise the number of chunks the server has loaded: Don't create lots of dimensions - each dimension that is active is going to compete for memory and CPU time. Don't use chunkloaders, especially across dimensions. Note that the area around spawn is kept implicitly loaded, so either avoid building near spawn, or use the spawn chunkloading as a shared resource - if you do use it, be aware that, while loaded, "random" ticks are not run in the spawn load chunks when players are not nearby, so while machines will work and consume power, random events like crop or tree growth will not occur.
* minimise the lag caused by chunk generation - agree to not travel more than a few km from spawn, perhaps use a world borders plugin and pre-generate the map.
* When the tps drops below 20 when no one is doing anything, have Opis ready to find the offending entities. Something as simple as cramming too many sheep in an enclosure that prevents them pathing and causes them to constantly 'collide' hitboxes can bring a server to its knees.
* appplied energitistics has known performance issues if shift-click is used to craft stacks of items from the crafting interface.
* Computer Craft runs a lua interpreter on the server thread. While its written to be efficient - many CC scripts ARE going to compete for TPS time.
 

Baaleos

New Member
Jul 29, 2019
100
0
0
Some analysis is due before you start considering fixes to server lag.

1. Is your CPU usage excessive?
If so - then yes, you should consider reducing loaded chunks.
2. Is your Ram usage high?
Im on a 6GB ram machine, with FTB Infinity Evolved - and using only 2GB of ram,
If I get lag, I know it isnt ram related as I still have 4 GB left. If however you are hitting the upper limit of Ram, then you may have too many mods loaded or too many dimensions loaded.
3. Is your Server Lag happening when exploring new regions?
This is lag associated with Generating of Chunks for the first time. Consider using a chunk-pregen mod to do the heavy lifting for you before people log in.
Eg: Generate 100 x 100 chunks emanating from spawn in each direction. Once this is done - players entering those chunks will not cause generation events to fire.
4. Is your Server lagging when entering new dimensions for first time?
This is not one that can be solved easily. There will always be some lag associated with entering a dimension for the first time. Its the same sort of issue as chunk generation.
If the dimension already exists, you could chunk-pregen to mitigate the issue, but most mods that do dimensions such as mystcraft, won't create the dimension, until you are entering it. Preventing any meaningful pre-gen opportunities.
5. Is your Server lagging when entering an already existing dimension?
While some people may disagree with this - I find that using a chunk loader around the portal in the dimension you are travelling to, reduces the lag associated with loading the dimension back into memory.
Eg: When you exit a dimension and no one else is in it - the server backs the dimension up to the harddrive, the dimension then no longer exists.
When you enter the dimension, it loads the backup back into memory, and then de-serializes it and turns it into a meaningful dimension.
The whole loading from hdd and saving to hdd is an I/O operation, which in programming circles is typically the slowest part of any transaction.
If you were to use a chunk loader to keep the dimension alive in memory, you would be able to bypass the lag associated with loading the dimension from the hdd.
Note - Only consider this option if you have sufficient ram.
Each dimension consumes more memory and cpu cycles .



Note: When it comes to pregenerating chunks - I recommend:
http://www.minecraftforum.net/forum...ods/2223032-chunkgen-preload-chunks-on-demand

I used to use the Admin-Tool box, but found it would exception out after a relatively small amount of chunks.
I am currently running this right now with
/chunkgen 0 0 256 256 0
To generate a 256 x 256 square around spawn.
Note: thats 256 chunks x 256 chunks - each chunk is 16x16 blocks in squared area.
 
Last edited: