Need some advice for a new server setup and admin...

Tethlah

New Member
Jul 29, 2019
112
0
0
I have a new server all set up. Everything seems great, but we are having some issues with lag and unresponsiveness from time to time, not to mention the occasional timeout for clients. I'm clueless as to if I have my startup configured effectively or not, so I figured I'd ask for some advice.

Specs:
Debian 7
Dual Hex Core 3.0 GHz AMD/Valencia (12 cores total)
32GB DDR3 1066MHz Ram (8 4gig sticks)
128 GB SSD
1 Gig NIC with 20 TB monthly bandwidth (Speed tests have been about 100mb down 85 up on average)

I'm using MinecraftForge v10.13.2.1307 (I'll be updating this in a couple weeks when I finish getting my pack submitted to ATL)

Here is the config I use to launch currently (I'm keeping a couple gigs free for system and a test server for updating mods)

[start]
command = "{JAVA}" -server -Xmx30000M -Xms5000M -d64 -Djline.terminal=jline.UnsupportedTerminal -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:parallelGCThreads=1 -XX:+AggressiveOpts -Xincgc -jar custom-server.jar nogui

Any tips or anything? I am using multicraft (I know I know) mainly because I work a lot, and command line isn't feasible, I need to be able to use a website to manage the server from time to time, and so far multicraft is the only one that lets me put up and take down extra servers quickly and at will, so until a better multiple server option comes up, it's what I'm using. Which, even so, when I was running the server straight using command line, I still had the same lag and disconnect issues.
 

HaoSs

New Member
Jul 29, 2019
290
0
0
12 core. what a waste
try to start server just with java -Xmx20GB -Xms20G -jar server.jar nogui. see how that work. what java version you have ?
 

Tethlah

New Member
Jul 29, 2019
112
0
0
12 core is the smallest cpu set they had available for gaming servers. I'm running the latests java 8 build. Setting the largest heap size to 20GB, doesn't that just waste the rest of ram?
 

HaoSs

New Member
Jul 29, 2019
290
0
0
just test it. there is no point running 1 minecraft server. you will never EVER need 30 gb of ram. setting it to 1000 players won't work doe to CPU. you need Ghz not cores. thats a good server to run 10 : 20-30 players minecraft servers.
 
Last edited:

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
Knock down your Xmx a bit, garbage collection is going to fuck your shit if it has to take care of 30GB. Start with 8GB and expand upward in 4GB increments as needed. Leave the Xms at 2GB.

You have 12 cores and they aren't that good for single thread performance which isn't a great situation. May as well put them to work on garbage collection, switch ParallelGCThreads to at least 4. I would suggest 6.

-d64 only does something when both 32 and 64 bit Java is installed on a server.

-server only does something when using 32 bit Java. 64 bit Java doesn't have client and server modules, its combined.

Now, assuming you are okay with tossing all that shit out the window, try these JVM arguments:

Code:
 -Xmx16GB -Xms2GB -Djline.terminal=jline.UnsupportedTerminal –XX:+UseG1GC -XX:+UseStringDeduplicationJVM -jar custom-server.jar nogui

You will need at least Java 8 Update 20 for that to work. The G1 garbage collector is magic for large heap sizes. Its background CPU usage is a little higher than other GC's but with all the threads your machine can support its not an issue. Unofficially I think its made of fairy dust, even on a dual core machine with only 4GB heap size, its given me a 10% tick time reduction. On the first machine I tested which had 4 cores and 32GB heap size it was a 30% reduction.

Here some entry level reading on the various garbage collectors: http://blog.takipi.com/garbage-coll...lel-vs-cms-vs-the-g1-and-whats-new-in-java-8/

Now, obviously you should be using FastCraft, if you are not, get on that shit. Clients don't even need it for the server to use it. What I want to bring your attention to is the Extra tweaks/tips spoiler in the FastCraft thread on the IC2 forums. http://forum.industrial-craft.net/index.php?page=Thread&threadID=10820 Sampler is a small mod that will let you do easy performance profiling on your server, if still have issues with the JVM arguments I suggested follow the instructions for using Sampler and post a copy of the .nps file in the FastCraft thread along with this one.

If you have any questions or want more in-depth help, shoot me a PM on here, the Steam profile in my signature, or on reddit: http://www.reddit.com/user/DZCreeper/
 

Tethlah

New Member
Jul 29, 2019
112
0
0
it lookslike the G1GC is causing the server to crash. When I removed it the server started working again...
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
according to
You will need at least Java 8 Update 20
I think its safe to say that you do not have java8 update 20
you should be able to look what your java version is by typing java --version in the terminal if I remember right.
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
it lookslike the G1GC is causing the server to crash. When I removed it the server started working again...

Assuming you have at least Java 8 Update 20 installed, please give me the log. If not, you will need it and should be using it anyways. I just assumed you were because your original JVM arguments lacked any mention of PermGen and before Java 8 you needed to set that manually for good performance.

Here is quick and easy guide on doing installing Java 8 on Debian and making sure its set to default if you have multiple versions installed. http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

And yes, leave ParallelGCThreads and any other such garbage collection tweaks out. The G1 collector should handle everything automatically.
 

Tethlah

New Member
Jul 29, 2019
112
0
0
Yeah, I'm using 8 build 45. Which log do you want to look at? All the console said was it crashed but minecraft didn't generate a report.
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
There should have been something in the /crash-reports folder. If not, the log from /logs called fml-server-latest.log would be best. Its probably too large for pastebin though so either trim it down to the last 100 lines or preferably upload the whole thing on a file sharing site
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
Interesting. Make a backup of session.lock to be safe then try deleting it and starting the server again. That shouldn't be an issue specific to Java 8 so I assume its some interaction between Java 8 and MultiCraft or one of the mods you have installed.
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1
I understand you want to use MultiCraft but could you try the server without it if possible? I am curious why you would be having issues using a combination only G1 garbage collection and MultiCraft is the only thing I haven't tested myself.

Even if that works, I know you want MultiCraft so I suppose switching to these JVM arguments would be the best option:

Code:
 -Xmx16GB -Xms3GB -Djline.terminal=jline.UnsupportedTerminal -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:parallelGCThreads=6 -jar custom-server.jar nogui

Not many changes, just getting rid of the useless arguments, increasing the GC threads, and removing -Xincgc because it enables -XX:+CMSIncrementalMode which is the garbage collector I would least recommend.

Edit: I just saw your new post. Sounds a lot less like a Java issue and more that your server didn't save properly before shutting down. I don't mean to be condescending but weird issues like this are the reason why using a test server is a good idea, I hope you aren't changing the JVM arguments on your public server until you have a good set picked out.