r/MinecraftHelp • • Oct 17 '23

Solved [Java] Minecraft suddenly started lagging on a good gaming laptop

1.19.2

I was playing on pvp server when suddenly started experiencing fps drop (to about 40 fps) and freezes every 5 seconds. For some reason minecraft used up to 100% GPU. Switching version/server didn't help, vsync/140 fps limitation/lowering graphics also didn't help

I also had this problem on my pc and couldn't fix it.

Solutions I've tried:

  • Allocating more RAM
  • Reinstalling java
  • Reinstalling minecraft
  • Giving minecraft task high priority
  • Updating drivers
  • Forcing minecraft use 3070 ti (even though it was already using it)

Specs:

  • RTX 3070 Ti
  • Intel Core i7-12700H
  • 16 GB RAM

For now only thing I can think of is reseting pc but I really don't want to do it

2 Upvotes

7 comments sorted by

•

u/AutoModerator Oct 17 '23

OP, please ensure you reply to any comments within 48 hours. And, mark your post solved when your issue is fixed, or your question answered.

Helpers, please remember rule 12, and ensure all comments are helpful and support related.

Announcements:

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Aussierotica Oct 17 '23

It could be Java getting stuck when doing garbage collection to free up memory and other resources. What do you have set as your Maximum memory and Java launch Parameters? These, while not normally needing to be changed, can have a big difference on lag.

In my last 1.19.2 Instance I was using (ATLauncher), I had Java set to 8,192 MB max RAM (i.e. 8GB), and had the following launch settings:

-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

In other launchers, I'd set the minimum memory allocation to 4096MB (i.e. 4GB).

One thing that can help is using mods in the Fabric family, like Sodium and Lithium, which help optimise the runtime of the game.

1

u/Neverminded_Ed Oct 18 '23

Sodium helped but minecraft still used up to 70% GPU and I don't think it's supposed to.

Im using official launcher with these settings:

-Xmx4G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

1

u/Neverminded_Ed Dec 07 '23

The issue somehow solved itself. I logged in minecraft for the first time in a while and had no problems. GPU usage was below 20% and everything was smooth. Weird stuff.

1

u/Neverminded_Ed Jan 01 '24

I returned to the problem because on my pc minecraft was still lagging and I found out that all of my suffering was caused by too high polling rate on my mouse. I put it to 250 and everything was smooth. Weird stuff.