JVM Arguments for Modded Minecraft (Updated 12/30/13)

  • 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

Vaygrim

New Member
Jul 29, 2019
533
0
0
I think my primary mistake was that I was using the FTB Launcher arguments with the Official Minecraft Launcher. Plugging the SERVER arguments into it has shown a significant boost to my client's performance. (This is all in SSP, just for the record.) I am still testing to make sure the configuration is 'sticking' but for now it all looks good.
 
  • Like
Reactions: Eyamaz

dirtyriver

New Member
Jul 29, 2019
14
0
0
Those are very old and were created for java 6, but yes I've seen them. An example of the outdatedness is that compressedoops is on by default in 64bit java 7 (at least with oracle, apple keeps screwing up their java implementation from what I've been seeing.) How I have mine setup is more memory intensive specifically for the massive modpacks we are now seeing. There are similarities and a few JVM arguments we both use.

Back in Mac os 10.6 (update 3 I believe) Apple stopped shipping Java(at least the newer versions) with safari. There maintaining java 6 on there end till the "end of it's life cycle", but it's basically third party (Oracle) now. So if Oracle has Java 7 for mac(Suppose i need to check on that), hopefully apple isn't screwing with it on there end.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Back in Mac os 10.6 (update 3 I believe) Apple stopped shipping Java(at least the newer versions) with safari. There maintaining java 6 on there end till the "end of it's life cycle", but it's basically third party (Oracle) now. So if Oracle has Java 7 for mac(Suppose i need to check on that), hopefully apple isn't screwing with it on there end.

I haven't seen any mac support on the oracle site for awhile now for java 7. The "life cycle" of java implementations is usually quite some time, though. Maybe apple and oracle are waiting for java 8. Who knows.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
I'm currently working on an even more robust iteration of my JVMs after testing a bunch of new tweaks I've learned. Currently, I've been able to cut the needed Permsize down to 256 as well as keep an almost constant 20 TPS in my SSP Unleashed 1.1.4 test world. Though I'm planning on leaving the codecache set to 2048m, players who have RAM constraints should be able to drop it to 1024m without much issue.
Those who use these will be happy to know they won't need to figure out their Xmn anymore since the next set of argument will set it automatically to 1/4 your Xmx.

Once I have the kinks worked out, I'll update the OP.
 

Veirilli

New Member
Jul 29, 2019
21
0
0
I haven't seen any mac support on the oracle site for awhile now for java 7. The "life cycle" of java implementations is usually quite some time, though. Maybe apple and oracle are waiting for java 8. Who knows.
I'm a week late, but thought I'd mention that Oracle does indeed support OSX for java 7, I currently am using 7u40 on OSX 10.8.5 with minecraft (1.6.2 and 1.5.2) and it's working great. I'm mostly using your arguments with just some minor tweaks since my laptop only has 4GB of RAM. The only issue one would have would be with minecraft 1.5.2 and earlier because, unless the user has manually updated lwjgl, because lwjgl versions before 2.9.0 don't work with java 7 on OSX.
 
  • Like
Reactions: Eyamaz

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
good to know. is this a download from the apple site? cause i didn't see it on the oracle site, unless I'm being blind again.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
oh, i believe i'm just blind. thats not the site I use though, i go through the main oracle site. apparently i'm blind though, cause OSX is right there on it. no worries about apple messing it up then. :p (minus the part where they will not put the api in place for any OSX pre 1.7.3 for java 7 to be used...)
 

Zaver

New Member
Jul 29, 2019
7
0
0
Hey, I have a FPS problem. I'm running MCPC+ server with bunch of mods(custom direwolf20 pack)
Client(1.5.2) is run via multimc.

Every time we start a new fresh world, I have an average 150 FPS. But when we start to build/grow, and making a lot of machines, engines etc... , FPS rapidly decreases. Same for my friends. At the end I had 30-40 FPS and mouse was laggy, I wasn't able to play. I don't know how direwolf20 play's normally on FORGECRAFT 2/3.(if you know him)

I read this article about server ticking which think is causing the problem:

http://www.aliascraft.com/forum/m/10464583/viewthread/6888704-what-tick-threading
Could you please help me and advise me what to do. I was running a home server(i7 960 2.8ghz, 6GB , RAM - 1600mhz, SSD, ATI Radeon HD 5700), but then we moved to hosted server(http://www.verygames.co.uk)
They kindly change JVM arguments for me if I ask them.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Nallar is the author of Tick Threading and it is an awesome mod (has a few bugs, but awesome none the less.) the JVM arguments in the OP are designed to work stand alone and with Tick Threading. However, i don't do support for Tick Threading, that's Nallar's job. You can have your host use the arguments listed under server in the OP, but Tick Threading you'll have to handle yourself. (Hint: it gets dropped into the /mods folder.)
 

Zaver

New Member
Jul 29, 2019
7
0
0
Yes, I have tried the mod, but I didn't had any performance FIX. I think because mcpc+ already supports multicore processors.
What problem do you think is occurring to me? Is it client side or server? If you need more info, ask me.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Your going to experience FPS drops around areas with lots of tile entities no matter what do to how the render engine is coded. Things like my JVM arguments, Tick Threading, etc can alleviate it, but not fully prevent it. I'll use The Community server as an example because we set that up using my JVMs and Tick Threading together. In a certain area they left a mob spawner running that ended up creating over 10k entities plus almost the entirety of their base. The ONLY player even able to login to fix it was StrayMav because he had just purchased an overthetop computer and was still getting 0 to 5 FPS because of all the rendering. Not a single other player that had logged out in the base was able to log in at the time.

Between Nallar's Tick Threading and my JVM arguements, the server never fell bellow 19 TPS.

so i'm inclined to say if your server isn't crashing, its just because your computer cant handle the rendering. Also, 30 - 40 fps fine to play an FTB pack. there are more than several players who would kill for even that fps.
 

Zaver

New Member
Jul 29, 2019
7
0
0
Thing is the world is not that big. I have 16 combustion engines running, applied energetic stuff, few tanks, three farm... = 30-40 fps. Without engines running I have like 50-60. No soulshards or some extra mob's. That's why I'm trying so hard to fix the problem. And like I said, my friend are experiencing same thing. May I ask you what type of server you where playing on? (vanilla, mcpc+) And those 30-40 fps are very very laggy. If I move my mouse it slowly moves to place. I know 30 fps is playable but not in this case. Using optifine with the most optimized settings possible.(I have tried without optifine too).
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
I use forge/vanilla servers. I honestly have no use for MCPC+ or bukkit since I don't do public servers.

However, what you are asking for help with at this point doesn't belong in this thread as it has nothing to do with the OP. Please start a new topic were either I, or a member of support, will assist you. This thread is specificaly for discussion on troubleshooting, testing, and implementation of a set of the JVM arguments in the OP.
 

triblades

New Member
Jul 29, 2019
80
0
0
-XX:UseSSE=4 -- Minecraft is not coded to take advantage of the extra abilities of SSE 4 this is software coding dependent. pointless to use.

Any more questions?

Just hád to respond.

Since this SSE 4 line, my server went from an idle 30%+ CPU time to < 2%!! Don't dismiss this out of hand.
The only thing is, your CPU MUST support it.

This is my entire parameter list:
Code:
-server -Xincgc -Xmx1224M -Xms768M -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 "ftbserver.jar" -jar "ftbserver.jar"
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Just hád to respond.

Since this SSE 4 line, my server went from an idle 30%+ CPU time to < 2%!! Don't dismiss this out of hand.
The only thing is, your CPU MUST support it.

This is my entire parameter list:
Code:
-server -Xincgc -Xmx1224M -Xms768M -Xmn512M -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+UseAdaptiveSizePolicy -XX:+DisableExplicitGC -Xnoclassgc -oss4M -ss4M -XX:s+UseFastAccessorMethod -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -cp "ftbserver.jar" -jar "ftbserver.jar"

well, SSE 4 is in the new parameters i'm working with atm, but for different reasons. and i've already discussed in a previous post why i dont like these JVMs, but let me reiterate some things and explain more.

-server -XX:s+UseFastAccessorMethod -XX:CMSInitiatingOccupancyFraction=90 : these are defaults, not even worth being in your command line
-oss4M -ss4M : you dont need to change the Thread Stack Size limit. in fact if your using Oracle's java -oss doesn't even do anything because Hotspot does not use separate thread stack size's for java and native threads.
-Xmn512M -XX:NewRatio=2 : this is just idiocy. with one command your telling java to use 512M of ram for the Eden space, the very next command your telling it to use 50% of your Heap (612M.) and you never want to set your young generation to be greater than 1/3 your max heap anyway. and then you -XX:+UseAdaptiveSizePolicy which is java's way of automatically setting the new(eden) and survivor for you
-XX:SoftRefLRUPolicyMSPerMB=2048 once again. this is a TIME in MILLISECONDS and is set to TWICE the default value (1000) which will actually slow down your server once it gets "busy" THIS SHOULD STAY AT 1000.
-XX:parallelGCThreads=4 yup, you don't need this. at all. java will set this where it needs to be and does it dynamically when it needs to be changed. ive seen this as high as seven naturally. if your thinking this makes your game use "All 4 cores of a 4 core processor" your wrong. it doesnt do anything of the sort. Garbage collection already uses multiprocessors. This controls the number of threads and instances of the GC. at 5 threads, it creates another instance, at 9 it creates a third. this shouldn't even be in your arguments.


as far as your drop in idle time claim

ServerIdle.png

the server should always "idle" that low. At least until you drop some chunkloaders and few engines, then your server will never "idle" again. the pic in the spoiler uses my current set of server commands in the OP.

edit: and yes, my computer supports SSE4. Almost any computer on the market in the last half decade should have SSE4 support.
 

triblades

New Member
Jul 29, 2019
80
0
0
well, SSE 4 is in the new parameters i'm working with atm, but for different reasons. and i've already discussed in a previous post why i dont like these JVMs, but let me reiterate some things and explain more.
Thanks for the explanation!
I do know IT, but I do not know Java (parameters) so I had to try and guess which people on the interwebs had some good parameters. Unfortunately, there are no 'easy' sources of information I could find about these settings so I'm quite happy you explained them!

The only thing I do know is that my 'claim' still stands for my person, whether my used parameters are bogus or not.

I will give your first post a shot then. ;)
 
  • Like
Reactions: Eyamaz