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

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
sorry, i haven't had much time to get into it yet. thanksgiving and FTB stuff.

edit: are you using the arguments exactly as specified and only increasing Xms and Xmx to the needed amount? your running into oom:permgen errors which shouldn't be happening unless you are lowering your permgen or not giving following the rule of you need at least a 1GB buffer between what you want your heap at and what it should be.

ie if you have 7GB of RAM available to allocate, you should only be allocating 6GB at the most.

if your running this server along side the client, your just going to get into a lot of issues. these arguments are not designed for that.
 
Last edited:

Omicron

New Member
Jul 29, 2019
2,974
0
0
It's not giving me any problems to run both client and server on the same machine with these arguments, for the record.

(But I do have 16 GB memory to throw at the issue, so...)
 
  • Like
Reactions: Eyamaz

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
It's not giving me any problems to run both client and server on the same machine with these arguments, for the record.

(But I do have 16 GB memory to throw at the issue, so...)

It "shouldn't" if you have a decent computer to do it off of, but the extra compiler threads I'm forcing make using these less than an ideal set up for doing it.
 

Omicron

New Member
Jul 29, 2019
2,974
0
0
So if I set my client to something like just -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+AgressiveOpts like the FTB launcher passes, for example, then I'd be giving the server more breathing room?
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Oh god no, incremental mode was horrible in my testing...
You could try just removing the CICompilerCountPerCPU from both client and server, but it's going to take longer for classes/methods to compile and possibly hurt performance for an extended period of time. If you're not having any issues, I wouldn't worry about it.
I haven't had a chance to test these in a VPS environment, but that would be the only flag that would cause issues I believe.
 

Omicron

New Member
Jul 29, 2019
2,974
0
0
Not using a VPS either, just my home machine. It's the cheapest option :p

I was giving the clients the arguments mostly because "if it's good for the server it can't be that bad for the client". Didn't think they could possibly conflict.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Not using a VPS either, just my home machine. It's the cheapest option :p

I was giving the clients the arguments mostly because "if it's good for the server it can't be that bad for the client". Didn't think they could possibly conflict.

It's not an issue of client/server, it's an issue of multiple VMs running on the same machine. Unless you have a good computer, you're going to have a lot of contention between them.
 

keybounce

New Member
Jul 29, 2019
1,925
0
0
Oh, how much more contention can it be compared to any two multi-threaded programs when either or both might want to use NUM_CPU's for a temporary batch of multi-threading that normally lasts only a fraction of a second, occasionally 2-3 seconds, and every 60-300 seconds for 10-15 seconds?
 
  • Like
Reactions: Eyamaz

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Oh, how much more contention can it be compared to any two multi-threaded programs when either or both might want to use NUM_CPU's for a temporary batch of multi-threading that normally lasts only a fraction of a second, occasionally 2-3 seconds, and every 60-300 seconds for 10-15 seconds?

A lot actually. Java is getting better about how threads are handled, but there can still be issues with GC threads from different VMs fighting for CPU threads. Add in all the OS threads, and you get issues.
This is actually why I don't use the ParallelGCThreads = n-1.
If one VM happens to hog a cpu for garbage collection during a full gc, and the thread of a second VM's CMS is on the same core, your second VM may well end up with a stop the world event.
If anything, I would have to recommend ParallelCMSThreads=n, but I haven't been able to do proper tests on it yet.
 

Omicron

New Member
Jul 29, 2019
2,974
0
0
Actually gave it a test run today... the client suffered from microstutter (still FPS over 100 but constant intermittent stuttering) when I did not have your arguments in place (or only just some basic ones). Whatever contention there may be, it seems that the server is much more aggressively hogging resources when the client is not "hogging back", so to speak. I've put the arguments back in now since that gives me perfectly smooth gameplay, and in the end that's what counts ;)
 
  • Like
Reactions: Eyamaz

cheeseywiz98

New Member
Jul 29, 2019
8
0
0
Thanks for the code! But I seem to have a little problem with it :S . As soon s I launch the server with it, it immediately closes, it doesn't even open really.
I checked that my system met all the requirements (Windows x64, Latest x64 Java, and I have 3 extra GB free to allocate to the server) But for some reason it just won't work. Any idea how to fix this?
I play on the same computer I run it on (Not by choice :S ).

Edit: Ok, i used "Pause" (Woo, I learned something) After the code to see what the cmd prompt said, and it said "'-Xms2048m' is not recognized as an internal or external command, operable program or batch file".
 
Last edited:

eashonk

New Member
Jul 29, 2019
56
0
0
would any of these work with any other launcher, the ATLauncher for example?

I want to play with the new thermal expansion 3 for 1.6.4 and they've got it in one of their packs.
 

Eyamaz

New Member
Jul 29, 2019
2,373
0
0
Thanks for the code! But I seem to have a little problem with it :S . As soon s I launch the server with it, it immediately closes, it doesn't even open really.
I checked that my system met all the requirements (Windows x64, Latest x64 Java, and I have 3 extra GB free to allocate to the server) But for some reason it just won't work. Any idea how to fix this?
I play on the same computer I run it on (Not by choice :S ).

Edit: Ok, i used "Pause" (Woo, I learned something) After the code to see what the cmd prompt said, and it said "'-Xms2048m' is not recognized as an internal or external command, operable program or batch file".

You have an extra space in there before that command, most likely.
 

Ashzification

New Member
Jul 29, 2019
7,425
1
0
would any of these work with any other launcher, the ATLauncher for example?

I want to play with the new thermal expansion 3 for 1.6.4 and they've got it in one of their packs.
See all of @Eyamaz's responses to similar posts.
I do not use ATLauncher nor the Technic launcher and have not tested anything with them so I do not support them. Not for any distaste for either, I just have no use for them. You can probably ask on their respective forums, but I will not be trouble shooting anything with their packs or launchers.
Specifically that one.
 
  • Like
Reactions: lavarthan

eashonk

New Member
Jul 29, 2019
56
0
0
well, not really asking for support, i just know nothing about java and had previously put some arguments in the vanilla launcher that didn't seem to cause any harm, if i had not seen the different iterations of code for different launchers I would've just pasted it in to see if it worked, which i will probably do anyway, but since I don't know anything about them, i thought I'd ask if it would work or not.
 

Zaver

New Member
Jul 29, 2019
7
0
0
Is there any change you create JVM args for 32 bit systems with 3GB ram. Because I think would still better then nothing. I know a lot of people who can't even create new world, because of outofmemory error.
 

keybounce

New Member
Jul 29, 2019
1,925
0
0
Out of memory when creating a world?

1. Do you have PermGen raised up to at least 128 mb? (I put -XX:MaxPermSize=150m in my configs).
2. Heap space ... well, single player, ATG can easily consume 400 MB, and today I had 600 MB while testing a world with underground biomes and giant hills. So, make sure you've got enough.

I guess the best answer is: pay attention to the amount of memory your modpack needs.

-XX:+PrintHeapAtGC -XX:+PrintGCDetails
 

un worry

New Member
Jul 29, 2019
384
0
1
well, not really asking for support, i just know nothing about java and had previously put some arguments in the vanilla launcher that didn't seem to cause any harm, if i had not seen the different iterations of code for different launchers I would've just pasted it in to see if it worked, which i will probably do anyway, but since I don't know anything about them, i thought I'd ask if it would work or not.

I'm running 32-bit 3GB RAM , and modified the server arguments from the from the front page.

Decreased ram to 768m (-Xmx768m) and PermSize to 128m (-XX:permSize=128) and removed Reserved Code Cache argument

In my case, this led to no more out of memory problems. It seemed counter-intuitive to reduce ram, but using F3 - my RAM utilization never exceeds 75%, the world and new chunks now loads smoothly and FPS has more than doubled