Bug ftb infinity RAM problems

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • 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

SuperMR

New Member
Jul 29, 2019
109
0
0
when i start the game its allright, the RAM goes up to about 50% and then dump the garbage (i guess) and reset to 20% but after a couple of minutes it goes all the way to 100% and then the lag spikes come.. (i'v dedicated 4 gigs i think its ok) any way to deal with it? because it makes the pack unplayable
 

Xygen8

New Member
Jul 29, 2019
16
0
0
I had this exact same problem on Infinity and added these arguments to the launcher's advanced options (thanks to user BlooBeuts on the FTB reddit):

-XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC

I also unticked the thing that makes the console stay open when the game is running. I still get the memory leak sometimes but it seems to work a lot better with these two tweaks. Also, 4 gigs of RAM for the game sounds a bit overkill, I've heard it can actually run worse if you allocate too much RAM. I'm using 2GB with no problems at all, and I've installed extra mods such as Rotarycraft, Reactorcraft and Electricraft.

I'll probably try to move the pack over to MultiMC and see if I can eliminate the memory leak completely. Apparently the FTB launcher is poorly optimized and can cause all sorts of problems.
 
  • Like
Reactions: SuperMR

SuperMR

New Member
Jul 29, 2019
109
0
0
I had this exact same problem on Infinity and added these arguments to the launcher's advanced options (thanks to user BlooBeuts on the FTB reddit):

-XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC

I also unticked the thing that makes the console stay open when the game is running. I still get the memory leak sometimes but it seems to work a lot better with these two tweaks. Also, 4 gigs of RAM for the game sounds a bit overkill, I've heard it can actually run worse if you allocate too much RAM. I'm using 2GB with no problems at all, and I've installed extra mods such as Rotarycraft, Reactorcraft and Electricraft.

I'll probably try to move the pack over to MultiMC and see if I can eliminate the memory leak completely. Apparently the FTB launcher is poorly optimized and can cause all sorts of problems.
thanks m8 ill try it :D and i guess ill try to down my ram to 2 if its not needed, thanks for the advice

where do i add the argument? in "additional java parmeters"?
 

Xygen8

New Member
Jul 29, 2019
16
0
0
thanks m8 ill try it :D and i guess ill try to down my ram to 2 if its not needed, thanks for the advice

I might add that I've only played with 2GB for a few days and I really don't know if it's stable in the long run. So far it has worked fine. Anyways, 3 gigs should be more than sufficient so you could start with that, and then reduce it if the game isn't using all of the allocated memory.
 

SuperMR

New Member
Jul 29, 2019
109
0
0
I might add that I've only played with 2GB for a few days and I really don't know if it's stable in the long run. So far it has worked fine. Anyways, 3 gigs should be more than sufficient so you could start with that, and then reduce it if the game isn't using all of the allocated memory.
where do i put the argument
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
2 GB should indeed be more then enough. I run a pack that is probably bigger then infinity and I don't get above 50% usage
 

Xygen8

New Member
Jul 29, 2019
16
0
0
Infinity has 112 mods. My game runs at around 60-70% RAM usage with 2GB allocated.

Edit: SuperMR, I can't think of anything that might be causing it. You could try updating Java. Run virus and spyware scans on your computer, defrag the disk the game is running on and if that doesn't work, run diagnostics (Memtest86) on your RAM stick(s) to see if there's anything wrong with it/them. If you still get those terrible lag spikes, reinstall your OS.

Just out of curiosity, what are your PC specs?
 
Last edited:

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
I am using multimc and these are my arguments note I am using java 7
Code:
-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
 
M

MIC6890

Guest
when i start the game its allright, the RAM goes up to about 50% and then dump the garbage (i guess) and reset to 20% but after a couple of minutes it goes all the way to 100% and then the lag spikes come.. (i'v dedicated 4 gigs i think its ok) any way to deal with it? because it makes the pack unplayable
2 GB should indeed be more then enough. I run a pack that is probably bigger then infinity and I don't get above 50% usage

Which pack is it? And are u using these JVM arguments?
 
M

MIC6890

Guest
I had this exact same problem on Infinity and added these arguments to the launcher's advanced options (thanks to user BlooBeuts on the FTB reddit):

-XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC

I also unticked the thing that makes the console stay open when the game is running. I still get the memory leak sometimes but it seems to work a lot better with these two tweaks. Also, 4 gigs of RAM for the game sounds a bit overkill, I've heard it can actually run worse if you allocate too much RAM. I'm using 2GB with no problems at all, and I've installed extra mods such as Rotarycraft, Reactorcraft and Electricraft.

I'll probably try to move the pack over to MultiMC and see if I can eliminate the memory leak completely. Apparently the FTB launcher is poorly optimized and can cause all sorts of problems.

What exactly do these JVM rguments do?
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
Which pack is it? And are u using these JVM arguments?
It was a custom pack, and I am not using these arguments anymore as I am not using the same java and not even the same OS as back then.
 

GreenZombie

New Member
Jul 29, 2019
2,402
-1
0
What exactly do these JVM rguments do?

Java maintains objects in two heaps. An young generation heap, and objects that survive in that get moved to an old generation heap. As Java is a garbage collected language, a garbage collector is responsible for clearing unused objects out of these heaps (and for moving objects that are surviving for a long time from the new, to the old generation heap).

Because garbage collection (GC) is an inferior technology (not actually, but I have used enough c++ to develop an unhealthy sense of superiority :p) there is not clear "best" garbage collection algorithm - so Java has several different GC implementations available. The default GC that Java uses for the old generation heap offers the best "overall" performance, but runs on a single thread, so locks that one thread for longer periods. "+UseConcMarkSweepGC" implies another flag "+UseParNewGC" - with together for the old and new generation heaps - enable concurrent (multi threaded) garbage collectors that uses more cpu cores (threads) to finish its work faster. With sufficient cores this algorithm - with minecrafts memory load - can complete its work in less than 50ms, and so garbage collection does not impact the servers tps. Without it, each time the server garbage collects you will get a warning message "Server took xxxms, skipping yy ticks" with accompanying block lag.

I'm not sure what DisableExplicitGC does, other than disabling any explicit attempts by the minecraft code to force a garbage collection cycle - which seems a bad idea actually as Mojang would only have done that to improve performance.
 
M

MIC6890

Guest
I am using multimc and these are my arguments note I am using java 7
Code:
-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
so these dont work in java 8?
 
M

MIC6890

Guest
Java maintains objects in two heaps. An young generation heap, and objects that survive in that get moved to an old generation heap. As Java is a garbage collected language, a garbage collector is responsible for clearing unused objects out of these heaps (and for moving objects that are surviving for a long time from the new, to the old generation heap).

Because garbage collection (GC) is an inferior technology (not actually, but I have used enough c++ to develop an unhealthy sense of superiority :p) there is not clear "best" garbage collection algorithm - so Java has several different GC implementations available. The default GC that Java uses for the old generation heap offers the best "overall" performance, but runs on a single thread, so locks that one thread for longer periods. "+UseConcMarkSweepGC" implies another flag "+UseParNewGC" - with together for the old and new generation heaps - enable concurrent (multi threaded) garbage collectors that uses more cpu cores (threads) to finish its work faster. With sufficient cores this algorithm - with minecrafts memory load - can complete its work in less than 50ms, and so garbage collection does not impact the servers tps. Without it, each time the server garbage collects you will get a warning message "Server took xxxms, skipping yy ticks" with accompanying block lag.

I'm not sure what DisableExplicitGC does, other than disabling any explicit attempts by the minecraft code to force a garbage collection cycle - which seems a bad idea actually as Mojang would only have done that to improve performance.
Are u a coder? This is a bit complicated, but now I know what the JVM arguments are. Thanks!
 
M

MIC6890

Guest
I had this exact same problem on Infinity and added these arguments to the launcher's advanced options (thanks to user BlooBeuts on the FTB reddit):

-XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC

I also unticked the thing that makes the console stay open when the game is running. I still get the memory leak sometimes but it seems to work a lot better with these two tweaks. Also, 4 gigs of RAM for the game sounds a bit overkill, I've heard it can actually run worse if you allocate too much RAM. I'm using 2GB with no problems at all, and I've installed extra mods such as Rotarycraft, Reactorcraft and Electricraft.

I'll probably try to move the pack over to MultiMC and see if I can eliminate the memory leak completely. Apparently the FTB launcher is poorly optimized and can cause all sorts of problems.
Does this work for java 8?
 
M

MIC6890

Guest
I had this exact same problem on Infinity and added these arguments to the launcher's advanced options (thanks to user BlooBeuts on the FTB reddit):

-XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC

I also unticked the thing that makes the console stay open when the game is running. I still get the memory leak sometimes but it seems to work a lot better with these two tweaks. Also, 4 gigs of RAM for the game sounds a bit overkill, I've heard it can actually run worse if you allocate too much RAM. I'm using 2GB with no problems at all, and I've installed extra mods such as Rotarycraft, Reactorcraft and Electricraft.

I'll probably try to move the pack over to MultiMC and see if I can eliminate the memory leak completely. Apparently the FTB launcher is poorly optimized and can cause all sorts of problems.
I made my own modpack with about 200 mods. I had a bit of ram problems too, so I added these JVM arguments. Sorry but afterwards it used even more ram :/