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

TinkerFox

New Member
Jul 29, 2019
6
0
0
Im really sorry if this is a repeat but as i skimmed through 19 pages of hard-core coding my eyes started to glaze over...
anyway i was wondering if you could explain to a noob how to add these java parameters to the FTB launcher. In the brief instructions inside the spoiler that contains the jam arguments it mentions going to the option cog on the bottom left. There isn't anything on the bottom left so i went to the cog on the top labeled options. Then looking for anything with "JMV" in the name i found nothing but "advanced options" so i went there and found "Additional Java Parameters" i figured i might try to put something in there but to my horror i cannot copy paste from this thread to that F****** little box. An in depth tutorial on how to add these parameters would be great. FWI I came from this post
http://forum.feed-the-beast.com/threads/direwolf20-1-6-4-1-0-2-freezing-after-a-minute-or-two.35726/
and i have the same problem (no lag then super lag and must force quit) as that person so any help at all is great thanks!

P.S. if writing it out is the only way around it then i have no chance at all. :(
 

lavarthan

New Member
Jul 29, 2019
2,437
0
0
Have you tried pressing Control+V? Make sure you can type in it. Then remove your typing and press Control+V. That works for me.
 

Gerald Huppertz

New Member
Jul 29, 2019
196
0
0
Hi Tinkerfox,

You are in the correct place. In the FTB launcher go to Advanced Options. Then copy and paste the Java Arguments from the first post in this thread into the Additional Java Parameters box. If you cannot copy and paste directly try to copy and paste the line into notepad first.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
I had a change pushed to the launcher. As of v1.30 it no longer pushes the explicit arguments it was. This will reduce some of the problems people had both with and without using my arguments.
 
  • Like
Reactions: lavarthan

TinkerFox

New Member
Jul 29, 2019
6
0
0
unfortunately copying the post to text edit or Word does not allow me to paste it into the specified area. Is there any reason for this? Also in this post http://forum.feed-the-beast.com/threads/direwolf20-1-6-4-1-0-2-freezing-after-a-minute-or-two.35726/ my problem with the mod pack is described. If it is likely that these extra parameters will help then i will gladly write the whole thing out even if it takes all day.
edit: i was trying to write it out and so far the first couple of extra perms are no working, it says stuff like java does not recognize the option -XX:ReservedCodeCacheSize=512m and java could not create the virtual machine.
 
Last edited:

Gerald Huppertz

New Member
Jul 29, 2019
196
0
0
How are you trying to paste? Are you trying to right click and select paste because you cannot do that. You MUST use the keyboard shortcut for paste (CTRL-V)

EDIT; What version of Java are you using? Are you using the 64bit Update 45? Those parameters will not work if you are running the 32bit Java.
 

Stadniuk

New Member
Jul 29, 2019
19
0
0
Hello Eyamaz, thank you for your post, it has been helping me for a while now!

I'm running a 1.6.4 Server, using Windows and MCMyAdmin with MCPC+. I'm alocating 6Gb out of the 7Gb available
For some reason, when I try running the server with the new arguments it fails to load with the following error at the end:

Code:
2013-12-05 17:08:00 [SEVERE] [ForgeModLoader] A fatal exception occurred during the server about to start event
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.google.common.base.Throwables.propagate(Throwables.java:160)
    at cpw.mods.fml.common.LoaderState.getEvent(LoaderState.java:88)
    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
    at cpw.mods.fml.common.Loader.serverAboutToStart(Loader.java:817)
    at cpw.mods.fml.common.FMLCommonHandler.handleServerAboutToStart(FMLCommonHandler.java:309)
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:222)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:633)
    at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at cpw.mods.fml.common.LoaderState.getEvent(LoaderState.java:84)
    ... 6 more
Caused by: java.lang.IllegalArgumentException: No enum constant org.bukkit.block.Biome.Tropics
    at java.lang.Enum.valueOf(Unknown Source)
    at org.bukkit.craftbukkit.v1_6_R3.block.CraftBlock.initMappings(CraftBlock.java:509)
    at org.bukkit.craftbukkit.v1_6_R3.CraftServer.enablePlugins(CraftServer.java:247)
    at cpw.mods.fml.common.event.FMLServerAboutToStartEvent.<init>(FMLServerAboutToStartEvent.java:30)
I've tried modifying the arguments, but I couldn't get them to work. Also, I don't know if it's my arguments are wrong, but RAM usage seems too high on startup, and never decreases. It goes up and up. (Maybe something to do with garbage collection?)
It would be great if you can help me with any of these problems, since I looked everywhere and tried everything and I still cannot fix this.

Thank you in advanced,
Simon.

PS: I'm sorry for any spelling errors, English is not my native language :p
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
hrm, i don't test against mcpc, so i have no idea what to to tell you on that one, but this looks like an issue with whatever bukkit plugin is adding the "Tropics" biome. report this to the mcpc authors.
 

Zexmaxwell001

New Member
Jul 29, 2019
92
0
0
hrm, i don't test against mcpc, so i have no idea what to to tell you on that one, but this looks like an issue with whatever bukkit plugin is adding the "Tropics" biome. report this to the mcpc authors.
Good luck with that. all they say is to change your JVM arguments so it doesn't crash.
 

Keloooe_Pest

New Member
Jul 29, 2019
2
0
0
Hey Eyamaz, I am running your MultiMC 5 commands on my MultiMC 5 instances, and I get this straight away

Could not create the Java virtual machine.
Unrecognized VM option 'Tier0ProfilingStartPercentage=0'

Minecraft exited with exitcode 1.
 

TinkerFox

New Member
Jul 29, 2019
6
0
0
Yes i found out a while ago i was on the wrong java and when i fixed it my lag problems stopped thx guys.
 

DrDeft

New Member
Jul 29, 2019
2
0
0
Hello, Eyamaz.
Please help us to make best java configs ^_^

Windows 7 Pro 64bit
Gamai.Ru 2150 slots. 20 minecraft servers 100-150 slots. Avarage online 1500-2100 players.
6 server machines I7-4930K (6 core - 12 threads) 4500mhz, 64Gb DDR3 1600 mhz 9-9-9-26, RAMdisk 8Gb.
3 minecraft servers per machine running.

Here are our test java configs, but only you can help us to make them better (java 7u45 64bit). We really need your help...

1st server
:begin
ping localhost -n 5
"C:\Program Files\Java\jre7\bin\java1.exe" -Xms4G -Xmx4G -XX:permSize=512m -XX:ReservedCodeCacheSize=1024m -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 -XX:UseSSE=4 -Dfile.encoding=UTF-8 -jar Spigot_build_830_handshakefix2.jar nogui --log-limit=100000000
goto begin

2nd server
:begin
ping localhost -n 5
"C:\Program Files\Java\jre7\bin\java2.exe" -Xms4G -Xmx4G -XX:permSize=512m -XX:ReservedCodeCacheSize=1024m -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 -XX:UseSSE=4 -Dfile.encoding=UTF-8 -jar Spigot_build_830_handshakefix2.jar nogui --log-limit=100000000
goto begin

3rd server
:begin
ping localhost -n 5
"C:\Program Files\Java\jre7\bin\java3.exe" -Xms4G -Xmx4G -XX:permSize=512m -XX:ReservedCodeCacheSize=1024m -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 -XX:UseSSE=4 -Dfile.encoding=UTF-8 -jar Spigot_build_830_handshakefix2.jar nogui --log-limit=100000000
goto begin

==========================
This configs we had before reading your article.

:begin
ping localhost -n 5
"C:\Program Files\Java\jre7\bin\java1.exe" -Xmx14G -Xms1G -XX:SurvivorRatio=8 -XX:permSize=256m -XX:MaxPermSize=256m -XX:-OmitStackTraceInFastThrow -XX:parallelGCThreads=4 -Dfile.encoding=UTF-8 -XX:UseSSE=4 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:+CMSParallelRemarkEnabled -XX:MaxGCPauseMillis=5 -XX:+DisableExplicitGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -XX:+UseBiasedLocking -XX:TargetSurvivorRatio=90 -XX:+UseLargePages -jar Spigot_build_830_handshakefix2.jar nogui --log-limit=100000000
goto begin

==========================
Why do we want to change our java configs? Because our servers have lag spikes every 5-20 minutes with 20 TPS all the time and total computer CPU utilization 10-45%. We think this is the issue of garbage collector. Please help to fix that boring lag spikes =(
 
Last edited:

wright_left

New Member
Jul 29, 2019
2
0
0
Hello Eyamaz, thank you for your post, it has been helping me for a while now!

I'm running a 1.6.4 Server, using Windows and MCMyAdmin with MCPC+. I'm alocating 6Gb out of the 7Gb available
For some reason, when I try running the server with the new arguments it fails to load with the following error at the end:

Code:
2013-12-05 17:08:00 [SEVERE] [ForgeModLoader] A fatal exception occurred during the server about to start event
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.google.common.base.Throwables.propagate(Throwables.java:160)
    at cpw.mods.fml.common.LoaderState.getEvent(LoaderState.java:88)
    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
    at cpw.mods.fml.common.Loader.serverAboutToStart(Loader.java:817)
    at cpw.mods.fml.common.FMLCommonHandler.handleServerAboutToStart(FMLCommonHandler.java:309)
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:222)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:633)
    at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at cpw.mods.fml.common.LoaderState.getEvent(LoaderState.java:84)
    ... 6 more
Caused by: java.lang.IllegalArgumentException: No enum constant org.bukkit.block.Biome.Tropics
    at java.lang.Enum.valueOf(Unknown Source)
    at org.bukkit.craftbukkit.v1_6_R3.block.CraftBlock.initMappings(CraftBlock.java:509)
    at org.bukkit.craftbukkit.v1_6_R3.CraftServer.enablePlugins(CraftServer.java:247)
    at cpw.mods.fml.common.event.FMLServerAboutToStartEvent.<init>(FMLServerAboutToStartEvent.java:30)
I've tried modifying the arguments, but I couldn't get them to work. Also, I don't know if it's my arguments are wrong, but RAM usage seems too high on startup, and never decreases. It goes up and up. (Maybe something to do with garbage collection?)
It would be great if you can help me with any of these problems, since I looked everywhere and tried everything and I still cannot fix this.

Thank you in advanced,
Simon.

PS: I'm sorry for any spelling errors, English is not my native language :p

I had to remove all the tiered compilation stuff to get rid of this error.

Removed these:

-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


I'm not sure if it was just one of those or not. I tried narrowing it down, but gave up.
 

Shadowzfire

New Member
Jul 29, 2019
46
0
0
Hello Eyamaz, thank you for your post, it has been helping me for a while now!

I'm running a 1.6.4 Server, using Windows and MCMyAdmin with MCPC+. I'm alocating 6Gb out of the 7Gb available
For some reason, when I try running the server with the new arguments it fails to load with the following error at the end:

Code:
2013-12-05 17:08:00 [SEVERE] [ForgeModLoader] A fatal exception occurred during the server about to start event
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.google.common.base.Throwables.propagate(Throwables.java:160)
    at cpw.mods.fml.common.LoaderState.getEvent(LoaderState.java:88)
    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
    at cpw.mods.fml.common.Loader.serverAboutToStart(Loader.java:817)
    at cpw.mods.fml.common.FMLCommonHandler.handleServerAboutToStart(FMLCommonHandler.java:309)
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:222)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:633)
    at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at cpw.mods.fml.common.LoaderState.getEvent(LoaderState.java:84)
    ... 6 more
Caused by: java.lang.IllegalArgumentException: No enum constant org.bukkit.block.Biome.Tropics
    at java.lang.Enum.valueOf(Unknown Source)
    at org.bukkit.craftbukkit.v1_6_R3.block.CraftBlock.initMappings(CraftBlock.java:509)
    at org.bukkit.craftbukkit.v1_6_R3.CraftServer.enablePlugins(CraftServer.java:247)
    at cpw.mods.fml.common.event.FMLServerAboutToStartEvent.<init>(FMLServerAboutToStartEvent.java:30)
I've tried modifying the arguments, but I couldn't get them to work. Also, I don't know if it's my arguments are wrong, but RAM usage seems too high on startup, and never decreases. It goes up and up. (Maybe something to do with garbage collection?)
It would be great if you can help me with any of these problems, since I looked everywhere and tried everything and I still cannot fix this.

Thank you in advanced,
Simon.

PS: I'm sorry for any spelling errors, English is not my native language :p

Simon, you're allocating 6gb out of 7gb? I suggest allocating less gb of memory. More memory in java applications like minecraft does not mean faster. You won't need more than 4gb, any more is needless and most likely causing you issues.

My tip here isn't mean't to fix your problem, just as a general set of advice.
 

Yusunoha

New Member
Jul 29, 2019
6,440
-4
0
I had a change pushed to the launcher. As of v1.30 it no longer pushes the explicit arguments it was. This will reduce some of the problems people had both with and without using my arguments.

might this perhaps fix the problems I have with the FTB launcher that I've discussed over here http://forum.feed-the-beast.com/threads/is-it-just-me.35610/
basically my problem is when I play modded minecraft through the vanilla launcher, my FPS is great, but if I try to play modded minecraft through another launcher like FTB or MultiMC, my FPS gets terrible ingame, even when I'm using the JVM Arguments you've posted.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
might this perhaps fix the problems I have with the FTB launcher that I've discussed over here http://forum.feed-the-beast.com/threads/is-it-just-me.35610/
basically my problem is when I play modded minecraft through the vanilla launcher, my FPS is great, but if I try to play modded minecraft through another launcher like FTB or MultiMC, my FPS gets terrible ingame, even when I'm using the JVM Arguments you've posted.

It should yes.
 

DR. DOOMADORE

New Member
Jul 29, 2019
31
0
0
I can confirm that you cannot copy&paste into the additional JVM parameters box at least on mac OS. Are they located in a file somewhere?