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

  • FTB will be shutting down this forum by the end of July. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Mtshaw113

New Member
Jul 29, 2019
36
0
0
*Sorry for posting this again, but I really need the help*
Do I just put the Args in ServerStart.bat ? Im running Unleashed and for some reason its taking up 50% of my CPU, and it definitely should not be, so I started looking for some hopeful fixes. My server is a rack server my dad got from his work, 32GB of ram, Intel Xeon 4 quad cores at 3.4 GHz. I set the priority to High in Task Manager, but i dont know if that does anything(My dad is really smart and stuff and he said it should). So if anyone has anyone other solutions for me that'd be amazing.
 

Ashzification

New Member
Jul 29, 2019
7,425
1
0
Do I just put the Args in ServerStart.bat ? Im running Unleashed and for some reason its taking up 50% of my CPU, and it definitely should not be, so I started looking for some hopeful fixes. My server is a rack server my dad got from his work, 32GB of ram, Intel Xeon 4 quad cores at 3.4 GHz. I set the priority to High in Task Manager, but i dont know if that does anything(My dad is really smart and stuff and he said it should). So if anyone has anyone other solutions for me that'd be amazing.

Not on this thread.

Open a tech support thread. This is not a generic "ooh please help me with my problem" thread. It's an information thread.

*Sorry for posting this again, but I really need the help*
Do I just put the Args in ServerStart.bat ? Im running Unleashed and for some reason its taking up 50% of my CPU, and it definitely should not be, so I started looking for some hopeful fixes. My server is a rack server my dad got from his work, 32GB of ram, Intel Xeon 4 quad cores at 3.4 GHz. I set the priority to High in Task Manager, but i dont know if that does anything(My dad is really smart and stuff and he said it should). So if anyone has anyone other solutions for me that'd be amazing.


Google is your friend: http://www.minecraftforum.net/topic/63836-making-your-server-lag-less-by-tuning-java-settings/
 

TomeWyrm

New Member
Jul 29, 2019
898
1
1
*Sorry for posting this again, but I really need the help*
Do I just put the Args in ServerStart.bat ? Im running Unleashed and for some reason its taking up 50% of my CPU, and it definitely should not be, so I started looking for some hopeful fixes. My server is a rack server my dad got from his work, 32GB of ram, Intel Xeon 4 quad cores at 3.4 GHz. I set the priority to High in Task Manager, but i dont know if that does anything(My dad is really smart and stuff and he said it should). So if anyone has anyone other solutions for me that'd be amazing.

Your ServerStart.bat file should look like this right now:
Code:
java -Xms512M -Xmx1G -XX:PermSize=128m -jar ftbserver.jar

You want it to look like this:
Code:
java -Xms2048m -Xmx2048m -Xmn512m -XX:TargetSurvivorRatio=80 -XX:MaxTenuringThreshold=31 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=40 -XX:GCPauseIntervalMillis=150 -XX:+AggressiveOpts -XX:PermSize=1024m -XX:+TieredCompilation -XX:ReservedCodeCacheSize=2048m -XX:+UseCodeCacheFlushing -XX:CompileThreshold=1000 -jar ftbserver.jar nogui

With your server, I would use the arguments on this thread, or that one: http://www.minecraftforum.net/topic...d-line-options-for-minecraft-servers-clients/

The ones Ashzification linked are already included or surpassed on this thread (or the one I linked). Plus the original post doesn't even answer your question!

Edit: Make sure to read the "A note on numbers, scaling and my recommendations" section at the bottom of the original post in this thread. You've got enough ram to scale some of these number up, I just used the default flags as an example.
 
  • Like
Reactions: un worry and Eyamaz

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Btw, tome, I haven't had a chance to look into that crash yet. I will get to it though.
 

TomeWyrm

New Member
Jul 29, 2019
898
1
1
No rush from me. I took the mod out because I realized I preferred Myrathi's FlatSigns to Poersch's BetterSigns anyway.

Honestly I should probably go post that on Poersch's thread, but with it being a (likely) rare crash involving JVM arguments; I'd prefer giving at least an idea of how to fix it instead of "Uh... your mod crashes with this JVM flag enabled. Thought you ought to know"
 
  • Like
Reactions: Eyamaz

Slaytan

New Member
Jul 29, 2019
2
0
0
Sorry for the noobness. I created a shortcut to the FTB launcher, and where is says target I try to paste the arguments, but it gets cut off, like there isnt enough room for all of it. Am i putting it in the wrong spot?
 

Smarteepant

New Member
Jul 29, 2019
4
0
0
So, I know almost nothing about java. I have an iMac with 2.7 GHz Intel Core i5, 16GB of RAM, OSX Lion 10.7.5, and 64 bit Java 7. I had a command file that worked for me before, and I replaced the arguments in it with your server arguments (I deleted the previous ones because I am a noob) So now my command file looks like this:
Code:
#!/bin/bash
cd "$( dirname "$0" )"
java -server -Xms8192m -Xmx8192m -Xmn2048m -XX:TargetSurvivorRatio=80 -XX:MaxTenuringThreshold=31 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=40 -XX:GCPauseIntervalMillis=150 -XX:+AggressiveOpts -XX:PermSize=1024m -XX:+TieredCompilation -XX:ReservedCodeCacheSize=2048m -XX:+UseCodeCacheFlushing -XX:CompileThreshold=1000 -jar ftbserver.jar nogui
(If I remove #!/bin/bash
cd "$( dirname "$0" )" I can't access ftbserver.jar)
And I get this error:

Last login: Wed Oct 16 13:07:26 on ttys000
/Users/Account/Desktop/Unleashed\ Server/LaunchServer.command ; exit;
Users-iMac:~ Account$ /Users/Account/Desktop/Unleashed\ Server/LaunchServer.command ; exit;
Error occurred during initialization of VM
Could not reserve enough space for code cache
logout

[Process completed]

Please help me, I really have no idea how to fix it and I would like to know how and why it's doing this.
Thanks in advance

EDIT: I found that the -XX:ReservedCodeCache=2048m was messing it up and I took it out, but I would still like to know how to fix it.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Sorry for the noobness. I created a shortcut to the FTB launcher, and where is says target I try to paste the arguments, but it gets cut off, like there isnt enough room for all of it. Am i putting it in the wrong spot?

The arguments go into the options tab of the launcher itself.

So, I know almost nothing about java. I have an iMac with 2.7 GHz Intel Core i5, 16GB of RAM, OSX Lion 10.7.5, and 64 bit Java 7. I had a command file that worked for me before, and I replaced the arguments in it with your server arguments (I deleted the previous ones because I am a noob) So now my command file looks like this:
Code:
#!/bin/bash
cd "$( dirname "$0" )"
java -server -Xms8192m -Xmx8192m -Xmn2048m -XX:TargetSurvivorRatio=80 -XX:MaxTenuringThreshold=31 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=40 -XX:GCPauseIntervalMillis=150 -XX:+AggressiveOpts -XX:PermSize=1024m -XX:+TieredCompilation -XX:ReservedCodeCacheSize=2048m -XX:+UseCodeCacheFlushing -XX:CompileThreshold=1000 -jar ftbserver.jar nogui
(If I remove #!/bin/bash
cd "$( dirname "$0" )" I can't access ftbserver.jar)
And I get this error:

Last login: Wed Oct 16 13:07:26 on ttys000
/Users/Account/Desktop/Unleashed\ Server/LaunchServer.command ; exit;
Users-iMac:~ Account$ /Users/Account/Desktop/Unleashed\ Server/LaunchServer.command ; exit;
Error occurred during initialization of VM
Could not reserve enough space for code cache
logout

[Process completed]

Please help me, I really have no idea how to fix it and I would like to know how and why it's doing this.
Thanks in advance

That's strange. I'm not a mac guy, so it might be a mac issue. Try lowering permsize to 512m and researvedcodecache to 1024m.
 

Smarteepant

New Member
Jul 29, 2019
4
0
0
The arguments go into the options tab of the launcher itself.



That's strange. I'm not a mac guy, so it might be a mac issue. Try lowering permsize to 512m and researvedcodecache to 1024m.
I'll try, but removing ReservedCodeCache works also.
 

Smarteepant

New Member
Jul 29, 2019
4
0
0
To start, you need to be using Java 6 to use a launcher to launch modded Minecraft.
Otherwise, you need to update LWJGL in every modpack, every time you update.
I know, I have my launcher running java 1.6, but the server can use 1.7[DOUBLEPOST=1381950130][/DOUBLEPOST]
I'll try, but removing ReservedCodeCache works also.
Lowering ReservedCodeCache to 1024m works, thanks Eyamaz.
 

Xiaxi

New Member
Jul 29, 2019
2
0
0
When i add the FTb launcher settings my ftb fps is lowered 5 times whats up with that?
also when i do it it either crashes of to not enough PermGem size or calllablelv12 whats that?
sorry if i'm just a java noob
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
When i add the FTb launcher settings my ftb fps is lowered 5 times whats up with that?
also when i do it it either crashes of to not enough PermGem size or calllablelv12 whats that?
sorry if i'm just a java noob

What version of java are you using? Be sure you have the latest 64bit java 7.
 

Vaygrim

New Member
Jul 29, 2019
533
0
0
Eyamaz,
Have you ever seen this:

Client> # A fatal error has been detected by the Java Runtime Environment:
Client> #
Client> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000020ff5160, pid=1412, tid=7880
Client> #
Client> # JRE version: Java(TM) SE Runtime Environment (7.0_40-b43) (build 1.7.0_40-b43)
Client> # Java VM: Java HotSpot(TM) 64-Bit Server VM (24.0-b56 mixed mode windows-amd64 compressed oops)
Client> # Problematic frame:
Client> # C 0x0000000020ff5160
Client> #
Client> # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
Client> #
Client> # An error report file with more information is saved as:
Client> # E:\Games\Minecraft\Instances\1.6.4\hs_err_pid1412.log
Client> #
Client> # If you would like to submit a bug report, please visit:
Client> # http://bugreport.sun.com/bugreport/crash.jsp
Client> #
Game ended with bad state (exit code 1)
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Yup, it happens with and without my arguments. Still don't know exactly why that happens though I believe it's from the way java handles memory. All documentation I've found refers to it as a program trying to write to a section of memory researved by the OS for system use.

This error was floating around long before this thread and even happened to jadedcat a few times on stream while playing on forgecraft. Nothing I can do about it.
 

Vaygrim

New Member
Jul 29, 2019
533
0
0
Thanks for the response! I just wanted to make sure it wasn't something I was screwing up. I never got it when using MultiMC, but after I switched to the Minecraft Official Launcher I've started getting it more and more.