1. This section of the forums is now closed. You can post and answer support requests on the new support site here

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

Discussion in '[Archived] Tech Support' started by Eyamaz, Aug 13, 2013.

  1. Eyamaz

    Eyamaz New Member

    See the post above.
     
  2. zenkmander

    zenkmander New Member

    Got it, thanks for the quick replies.
     
    Eyamaz likes this.
  3. flamedance58

    flamedance58 New Member

    Did all the changes and still averaging 5-10fps :/

    The only thing I've changed in the past day has been my Java, so is there possibly some setting I reset or something?

    [Edit] Going to try Optifine.
    [Edit 2] Well that did nothing, don't think it even works.
     
    Last edited: Jan 24, 2014
  4. UniZero

    UniZero Popular Member

    What graphics card does your system have? Do you have a lot of things running in the background?
     
  5. flamedance58

    flamedance58 New Member

    Well I reformatted my computer and installed J7U45 and used the prescribed JVMs and the game runs again!
    I'm thinking that something I did while jiggling my Java versions caused my Java to go nutty, I remember being told to go into Control Panel > System > Advanced Options > Environmental Variables and such and deleting something there.

    Either way, thanks for your help and glad at least I did this and fixed whatever I did.
     
  6. Gunner76th

    Gunner76th New Member

    So having gone through this thread forward and backwards, I would like a review of this startup script before I finalize it for use on our server. The server has an Intel (R) Core (TM) i3-4130 CPU @ 3.4GHz and 8 Gigs of memory installed. We are currently running the Direwolf20 1.0.12 modpack. Server is hosted by CreeperHost, it is a dedicated server, NOT a virtual server, and is located in Maidenhead UK. We have a max current player base of around 15 whitelisted members.

    Currently our start script is as follows: java -Xms4048m -Xmx4048m -XX:permSize=256m -XX:NewRatio=3 -XX:SurvivorRatio=3 -XX:TargetSurvivorRatio=80 -XX:MaxTenuringThreshold=8 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:MaxGCPauseMillis=10 -XX:GCPauseIntervalMillis=50 -XX:MaxGCMinorPauseMillis=7 -XX:+ExplicitGCInvokesConcurrent -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60 -XX:+BindGCTaskThreadsToCPUs -Xnoclassgc -jar craftbukkit.jar nogui

    After around 20 hours of up time, our TPS as reported by /forge tps is 20 in all dims with an overall mean tick of <20 usually between 10-15. Memory usage is reported to be around 55%< and CPU is generally around 40%< What we keep experiencing is sluggish performance, due to the lower tick rates, but with all Dims running at 20tps, we are not overly sure where the problem is. One theory is that the memory specified in -Xms and -Xmx should be increased from 4 gigs to 6 gigs, to provide the MC Server more room to work.

    Is it possible that this is not the case, but rather we are experiencing GC cycles that are causing the slugishness, and if so, what changes could we make to improve TPS and thus reduce the need for such frequent server restarts?

    One proposed change for the script is this: java
    java -d64 -server -Xms6144m -Xmx6144m -XX:permSize=256m -XX:NewRatio=3 -XX:SurvivorRatio=3 -XX:TargetSurvivorRatio=80 -XX:MaxTenuringThreshold=8 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:UseSSE=4 -XX:MaxGCPauseMillis=10 -XX:GCPauseIntervalMillis=50 -XX:MaxGCMinorPauseMillis=7 -XX:+ExplicitGCInvokesConcurrent -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=60 -XX:+BindGCTaskThreadsToCPUs -Xnoclassgc -jar craftbukkit.jar nogui

    Would this do anything at all to help with overall mean TPS on the server or GC, or would this do nothing or worse, cause more issues? Like I said, we are looking to reduce the frequency that server reboots are required, and at the same time, increase Overall Mean Tick Time on the server. At the time of this posting, our server had been up for nearly 20 hours, with an average of 3 people on at any one time, with the current times reported by /forge tps:

    16:46:09 [INFO] Dim -100 : Mean tick time: 28.131 ms. Mean TPS: 20.000
    16:46:09 [INFO] Dim -31 : Mean tick time: 0.091 ms. Mean TPS: 20.000
    16:46:09 [INFO] Dim 12 : Mean tick time: 5.705 ms. Mean TPS: 20.000
    16:46:09 [INFO] Dim 11 : Mean tick time: 22.593 ms. Mean TPS: 20.000
    16:46:09 [INFO] Dim 7 : Mean tick time: 0.203 ms. Mean TPS: 20.000
    16:46:09 [INFO] Dim 6 : Mean tick time: 26.827 ms. Mean TPS: 20.000
    16:46:09 [INFO] Dim -1 : Mean tick time: 3.380 ms. Mean TPS: 20.000
    16:46:09 [INFO] Dim 0 : Mean tick time: 32.082 ms. Mean TPS: 20.000
    16:46:09 [INFO] Overall : Mean tick time: 120.280 ms. Mean TPS: 8.314


    If there is anything else I can provide you with to help, please let me know, and I will do my best to get the information. It is to the point, we are looking into either a mod or script that will conduct automatic server reboots every 24 hours just to combat the unknown TPS drops.
     
  7. Eyamaz

    Eyamaz New Member

    -d64 -server : 64bit java defaults to this already
    -XX:UseSSE=4 : is automatically set to the highest the system supports (this starts at 99 actually, and goes backwards.)
    so these two options are not really needed.

    try lowering -XX:CMSInitiatingOccupancyFraction=60 by 5 till the stutters stop, but i wouldnt lower it below 40. There is still some GC "stop the world" collections that can start happening that i'm looking to see if i can prevent. these are usually due to leaky worlds/chunks/etc. just remember that though jvm arguments can help, they are not a magic cureall.

    I do recommend regular backups and restarts of servers though. usually once every 24 to 48 hours for restarts, depending on the size of the modpack and traffic, and backing up bi-daily, keeping 2 days of backups then discarding (if you have the storage space.)
     
  8. Golrith

    Golrith Over-Achiever Trusted User

    Wonder if anyone can help. I've got a new PC, i7-4770, 16gig mem, GTX 650 Ti gfx card. First night of playing MC (using the OP settings), I had 120 FPS. Since that night, after a series of updates to windows, graphics card, etc, etc. I'm now getting an average of 20 FPS spiking between 5-80. TPS is fine.

    So, some update is causing an issue somewhere, but don't really know what could be the culprit. Any suggestions?
     
  9. Yusunoha

    Yusunoha New Member

    welp... remember that problem that I had, when I play Minecraft through the FTB launcher, I get about 30-40FPS, but if I load the same modpack through the vanilla launcher, I get between the 125-150FPS?
    well, that was on my laptop, I thought this wouldn't be a problem on my normal computer, which has alot better specs compared to my laptop.

    turns out that isn't the case and I've the same problem on my computer. when I play the direwolf20 modpack through the FTB launcher, I get about 30-40FPS, but when I play my custom modded world through the vanilla launcher, with about 200 mods, I get 125-150FPS...
     
  10. Eyamaz

    Eyamaz New Member

    are you using the .exe or .jar version of the launcher. i'll look into what is causing this.
     
    Padfoote and Yusunoha like this.
  11. Arton123

    Arton123 New Member

    Could you please do a little guide in the topic on how to add the paragrams into remotetoolkit?
     
  12. Eyamaz

    Eyamaz New Member

    I've never used it.
     
  13. Yusunoha

    Yusunoha New Member

    I used the .exe launcher.
    I'll also try using the .jar version and see if that helps...

    EDIT: yup, that seems to have done the trick for me. thanks for the tip Eyamaz ;)
     
    Last edited: Jan 27, 2014
  14. Henry Link

    Henry Link Popular Member

    Eyamaz,

    We are having the same issue as Gunner described. Our server is a KS1 from OVH (3.2 GHz i7, 8GB Ram) running Ubuntu and Java 64 7u45. Below is the line out of our script we use to start the server. Any ideas on how to get rid of the lag spikes we are seeing? I do have cron setup to reboot the server once a day and do backups of the server every 6 hours. We are running the DW20 1.6.4/1.0.12 pack. I have about 12 players on the whitelist but usually only about 2 to 4 at a time are actually on the server.

    Code:
    INVOCATION="java -Xms3G -Xmx3G -XX:PermSize=256m -XX:ReservedCodeCacheSize=512m -XX:NewRatio=4 -XX:SurvivorRatio=3 -XX:TargetSurvivorRatio=80 -XX:MaxTenuringThreshold=8 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=0 -XX:MaxGCPauseMillis=20 -XX:GCPauseIntervalMillis=250 -XX:MaxGCMinorPauseMillis=7 -XX:+CMSClassUnloadingEnabled -XX:+ExplicitGCInvokesConcurrentAndUnloadsClasses -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=50 -XX:+BindGCTaskThreadsToCPUs -XX:+TieredCompilation -XX:Tier0ProfilingStartPercentage=0 -XX:Tier3InvocationThreshold=3 -XX:Tier3MinInvocationThreshold=2 -XX:Tier3CompileThreshold=2 -XX:Tier3BackEdgeThreshold=10 -XX:Tier4InvocationThreshold=4 -XX:Tier4MinInvocationThreshold=3 -XX:Tier4CompileThreshold=2 -XX:Tier4BackEdgeThreshold=8 -XX:TieredCompileTaskTimeout=5000 -XX:Tier3DelayOn=50 -XX:Tier3DelayOff=25 -XX:+UseFastEmptyMethods -XX:-DontCompileHugeMethods -XX:+AlwaysCompileLoopMethods -XX:+CICompilerCountPerCPU -XX:+UseStringCache -XX:+UseNUMA -jar $SERVICE nogui"
    BTW: The arguments came from your original post just after the 1st DW20 1.6.4 pack was released.
     
  15. Eyamaz

    Eyamaz New Member

    oh dear, upgrade to the newer arguments. those arguments started causing issues with the compilation additions i didnt have time to finish working on. there were a few other arguments i changed also. so lets start with that first.
     
  16. keybounce

    keybounce New Member

    There is no way to tell if GC is the issue without seeing the GC logs.

    How many cores?

    If it is one core, then CMS is hurting you.
    If it is two cores, then CMS might be a hurt, or might be a benefit.

    Both one and two cores are supposed to benefit from incremental mode, which runs the CMS in little bits, letting the game continue in-between.

    Ignore the TPS of the dimensions; look at the overall TPS.

    Now, get Opis. Opis's job is to show you where the slow entities and tile entities are.

    Dim 0 (overworld), 6 (?), 11 (?), and -100 (deep dark) are all slow. Let Opis tell you why.
     
  17. DREVL

    DREVL Well-Known Member

    what are the newer arguments?
     
  18. Eyamaz

    Eyamaz New Member

    The ones currently up. The ones in question were a previous iteration were I was also attempting to optimize compilation that I have since dropped working on (at least currently.)
     
  19. DREVL

    DREVL Well-Known Member

    cool, so the copypasta needs to come from your edited op?
     
  20. Eyamaz

    Eyamaz New Member

    Always from the OP. If the (Updated +date+) changes, it means update the ones you are using too.
     

Share This Page