JVM argument -Xmx10G doesnt save, goes back to -Xmx4096m

  • Tech Support section is for getting help with FTB related problems. If there's a repeatable issue that can be labeled as a bug, then please use the issue tracker for the pack or the app at GitHub issue trackers - If there's no repository for a pack that means that the pack is old and/or will not be updated. Bugs for older packs will not be fixed, unless they are critical.
  • 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

SaW1337

New Member
Jul 29, 2019
12
0
0
Title:
JVM argument -Xmx10G doesnt save, goes back to -Xmx4096m (after restart)
Launcher Version:
1.6.61
Modpack:
Space Galaxy
Modpack Version:
1.4.9
Log Link:
Details of the issue:
My minecraft tends to eat a lot of ram (probably due to 20+ world anchors/4 dimensions loaded at all times, tons of machines, 4 max-sized quarries, etc.).. While I don't really have problem with that since I have 1500$+ PC, my minecraft launcher tends to revert back to 4GB ram allocation every time I launch it, causing lags.. I have to edit the argument every time I want to play and sometimes I forgot to do it. Does anyone know a workaround so it stays at 10GB?

http://i.imgur.com/YgkGD21.png
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
Are you just using the vanilla launcher? Because then I have no idea why that would happen
If you are using the curse launcher (which then starts the vanilla launcher) there should be an option somewhere to set it. This is probably set to 4 GB and thus undoes your change every time. I wish I could say exactly where this option is but curse doesn't support my OS and thus I can't look for you.
 

SaW1337

New Member
Jul 29, 2019
12
0
0
Then why am I getting huge lag spikes when using only 4GB? Under debug, I can see those 4gb going full every 3 secs, freezing the game for random amount of time (sometimes even 10 secs). 6GB ain't so bad at first, but starts lagging after switching dimensions. Why on earth in 2016 there's a 6gb limit?
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
Then why am I getting huge lag spikes when using only 4GB? Under debug, I can see those 4gb going full every 3 secs, freezing the game for random amount of time (sometimes even 10 secs).
Under normal circumstances 4 GB is good and adding more will usually cause more problems then it solves due to how Java works (more specifically the garbage collection). In your case though it does sound like having a bit extra doesn't hurt.

As for the 6GB limit, I can think of multiple reasons. It may have limit you to that due to the total amount of RAM available on your system or it may be because a good portion of people don't understand how RAM works and add way more then needed thinking it will solve all their problems when in fact it only causes problems for them and they decided that 6 GB is a nice spot just in case the "standard" of 4 GB is a bit too low for some.
 

UniZero

Popular Member
Oct 3, 2012
3,406
310
124
Scotland, UK
Then why am I getting huge lag spikes when using only 4GB? Under debug, I can see those 4gb going full every 3 secs, freezing the game for random amount of time (sometimes even 10 secs). 6GB ain't so bad at first, but starts lagging after switching dimensions. Why on earth in 2016 there's a 6gb limit?

You answered your question in your op. Do you really need that much chunk loaded at once? 4 max sized quarrys!! Like the other user says java is not great with memory management as it causes problems with garbage collection.

You may want to consider gettting a server instead.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
You answered your question in your op. Do you really need that much chunk loaded at once? 4 max sized quarrys!! Like the other user says java is not great with memory management as it causes problems with garbage collection.

You may want to consider gettting a server instead.
Well, if you look at his first post then you know that he doesn't have a problem when he allocates 10 GB of RAM. Normally I would advice against it as well however he already proved it worked somewhat. The problem he is having is that curse is being shit.

A server may get around that or it may very well do not or it may create extra problems assuming it will be hosted on the same machine. Unless you suggest that he goes ahead and either buys a computer to host it on or goes to a hosting company in that case you want him to spend money on something that may end up giving other problems if it turns out the hosting computer isn't powerful enough while he already knows a fix/work around that doesn't cost him anything.

Don't fix something that isn't broken. In this case having 10 GB of RAM allocated doesn't seem to break anything and thus there is no reason to fix it. However I do think that might be able to lower it a bit but again, why fix something that isn't broken.
 

UniZero

Popular Member
Oct 3, 2012
3,406
310
124
Scotland, UK
Well, if you look at his first post then you know that he doesn't have a problem when he allocates 10 GB of RAM. Normally I would advice against it as well however he already proved it worked somewhat. The problem he is having is that curse is being shit.

A server may get around that or it may very well do not or it may create extra problems assuming it will be hosted on the same machine. Unless you suggest that he goes ahead and either buys a computer to host it on or goes to a hosting company in that case you want him to spend money on something that may end up giving other problems if it turns out the hosting computer isn't powerful enough while he already knows a fix/work around that doesn't cost him anything.

Don't fix something that isn't broken. In this case having 10 GB of RAM allocated doesn't seem to break anything and thus there is no reason to fix it. However I do think that might be able to lower it a bit but again, why fix something that isn't broken.

True I suppose.
 

galexj9

New Member
Jul 29, 2019
4
0
0
Theres also generally a problem where you can't allocate the max amount of ram if you are using the x32 bit version of java. Twitch/Curse should allow you to allocate all but just a few gigs if you have the x64 bit java. I have 16Gb of RAM and it lets me allocate 12Gb (some is reserved for OS processes and other programs)
 

Henry Link

Forum Addict
Dec 23, 2012
2,601
553
153
USA - East Coast
Theres also generally a problem where you can't allocate the max amount of ram if you are using the x32 bit version of java. Twitch/Curse should allow you to allocate all but just a few gigs if you have the x64 bit java. I have 16Gb of RAM and it lets me allocate 12Gb (some is reserved for OS processes and other programs)[/QUOTE
You do realize that this is very old thread. Also the fact that he can allocate 10GB tells you he is already using the 64 bit java. Since the 32 bit version would restricted to less than 4GB. So please look at the dates before replying to thread that is old. Especially if you aren't adding anything to the discussion.