Lags/stuttering. Maybe java?

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

MiK3gamer

New Member
Jul 29, 2019
98
0
0
Hi.
Before reinstalling Windows, minecraftMwas runnjngjust fine. Mit now after I reinstalled windows, iIam running into some lag Problems.
It has bothingto do with the performance, even though my PC isbtthe newest.

When i lower the screen resolutionRi get up to 300 FPS while playing.
But ...
Every few seconds the game has a small lag (like the acreenfreezes for the blink of an eye).

Since this only happence after I reinstalled windows ... Is it possible that a different java version might help?
I currently have Java 8 Update 161 installed.

My PC is an AMD phenom 2 x4 965 with 3.4 GHZ
8GB Ram
Geforce GTX 550 TI
And windows 7 installed.

I honnestly don't know which java version was installed before I reinstalled Windows. But it was most likely an older version.
Any suggestions?
 

SevenMass

Well-Known Member
Jan 2, 2013
283
137
69
The Netherlands
Use the latest java version. (but do use java 8, not 9) As of the date of this post, your java version is O.K.

The issue you describe can probably be solved using the right java arguments.

I've found the advice in this post on reddit to be most useful.

in short:
Code:
-XX:+UseG1GC -Xmx4G -Xms4G -Dsun.rmi.dgc.server.gcInterval=2147483646 -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

Note that, in addition to the above, most modpacks in MC v1.12 need 6GB of ram allocated. And besides that, the java engine itself needs ram, the OS needs ram, and any other apps you have open (example: browser). So that 8 GB of installed ram is going to be tight. (though it should still be doable)
 

MiK3gamer

New Member
Jul 29, 2019
98
0
0
Since i specified the Ram for Minecraft in the launcher settings, am I supposed to remove the xmx and xms?

I'm gonna try it out when I'm home from work. In like 7-8 hours.

Also another thing ... Before reinstalling Windows, i used the legacy FTB launcher. now I am using the Twitch launcher. Can that possibly make a difference?
 

MiK3gamer

New Member
Jul 29, 2019
98
0
0
oh my gosh.
i know a solution. but not a reason.

as i said, i had no lags before installing windows. and now i have them.
and i also mentioned, that i was using the legacy launcher before, and i am using the twitch launcher now.
and ...
as random and weird as it sounds, THIS IS IT!
i just tried using the legacy launcher instead of twitch.
with the same options.

and i had no lags, no major frame drops, no stuttering, nothing.
i don't know why.
i don't know what the launcher is doing to the game.
but what i know is: using the legacy launcher solves my problem. it sounds weird to me. i dont knwo why this works.

@SevenMass
i did try those arguments in the twitch launcher, and it changed nothing. i didn't even find the slightest difference. i dont know what those arguments should do, but they didn't solve my problem


*edit*
someone just suggested a java version problem since the game started from the twitch launcher is building an outdated built in java version, instead of the one have installed.
so i'll check that out tomorow and post my results right here
 
Last edited:

Hambeau

Over-Achiever
Jul 24, 2013
2,598
1,531
213
oh my gosh.
i know a solution. but not a reason.

as i said, i had no lags before installing windows. and now i have them.
and i also mentioned, that i was using the legacy launcher before, and i am using the twitch launcher now.
and ...
as random and weird as it sounds, THIS IS IT!
i just tried using the legacy launcher instead of twitch.
with the same options.

and i had no lags, no major frame drops, no stuttering, nothing.
i don't know why.
i don't know what the launcher is doing to the game.
but what i know is: using the legacy launcher solves my problem. it sounds weird to me. i dont knwo why this works.

@SevenMass
i did try those arguments in the twitch launcher, and it changed nothing. i didn't even find the slightest difference. i dont know what those arguments should do, but they didn't solve my problem


*edit*
someone just suggested a java version problem since the game started from the twitch launcher is building an outdated built in java version, instead of the one have installed.
so i'll check that out tomorow and post my results right here

Java 1.8.0_25 is the version that Mojang officially supports and in fact uses to build all of the current versions of Minecraft.

I personally won't use anything newer until either Mojang starts using a newer version to build Minecraft, in which case they'll update the version they run when you start MC (unless it finds something else installed locally) -or- I actually find a reason to install my own copy of Java, which is extremely unlikely.
 

MiK3gamer

New Member
Jul 29, 2019
98
0
0
The built in version is meant to be okay for Vanilla Minecraft. But maybe itsibit for FTB modpacks

Also: one of the Mods in the direwolf Pack gives a warning that the java versuoni am using (obviously the built in One) causes sone specific crashes and they highly recommend using something different.

Sorry, I am not home right now so I can't quite the exact message. I just didn't know how to solve it. Now I do.
 

SevenMass

Well-Known Member
Jan 2, 2013
283
137
69
The Netherlands
@SevenMass
i did try those arguments in the twitch launcher, and it changed nothing. i didn't even find the slightest difference. i dont know what those arguments should do, but they didn't solve my problem

Those arguments should remove/reduce stuttering that is caused by the "garbage collection," which is a memory management system used by java. The arguments fine tune the garbage collection to work optimally for minecraft 1.11 and higher.

It is entirely possible that your problems where caused purely by a lack of memory; I've been told the curse/twitch launcher is pretty bloated, so.. No amount of fine tuning of the memory management is going to solve a plain lack of memory.

Personally I use the MultiMC launcher for curse/FTB packs, I don't know if it is more memory efficient than the legacy launcher but like it better.
 

MiK3gamer

New Member
Jul 29, 2019
98
0
0
hey, sorry it took so long for me to respond and report the results.

a few days ago i finally tested the thing with giving the vanilla launcher the manually installed latest java version.
and from what i can tell, it did fix the lag problems.
so i guess i should consider makeing a tutorial on youtube for my subscribers about that.