234 Replies
Hey
So
I’ve had this problem
Since 2022 January
And I’ve decided not to say nothing and just play the game
But the thing is
I do minecraft pvp
So my game stutters a lot
I’ve tried optifine
I’ve tried sodium
+ all the complements
So
I’ve also looked and someone told me id could be the garbage collector
I’ve also tried so fix that with a mod called forgetmechunk
And it’s always the same
The Diamond Knee Plate
YouTube
Fix minecraft garbage collection lag spikes 2022 easy tutorial JVM ...
Big thanks to the iris project discord server for helping me
Also Big thanks to the java documentation https://docs.oracle.com/en/java/
anyway I know what you are here for so here is the code https://pastebin.com/q8qQUdhr
For example
In this video
Do you think it’ll help me
Pls Ive been in more than 10 discord asking
And everyone tells me the same
But no one gives me a fix or answer
I have a gtx 1060 16gb ram ryzen 3 2300x
Even with my intel hd graphics laptop the stutters wasn’t there
hey @PhantomGaming27249 I think this is literally just your JVM args lmao
Anyway
Yeah I saw them in a YouTube video
Game stuttering can be caused by a lot of things, have you tried running something like spark
Yes
And what’s the output?
Also, what Minecraft version are you on?
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
This is an old log
From like 2 weeks ago
I can make a new one if you want
I’ve tried updating my mods
It all started
In 1.17.1
And I use a lot of pvp mods
And I have to update them 1 by 1
Then I updated to 1.19
All of the mods AGAIN
Have you tried without all of them?
And now I’m on 1.20.1
Yes
Still the same
I’ve tried a lot bro
I see
the spark log indicates an unusual amount of time spent on the player
but I assume that’s just being in a PVP server with a million plauers
Yeah
I recorded that log in a pvp server
And just to confirm, does this same issue happen in single player?
I think so
I don’t play singleplayer
Singoleyer*
how do you play pvp then :agony:
oh
Yeah
I can check if you want
sadly, this sounds like your PC just can't catch up overall
Ryzen 3 isn't particularly fast
Then why does my intel hd graphics pc
Don’t happen that
I’ve been through 3 pcs
the GPU isn't everything, despite what everyone says
I’ve been through 3 pcs
Even one that has a better cpu
Than this one
I5 11th gen
and they all have the problem, or only yours?
All of them
hm
Even my friends have them
then this sadly just sounds like unavoidable spikes
But I get more stutters
everyone gets them generally, it's pretty random how bad they are
Bro its so annoying
I can send you some JVM args that might help
first, you'll need to upgrade your game to run on Java 21
I don’t think so cause they don’t get a ton
Like I do
you can get java 21 at https://adoptium.net
Home | Adoptium
Eclipse Adoptium provides prebuilt OpenJDK binaries ...
Hmmm ok
Wait
Can you
Be in. Call
sadly, no
So I can share screen
Oh ok
it's pretty simple, though I do recommend changing launchers
to make it easier
What do you mean?
I use the premium launcher
Prism Launcher - Home
An Open Source Minecraft launcher with the ability to manage multiple instances, accounts and mods. Focused on user freedom and free redistributability.
Oh
it's a premium launcher, but designed for modding and stuff
Isn’t that a cracked launcher
nope
need to log in
Also, I’ve been through tlauncher and a lot of launchers ( I have a premium account)
I wanted to check if the launcher was the problem
you don't need this, it'll just make the steps i'm giving much easier
because it has mod installers for you and such
you don't need to manually get every mod
it can also update mods for you
Oh
Ok
I’m installing the new Java now
👍
if you get prism, it'll guide you through setting it up
it's pretty simple
oh wait
i already now that website
i tried that website already
nice
like i said, it won't help with the stutters on it's own
it did not work
oh
it just makes it easier to find all the options
to possibly fix them
hmmm
i dont know if i should install prism
it's up to you, really
i can help you either way
just click next
do i need to check this other boxes?
ok
why does it say with hotspot lol
ok i did it
hotspot is the JVM
okay, go to your launcher, and then go to the profile
yeah
similar to where you set all the JVM stuff from that video
yeah
but instead, click on Java installation
now, you need to navigate to C:\Program Files\Adoptium (or eclipse adoptium)
and then there should be one more folder in there
select that as the java install, and save
try opening the game now, if it doesn't open you didn't do it right
in bin?
nope, just click open right there
oh wait
actually, yes
cant
go to bin
and select javaw.exe
do i check this box
uh, what does that say?
skip java runtime check
yes
then save, and see if the game still opens
when i tick it it says it can cause instability
ill open the game now
it let me
cool, open a world or a server, and go to f3
does it show java 21 in the top right?
yeah
i loose a lot of fps tho but yeah
nice
huh?
it should be the same
yeah strange
what gpu do you have?
3060 ti
oh nvm
okay
yeah so what do i do now
so, close the game
go back to that menu
delete the JVM arguments you currently have (or set them back to default)
and try this set
-Xms5G -Xmx5G -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+ZGenerational -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:+PerfDisableSharedMem -XX:-ZUncommit -XX:+ParallelRefProcEnabled
ok
im opening the game now
which ones better
the videos or
this one
i don't know, that's why you're testing it :ioa:
oh ok
it's different for everyone
imn gonna test
still lags
is it worse?
no
better
then that's probably the best you can do for now
hmmm
then do you get lag spkies?
but why doesnt my other pcs
dont happen
and theyre worse
i also get lag spikes
they're different for everyone
yeah but i have a i5 11th gen pc
and still lags
cant it be the garbage collector?
it could be, or it could be something entirely different
i'm not too experienced in that
oh
should i try the videos arguments
sure
ive had 2 years since this problem started
it doesn't hurt to experiment
lol
the video allocates
8g
should i allocate 8g too?
ehhh, you can try
the more ram, the more memory it has
but also the longer a GC cycle will take
so is it better the longet it takes?
no, shorter
each GC cycle is what you see as a lag spike
oh
look
everytime this
mem thing
goes to like 90%
it stutters
then it resets
yep, that's GC
so
since when
was this implemented?
i dont hink cpu is the problem
doesnt even go above 50%
GC has always been in the game
then why did it start for me in 2022
no clue
in 2021 i used to play in a i5 5th gen pc with integrated graphics
and no stutters
in like 2 hours of playing
and thats why quit minecraft
cause of
stutters
and 2 weeks ago
i came back
it doesnt always stutter
sometimes it stutters at 60%
@IMS
This also
Used to happen
In 1.19
For example in lunar client it doesn’t lag
In this video
You can see
That even my friends game lags
He has 16gb ran
I5 12th gen and rtx 3060
people still using that stuff from way long time ago
i should probably write some updated ones
and wait no these aren't mine they are shenandoah
I tweaked the akair flags a while ago
Can you help me?
The lags every like 1 minute
Are unsoportable
Can you provide me some info, what jdk are you using and what CPU do you have?
Also how much memory are you allocating
Gtx 1060
Ryzen 3 2300x
This one
8gb
@PhantomGaming27249
Are you allocating 8gb or have 8gb?
Allocating
I have 16gb
Ok
I am using some specials jvm arguments
What java version are you using
I just sent it
This one
Adoptium java 21
Ok try generational zgc
What
Different gc than Shenandoah
What the hell are you talking about
On mobile rn but can send some alternative args in a bit
I already am using some special arguments
I saw in a YouTube video
That are supposed to help
Ok
Those aren't great and a bit dated
Ok then
When you can send them
Pls
2 years
With this problem
The stutter might also be lighting if so try starlight or phosphor
Already have those
I’ve tried everything
The args i gave them are GZGC
they have string dedup on?
a
I would add -XX+UseStringDeduplication
could try disabling -XX:+PerfDisableSharedMem / dropping that flag
I have had some issues with that on windows
also get rid -XX:-ZUncommit
@Juan fernaflo
try these
the solution I have found that works for my system was c2me (optimized disk io settings) + a really fast ssd + a custom modified version of graalvm ee
I replaced the memory allocator with mimalloc and that helped a decent bit
they are still there but they are sub 33ms
I don't think its usually gc anymore and mostly disk writes and lighting which is very much cpu dependent
gc spikes make it worse though cause they can overlap on autosave and lighting which tend to allocate a lot of memory
@Juan fernaflo if you don't have it grab modern fix and ferrite core they help with allocation rate a lot
Should I use these?
I already have those
give them a try to see if its a bit smoother
I have 56 mods
And like 50 of them are
Optimization mods
Rest are dependencies
And like 4 are pvp mods
try the above args
Toro health, apple skin, durability viewer
Ok I’ll try
the ones I posted they might help
Yeah I’ll try tomorrow
I’m not home
ah ok
@IMS did you see graal is getting generational zgc?
epic
end game jvm coming
doesnt let me
launch
whats the error you get
see
what does the launcher/log say
i just sent you a photo
thats not the log
thats the popup error
the log is the part were you see all the text
this is latest.log
@PhantomGaming27249
reading it
ok usually java error go to the log in the launcher
what does it say in there not the log file
what do you mean
how do i see that
which launcher do you use?
premium
premium?
yes
the normal one
oh you mean the vanilla launcher?
yes
there should be a console output option in the launcher
there is not
this??
yeah
ok
help
try these instead
I believe there a was a typo
ok
it launched
but just let me see
if theres still stuttering
sometimes it takes a moment to warmup
i can share screen
can you join a vc
?
so you can see
can't rn
wha ttype of stutters
oh
just see
dont talk
I gotta run soon so lets be quick
yeah
still stutters
f3+2
to bring of the lag graph
i have 56
mods of optimization
what
dont work
when your in game
do f3+2
send a screenshot with that active
i am
not in the menu
are you on a a laptop
no
bro
it just crashed my game
opening f3+2
yes
try disabling better chunk loading actually
deleting the mod?
just take it out for a time
also how long were you in the game before before you quit sometimes there is a delay/warmup before its smooth
like you need to play for a bit
yeah
like 1 minute
but yeah
it stutters
a lot
i had a intel hnd graphics laptop and it didnt stutter
and i bought this pc to play minecraft
and i cant
when you do f3+2 these graphs should come up
oh wait your on 1.20.1?
do f3+alt
yeah
i am doing it
sorry they changed it from f3+alt in 1.20.3 I believe
doesnt work
oh
?
see anything
f3 + alt?
yes
i think it was the other mod
its not lagging as much
better chunk loading?
yeah that one can cause some isssues in my experience
especially if you have c2me + starlight it throttles chunk and lighting to try and make it smoother but actually causes lag spikes sometimes
yeah
its not lagging
bro i love you
this shit was
so annotying bro
no worries glad I could help
brop
i had
2 years
now I gotta run to go grocery shopping
wirh this probkem
later
yeah
bro thx
i had 3 pcs
with this problem
legit don't worry about it
and 2 years bro
2 YEARS
finally i can pvp with no lag
glad I could help 🙂
hey
one more question
can i share my mods folder
and just like
can you see
what other mods should i
uninstall
delete
i knnow you cant rn but maybe later
here i have 2 optimization mod packs
+ like 5 of my own mods
I can glance at them later I really gotta go now though store closes soon and I am out of food
yeah
its ok
but thanks either way
you helped a lot
😁
@Juan fernaflo there isn't anything I see immediately but I can take a closer look later if you want
Think you should be good
oh ok thx
yeah if you want to
you would help me a lot
you just helped me a lot
you dont know bro
pvping smooth
is so good
and i always died cause of the stuttering
it messend up my aim
i just got a good killstreak
Looking on my phone you have two versions of immediately fast might get rid of one of them
Think your good now
oh ok
thx a lot
really
good night bro
@PhantomGaming27249
hey bro
the lag is still there
:(
and now its like before agani
it was smoth and after some time it started lagging
maybe something is still there
cause the chunk loading is a lil bit low
like if it had lazy chunk loading
idk
maybe it has something to do
Hmm not sure what else to do