Solved Server performing progressively worse

  • 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

Mathragh

New Member
Jul 29, 2019
15
0
0
Hi people,

Since about a week and a half I've been running a FTB 152WGT 0.8 server. As the time went by however, tick times progressively got worse. I spent a bit of time trying to figure out why, but it looks like it comes down to this:

The server runs fine, tick times are OK, then all of a sudden the value behind the Vec3: goes to 0, and the tick time shoots up enormously. The Vec3 value can keep on hopping back to zero multiple times, and above a certain threshold, it'll just keep on bouncing, causing really high tick times.
At first this only happened very infrequently, but now its happening continuously, and its causing serious performance issues. I've tried a lot of different things, like increasing the heap size, using different garbage collectors, and adding other commands in the start-up bat, and while they sometimes help a bit, I've got the feeling that its only treating the symptoms instead of the cause.

Does anyone know what's happening here(especially regarding the Vec3:thrashing related to the tick time)? I have the idea that garbage collection is causing some of the lag, but I suppose that's only the case because there's something else going wrong?

Relevant system specs:
CPU: AMD Phenom X4 955 quad core 3,2GHz
RAM: 2x2GB 1333MHz standard timings
HDD: 7200RPM 1TB random brandname


Thanks in Advance
 

cjm721

New Member
Jul 29, 2019
734
0
1
Run the server with no gui. That thing uses a ton of resources. Some thing you built is probably the cause for it and I have not used the gui since beta but each of the vecs correspond to a world.

ie your start file should end with
Code:
-jar ftbserver.jar nogui
 
  • Like
Reactions: Mathragh

Mathragh

New Member
Jul 29, 2019
15
0
0
Thanks for the reply,

However, I managed to find the cause. Using Java VisualVM I noticed garbage collection actually took up most of the CPU resources. I decided to try using the command -XX:+DisableExplicitGC. This has totally fixed the issue! Apparently, some thread was constantly trying to run garbage collection, causing it to totally thrash the server. With -XX:+DisableExplicitGC included, it still runs garbage collection, but at a "normal rate". Server feels like a fresh server now!

So for everyone experiencing the same issues, include the -XX:+DisableExplicitGC command line to the server run bat file and things should run better:)
 

cjm721

New Member
Jul 29, 2019
734
0
1
Why I usally suggest the following start bat:

Code:
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java -server -Xmx16G -XX:UseSSE=4 -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+AggressiveOpts -XX:-OmitStackTraceInFastThrow -jar ultimate.jar nogui
 

Mathragh

New Member
Jul 29, 2019
15
0
0
Why I usally suggest the following start bat:

Code:
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java -server -Xmx16G -XX:UseSSE=4 -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+AggressiveOpts -XX:-OmitStackTraceInFastThrow -jar ultimate.jar nogui

I'm actually using the new GC. my current command line is like this:
Code:
java -XX:+UseG1GC -XX:PermSize=150M -XX:+DisableExplicitGC -XX:+AggressiveOpts -server -Xms512M -Xmx2G -jar ftbserver.jar

The perm size is probably not needed, but it doesnt seem to be harming anything. Also, I was thinking about including the SSE4 flag, but I was wondering whether it was gonna work, since cpu-z reports my phenom X4 only supports SSE4A. Would this include enough for the SSE4 flag to run?

Also, the new GC is doing great, no lag and VisualVM reports GC being really resource friendly. Don't have a lot of experience though, so other GC's might still be better.

Edit: Also, if I may ask; what does -XX:-OmitStackTraceInFastThrow accomplish?

Thanks in advance!