Optimize server on Ubuntu x64

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Aethyrd

New Member
Jul 29, 2019
2
0
0
Hi, I'm looking for some general guidelines on reducing lag on my small FTB Monster server that I'm running on a local Ubuntu home server. What information I've been able to find elsewhere is either outdated, for vanilla Minecraft, or made with Windows in mind. Making it so that I don't know if its applicable for me running the most current FTB Monster version on Linux.

Server machine specs: Ubuntu 14.04 64-bit, Intel i5 760 2.8 GHz, 8GB 1333MHz Ram, Intel 320 40GB SSD

The server is for 1-5 players. I've had it running for a week now and so far it's been mostly me playing, and at first I had really good performance. However as I've gotten into some of the more demanding mods I've seen the response speed of the server dip severely, and thats just from 1 player getting into high-tier machines.

Opening chests has a delay. Taking and placing items in the GUI is not very responsive, especially in AE's Crafting Terminal. When mining blocks they sometimes reappear and I have to mine them again. Basically everything that involves the Client making a query to the Server feels laggy and stutters somewhat, while the Client runs super smooth.

When running the server averages 520MB of allocated memory. The avg tick can be anywhere from 8ms to 30ms. Also I'm running with the Server GUI enabled so it keeps spamming "Can't keep up!" in the server log. It also seems to be spreading the load on the 4 cores of my CPU pretty evenly, going around 40-80% load depending on what I'm doing in-game. Just idle with no one in-game it keeps a pretty even 30-50% load.

So I'm curious if this has anything to do with the machines I'm using in-game or if the server setup on my part is incorrect/poorly optimised.

In-game:
I'm mainly using Thermal Expansion machines and pipes. Conduits, Fluiducts and Itemducts. Right now I have 1 Ender-Thermic Pump in the nether constantly pumping lava with a Chunk Loader loading 1 chunk. 1 QuarryPlus constantly mining for me in a Mystcraft Age with a Chunk Loader loading 1 chunk. A smaller AE system without crafting yet, but with 16 import and export buses for automated processing. 5 Tesseracts for moving all my power, items and fluids. A Harvester and Planter auto-farming Magical Crops with a Chunk Loader loading 9 chunks (my whole base).

I understand that chunk loading, using pumps and quarries and especially Mystcraft Ages adds is very intensive. But it was my understanding that you should be able to run at least a few ages, a few quarries etc without problems.

My thinking was that perhaps one or more of these mods is more prone to causing lag than some alternative? More than a year ago when I played on a larger FTB Unleashed server the admins openly condoned (but did not ban) the use of all pipes from Thermal Expansion, claiming that it caused a lot more lag then BC pipes. Wether this was and still is true I don't know.

Server Setup:
Code:
cd ~/FTB_Monster_Server
java -d64 -Xincgc -Xmx4096M -XX:PermSize=128m -jar FTBServer-1.6.4.965.jar
I've noticed no real difference when using -Xms1024M or -Xincgc. I've read that -Xincgc is supposed to be favorable, so I'm running with that for now.

Also yesterday I read that Sun's JRE for Java is better for running Minecraft on Linux than the default installed OpenJDK. So I uninstalled OpenJDK and installed the 64-bit version of Java JRE v.7 Update 65. I have not noticed any performance gain.

Hoping that I have simply overlooked something, I would really appreciate some advice. Cheers!
 

Connor Gavitt

New Member
Jul 29, 2019
1,091
-1
0
Minecraft isn't multithreaded, we'll the world isn't which is what mainly uses the CPU so it doesn't make sends that minecraft is using 4 cores evenly at all, make sure no other apps are running as "can't keep up" means your CPU is lagging and nothing else.

Also as the -server flag to your startup args, it will start slower but run better.
 

Aethyrd

New Member
Jul 29, 2019
2
0
0
Minecraft isn't multithreaded, we'll the world isn't which is what mainly uses the CPU so it doesn't make sends that minecraft is using 4 cores evenly at all, make sure no other apps are running as "can't keep up" means your CPU is lagging and nothing else.

Also as the -server flag to your startup args, it will start slower but run better.

Then I know what must be happening with the CPU. I should have realised this earlier. When accessing the host server/computer I use VNC, which of course is taxing the CPU further. Thinking about it, I was seeing the "Can't keep up!" when accessing the system with VNC. I'm usually only connected through VNC for a minute or so when I need to access the servers desktop for some reason or other. Guess I need to start using terminal and SSH more.

I tried the -server flag, I did not know about that one. Have not been able to test it out long enough to see any difference yet, but I'll keep an eye on it. Thanks!

I can add that I found the Opis tool and I have been using it to find whats slowing down the server in-game. Most of the stuff I found out was no big surprise to me and the machines it pointed out are machines I don't want to remove anyway, like my Quarry. However it's nice when Opis points out that theres a Spider glitching out that's increasing the TPS by 0.5, lol.