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

Duo

New Member
Jul 29, 2019
47
0
0
I fixed 90% of our lag issues when I setup a startup script when using the parameters for servers that are new in the first post with Monster, so thank you! I do have a question, when you say that setting the heap >4GB can cause garbage collection issues, does that mean that even though our server has 5.5GB of RAM, I shouldn't set -Xmx larger than 4096M so gc will behave itself?
 

Henry Link

Forum Addict
Dec 23, 2012
2,601
553
153
USA - East Coast
I fixed 90% of our lag issues when I setup a startup script when using the parameters for servers that are new in the first post with Monster, so thank you! I do have a question, when you say that setting the heap >4GB can cause garbage collection issues, does that mean that even though our server has 5.5GB of RAM, I shouldn't set -Xmx larger than 4096M so gc will behave itself?

LIkewise here. I updated java to 7u51 and updated my arguments to the ones currently in the OP. However, I'm sill seeing a overall mean TPS of about 18. Adding up each of the dimensions does add up to this number. So all good. Opis indicates that the AM2 Druid is taking more time than players do and there is thousands of them in the UnderDark. I've tried a couple of methods to disable this mob. Editing the AM2 config didn't do it. Any good ideas on how to disable them?
 

Gerald Huppertz

New Member
Jul 29, 2019
196
0
0
@Eyamaz,

Hi Eyamaz,
I have a question about the Java arguments, garbage collection and general performance. Both my friend and I are using your arguments but have the launcher slider set to 6GB due to our texture pack. I can probably bring that down as in game I see about 1.8Gb being used and I am wondering if that is what is causing our issue. I have seen you mention that too much ram can affect the garbage collection?
What is happening is that randomly we will experience stutter. Meaning I can be walking, or opening a chest or anything and the game will literally freeze for 3-5 seconds and then resume. It's definately client sides as the games then rushes and catches up to what has happened. (ie the zombie has already killed me.lol) Watching the fps the bounce from 49fps down to 15, sometimes 0 and then back up. It seems worse when close to my base which currently only has a tree farm automated with TE pipes.

Does this sound like it could be due to having too much set? I'm at work and will test with less ram tonight but wanted to understand a bit more about how ram allocation correlates to the Java GC system.

Thanks
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
Hmm been using these settings in the past with great success but just tried these new ones for monster today and discovered that 2GB is no longer enough for Monster with Soartex. The F3 ram usage is yoyo'ing up and down leading to seconds long freezes at each peak. So just wanted to make sure I am doing this right, as I and a downright newb at this:

Setting slider in launcher to 3GB
Code:
-Xms3072m -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
That looks about right?

Also for ease of users, maybe add a pre-written 3 or 4GB setup to the front page for people using texturepacks? 2GB doesn't seem to cut it any more.
 
  • Like
Reactions: Croaganey

FuturamaPhill

New Member
Jul 29, 2019
6
0
0
Whenever i put in the arguments from the original post into my game doesn't load, it crashes on the mojang logo.
i have followed the instructions correctly but still have the issue, im playing on Direwolf20 1.6.4
 

flamedance58

New Member
Jul 29, 2019
39
0
0
Oh grand.

So my game was running at around 60-70fps after reformatting the whole computer and then using the parameters listed.
All of a sudden I'm running 3-10fps again -_-.

[Edit] So I removed the JVM and I can play at a stable 20fps+.
 
Last edited:

Myst83

New Member
Jul 29, 2019
1
0
0
Hello!
I'm currently running a FTB DW20 server for my uncle kids. for the longest time i have had a FTB Unleashed server running on a older win7 pc, with no truble.
now that i have stoped that server, and startet the DW20 for them, they and i are getting som lagg/stuttering isue.
After trying what ever i could fine on the internet, i finaly reeinstaled the pc to Ubuntu 12.04. After reading allt the forums about the benefits with ubuntu :p
now then, i'm not the strongest in linux, and have strugeling a bitt updating java.
but i manage that at last to.
Now i'm trying to find the best way to comfig that .bat file.
But what ever i trye, i end up with it not starting at all, exept with the "default" setings.
the system is:

Intel i7 930 2.8GHz
12GB memory
120 GB SSD
Ubuntu 12.04
Java 7 U51

I have tryed the settings for the FTB launcher, and it looks like it helps a bit.
I'm hoping that you may help me. i'm starting to get frustrated here!

In advance, thank's for the help you may give!
 

obscurehero

New Member
Jul 29, 2019
17
0
0
For the server arguments my CPU usage went up like crazy with these arguments. My heap stays small, around 2G, despite having 8G being allocated.

I have the following:
E3-1230v3
16GB memory
120GB SSD
Debian 7 wheezy
Java 7u51 (Oracle JDK)
 

keybounce

New Member
Jul 29, 2019
1,925
0
0
My game keeps crashing, says "too small initial heap". What's up with that?

First question: Did you leave off the 'm' after the -Xms argument?

If not: What are the startup args you are giving the JVM?[DOUBLEPOST=1391283961][/DOUBLEPOST]
For the server arguments my CPU usage went up like crazy with these arguments. My heap stays small, around 2G, despite having 8G being allocated.

I have the following:
E3-1230v3
16GB memory
120GB SSD
Debian 7 wheezy
Java 7u51 (Oracle JDK)

Full set up startup args?

16 GB of system memory, ok.
How much of that is actually free when you start up minecraft? (I don't know the command to tell on linux, sorry)
The "E3-xxx" -- I'm assuming that's the CPU. How many cores?
 

SamB167

New Member
Jul 29, 2019
7
0
0
Hi, forum members.

The server argument in the OP doesn't seem to work for me. I'm running my server on Windows Server 2008 R2 Standard, with Service Pack 1.

I copy and paste the argument in the .bat file but when I open the file it doesn't seem to load, or it loads something so quickly that I don't see the message and then closes it's self.

Have I done something wrong?

Thanks in Advanced.

SamB167
 

Tristam Izumi

New Member
Jul 29, 2019
1,460
0
0
Hi, forum members.

The server argument in the OP doesn't seem to work for me. I'm running my server on Windows Server 2008 R2 Standard, with Service Pack 1.

I copy and paste the argument in the .bat file but when I open the file it doesn't seem to load, or it loads something so quickly that I don't see the message and then closes it's self.

Have I done something wrong?

Thanks in Advanced.

SamB167
Did you make sure to retain the "java" at the beginning and the "-jar FTBServer-1.6.4-965.jar nogui" at the end of the first line?
Did you also keep the "pause" on the second line?
 

SamB167

New Member
Jul 29, 2019
7
0
0
No it seems I just deleted it all and copy and pasted the argument. I'm not sure how the content of my .bat file should look. I have a couple of servers installed, but only run one at a time, and when I open up the other server and go to the .bat file (which I haven't edited) all that is in there is this - "java -Xms512M -Xmx1G -XX:permSize=128m -jar ftbserver.jar"

So where should there be the "-jar FTBServer-1.6.4-965.jar nogui" and the "pause"

Thanks for helping me out it's been annoying me.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
No it seems I just deleted it all and copy and pasted the argument. I'm not sure how the content of my .bat file should look. I have a couple of servers installed, but only run one at a time, and when I open up the other server and go to the .bat file (which I haven't edited) all that is in there is this - "java -Xms512M -Xmx1G -XX:permSize=128m -jar ftbserver.jar"

So where should there be the "-jar FTBServer-1.6.4-965.jar nogui" and the "pause"

Thanks for helping me out it's been annoying me.

Replace the -Xms512M -Xmx1G -XX:PermSize=128m with the arguments from the OP.

Edit: and don't forget to add nogui to the end.
 
  • Like
Reactions: Tristam Izumi

SamB167

New Member
Jul 29, 2019
7
0
0
My brain hurts,

This is what my .bat file looks like, it doesn't seem to load so I've done something wrong.
"java -Xms2048m -Xmx2048m -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 ftbserver.jar nogui"

How should my file look?

Thanks again
 
  • Like
Reactions: Henry Link

Tristam Izumi

New Member
Jul 29, 2019
1,460
0
0
Code:
java -Xms2048m -Xmx2048m -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 ftbserver.jar nogui
pause
 

Henry Link

Forum Addict
Dec 23, 2012
2,601
553
153
USA - East Coast
My brain hurts,

This is what my .bat file looks like, it doesn't seem to load so I've done something wrong.
"java -Xms2048m -Xmx2048m -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 ftbserver.jar nogui"

How should my file look?

Thanks again
Let see if we stop your head from hurting :)

Start by removing the quotes at the beginning and end. Also the part that I highlighted in RED should be the name of the .jar file to launch your server. Should be something like FTBServer-1.6.4-965.jar for the 1.6.4 packs. Everything else looks good.

EDIT: Also Tristam suggested pause on the 2nd line. This is a good idea that way you can see any error messages and report them to us if there is still issues.
 

SamB167

New Member
Jul 29, 2019
7
0
0
Ah brilliant trick there, the pause lets me see the error. Ok so the error I'm getting is -
"Unrecognized VM option 'permSize=256m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit."

I'm such a noob.