Help me understand a more advanced startup file, please

JunkyPic

New Member
Jul 29, 2019
47
0
0
Hello,

I was browsing the forums and came across this thread.
Very informative thread, I'd like to thank Woodopriest and clodan for taking the time to write it. The problem is I'm honestly looking at it and not understanding it at all. I know it's about java garbage collection, but that's about it.
The part I'm interested in is the following:

java -server -Xincgc -Xmx2048M -Xms1024M -Xmn512M -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+UseAdaptiveSizePolicy -XX:+DisableExplicitGC -Xnoclassgc -oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX: ParallelGCThreads=4 -XX:+AggressiveOpts -cp "FTB-Beta-A.jar" -jar "FTB-Beta-A.jar"
I honestly have no idea what any of it means. It's a start.bat or start.sh file, clearly, but other than that, I'm stumped.
Could somebody explain it like I'm 5?
I understand that it's personalized based on your computer's specs, so copy+pasting this will more likely break something rather than help.
Does it matter if java's JDK or JRE?
64 bit or 32 bit?
 

Guswut

New Member
Jul 29, 2019
2,152
0
0
Could somebody explain it like I'm 5?
Programmers that have worked with Java for years have issues dealing with the startup flags for Java. It's torture to try to do as much to a child.

That said, review this: http://docs.oracle.com/javase/1.4.2/docs/tooldocs/solaris/java.html#options if you REALLY want to know.

Does it matter if java's JDK or JRE?
You need to use JRE, yes. http://stackoverflow.com/questions/250517/java-se-6-vs-jre-1-6-vs-jdk-1-6-what-do-these-mean

64 bit or 32 bit?
If you want to use more than 2GB (technically 3.75GB or so) of memory in your client or server, you will need to use 64bit. This won't help if your computer has 4GB or less RAM, of course.
 

glasspelican

New Member
Jul 29, 2019
187
0
0
Im working on post that explanes what it does
Im trying to wright it in such a way that an intermediate user could understand
(intermediate as would be defined by an engineer)

I expect it to go up in the server admin section sometime next week
Tentative name "Server Java flag configuration guide for admins"
 
  • Like
Reactions: Guswut

Guswut

New Member
Jul 29, 2019
2,152
0
0
Im working on post that explanes what it does
Im trying to wright it in such a way that an intermediate user could understand
(intermediate as would be defined by an engineer)

I expect it to go up in the server admin section sometime next week
Tentative name "Server Java flag configuration guide for admins"
Nice! That would be extremely useful, indeed.
 

thr33p10

New Member
Jul 29, 2019
26
0
0
Two Questions (for glasspelican, if he sees this!)
1. Is that thread you were talking about the
Tentative name "Server Java flag configuration guide for admins"
actually a reality? (where can I find it?)

2. If the above is a no, then may I ask an opinion of what should be changed to improve my server performance? I'll try to keep it concise, if not brief:

Server Specs:
i7 2600k @ 3.4GHz
64-bit Windows 7 OS
16 GB RAM
Intel 520 SSD (for the OS and Server files)

EDIT: running FTB Mindcrack pack 8.2.0, with Mystcraft added (8 worlds including nether, overworld, twilight, end, and 4 Mystcraft worlds)

Currently, with the usual 2-8 people at a time on the server, I will see anywhere from 35ms avg tick to 60 ms (rarely more). Memory use goes between ~800MB minimum to 4+GB. During heavy load periods, the CPU use is always under 15%.

The problem I have with my scenario is not the lack of play-ability (it's actually quite manageable, usually), it's that the java server has so much more CPU to take advantage of, to keep the tick rate low.. and NEVER DOES. My bat file for launching looks like the following; I'm wondering what kind of flags are extraneous, or missing, that might help me achieve better performance with the specs I have available to play with.

java -server -Xincgc -Xmx8G -Xms2G -Xmn1G -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+DisableExplicitGC -Xnoclassgc -oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:parallelGCThreads=4 -XX:+AggressiveOpts -XX:+UseAdaptiveSizePolicy -XX:ReservedCodeCacheSize=1G -cp ftbserver.jar -jar ftbserver.jar
 

glasspelican

New Member
Jul 29, 2019
187
0
0
1. Real life has unfortitinly gotten in the way and I have not finished the post yet
2>
Minecraft is still single threaded, so it can never use more then 15% of that cpu.
there is a mod that adds multitheading. ( Its in Beta standard disclaimer applies )

Some Many of the options in that line are configuring the parallel garbage collector, you could try setting ParallelGCThreads to 8
For the number of dimensions you have loaded, thats not a bad tick (average)
 

thr33p10

New Member
Jul 29, 2019
26
0
0
Setting the ParallelGCThreads to 8 did seem to have a small effect on the tick rate.. it seems more likely to hang around the 30-40 mark this way, but the warning about server not keeping up still occurs. I may have to check out the multithreading mod to see if that makes a greater difference. Thankfully, at this point I'm not fighting memory leaks anymore (chunk loaders in each dimension fixed that), now we're just trying to push Java through a bottleneck.
 

thr33p10

New Member
Jul 29, 2019
26
0
0
With a few more people getting onto the server, the tick has gone right back to the "can't keep up" (60ms - 70ms) level and pretty much decides to stay there... on the positive side, it's not "noticeable" but I'm afraid of what happens when we get to too many of the members online at once...
Is there any way to sacrifice some of the RAM efficiency to offset the tick rate?
 

thr33p10

New Member
Jul 29, 2019
26
0
0
1. Real life has unfortitinly gotten in the way and I have not finished the post yet
2>
Minecraft is still single threaded, so it can never use more then 15% of that cpu.
there is a mod that adds multitheading. ( Its in Beta standard disclaimer applies )

Some Many of the options in that line are configuring the parallel garbage collector, you could try setting ParallelGCThreads to 8
For the number of dimensions you have loaded, thats not a bad tick (average)
The mod that added multithreading did a great job of keeping the TPS at 20.. no questions asked.

However, it seems that it was resetting chunks in addition :(

I've reverted to a backup, and am hoping that there may be more suggestions that could help keep the TPS at 20 without this mod (at least until it is more stable)?