While playing the game will allow a little movement, pause for 1 to 2 seconds then engage once again for around 8 seconds then pause for 1 to 2 seconds, and keeps doing this. When I use the F3 key to look at the data there, the memory in the top right corner keeps rising, once it hits about 75% it seems to reset to around 20%, then starts increasing once again. this corresponds to the pausing in the game. This has happened on other snapshots after 1.20.6 and seems to get fixed then will work for a few days until another snapshot comes into play and will happen again. When I exit the game the launcher will say that my game crashed and give the exit code: -1073740940. I have attached a couple of the screen grabs and the profiling zip.
Related issues
is duplicated by
relates to
Attachments
Comments


This is still happening after the switch to 1.21 on 6/13/2021
We do not have enough information to find the cause of this issue.
Please attach the full launcher log found in [minecraft/launcher_log.txt|https://minecrafthopper.net/help/finding-minecraft-data-folder/]
.
Please record a video of this happening and attach it to this report.
If you are on Windows, you can use Windows
+Alt
+R
to open a built-in app for recording game footage.
If you are on Mac (Mojave or later), you can use Shift
+Command
+5
to open a built-in app for recording your screen.
In case you don't have a program to record videos, we recommend using the free recording software OBS.
In case the resulting video file is too large to be uploaded to the bug tracker directly, please upload it elsewhere (e.g. as unlisted video on YouTube) and link to it here.
This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

https://www.youtube.com/watch?v=RUDkk3DcrGc
I had to upload it to YouTube as it was too large for this area. If it needs to be longer I can recreate it from game opening and go longer.
Thanks @unknown. I can see an error code in your launcher_log.txt file so it may be something community support can help you resolve. Please try contacting them using the discord invite below.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

I have also been experiencicng this since the 1.21 update. I use an Nvidia graphics card, and in my case, my drivers were out of date. Updating those drivers seems to have solved the problem for me. I don't know if the underlying issue is still present, but it at least addresses the symptoms.
EDIT: actually, no, the symptoms are still here. After a bit of playing the game, it started suffering the same lag spikes again.

This does not have anything to do with chunk boarders, I can load into a game and not move from spawn and it still does it, and as the game runs, it gets progressively longer.

I worked with Community Support, I upped my RAM usage to 4GB from 2GM, then uninstalled my display drivers and reinstalled them with the WHQL version. I am still experiencing the problem of the game stuttering. The link to the last YouTube video I uploaded of my gameplay is linked here:
The problem persists after all of these suggested fixes and I hope that there is a fix to this problem by Mojang.

I have found that re-launching the game serves as a temporary fix. The longer I play, the more noticeable the lag spikes will be, but re-launching the game seems to entirely remove the lag spikes (though they will eventually return and grow longer the longer I play).

I've had, for the most part, the same issue (MC-273115), posting part of my comment of that report here as well:
Only thing different is that I don't get the error code as you've described (I get error code 0).
I tested 24w13a with with java 21 instead of 17, and the lag spikes appeared, so it seems to be an issue with the default garbage collector used in java 21 (G1GC). I tried switching to a different garbage collector, and the problem went away. I did load up 1.21 to test this bug again (using default launcher settings), and it seems that it more of fps drop than a 1 sec freeze. However, testing in a default world instead of a superflat world, the problem still persists. When I tried a different garbage collector (ParallelGC) instead of the default G1GC, the problem went away.

I am experiencing this issue in MULTIPLAYER as well.
Windows 11
Ryzen 7 7800X3D
Radeon RX 7800XT Nitro+
Samsung 990 Pro 2TB nVME m.2 SSD
EDIT: I did some further experimentation on this, randomly creating new worlds and exploring them until the stuttering/lag starts to become noticeable.
Though this is not always the case... I've found that at least 3/4's of time when this stuttering/lag starts to occur, there is typically a Trial Chamber in the vicinity somewhere under the surface.
Moving closer towards it, tends to cause the Stuttering/Lag to get worse... but it does not stop when moving further away, it just continues to build up until it just locks up my game.
Second EDIT:
I also do not think my issue, is the same as the one in this Ticket.... none of the screenshots or the video associated with this issue, show what I am experiencing.
I am experiencing 100% GPU usage, with FPS dropping down to 1... then both fluctuating with the GPU usage remining extremely high, with FPS remaining extremely low... until the game just completely locks up.
While regardless of my issue happening or not.... my Memory Use is ALWAYS high between 85% - 95%... even when I'm experiencing smooth game play with 120+ FPS and GPU usage under 30%.

i have the same issue in survival mode, also when going inside blocks in spectator mode, the game turns into a 0.1 fps slideshow immediately, and yes, this happens when there is a trial chamber inside your render distance

@Localcreeper
After you talked about a trial chamber, I went to go look and see, and I do not have a trial chamber under my build. This made me sad cuz I was hoping there was one.

@Kensi42
Use chunkbase.com to find the nearest Trial Chamber to your build... click on the Apps menu and select the seed map, then just enter the seed of your map.
Also make sure your map is on v1.21

I created a duplicate of the Instillation and changed the arguments for the GC in the duplicate to test them out.
Here is the link to the youtube video of my game as I was playing.

I updated my Java version to Java 22, and have not been experiencing this issue since.

@Calvin Withun
Where did you get Java 22 from?
Java is only on Java 8!

@unknown, Java 8 is quite old. I'm not sure why Oracle did not update that website with newer Java releases. I would recommend using the Eclipse Temurin OpenJDK.

Is this still an issue with Java 21.0.4?

still in 1.21.1-rc1.

I found a fix to this issue with a small side effect being every 30 minutes you get a 5 second pause. All you have to do is add one of the two JVM Argument lines to your minecraft JVM Arguments and make sure you are on Java 22. How to edit JVM Arguments on minecraft launcher --> (Minecraft launcher > java edition > installations > find the version you want to not lag and click the three dots > edit > more options > find -XX:+UseG1GC in jvm arguments > delete that and everything after it > paste either 1 or 2 > click save)
1. "-XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:+PerfDisableSharedMem -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=20 -XX:SurvivorRatio=32 -XX:G1MixedGCCountTarget=3 -XX:G1HeapWastePercent=20 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1RSetUpdatingPauseTimePercent=0 -XX:MaxTenuringThreshold=1 -XX:G1SATBBufferEnqueueingThresholdPercent=30 -XX:G1ConcMarkStepDurationMillis=5.0 -XX:G1ConcRSHotCardLimit=16 -XX:G1ConcRefinementServiceIntervalMillis=150 -XX:GCTimeRatio=99"
or
2. "-XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+AlwaysActAsServerClassMachine -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseNUMA -XX:NmethodSweepActivity=1 -XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M -XX:-DontCompileHugeMethods -XX:MaxNodeLimit=240000 -XX:NodeLimitFudgeFactor=8000 -XX:+UseVectorCmov -XX:+PerfDisableSharedMem -XX:+UseFastUnorderedTimeStamps -XX:+UseCriticalJavaThreadPriority -XX:ThreadPriorityPolicy=1 -XX:AllocatePrefetchStyle=3 -XX:+UseG1GC -XX:MaxGCPauseMillis=37 -XX:+PerfDisableSharedMem -XX:G1HeapRegionSize=16M -XX:G1NewSizePercent=23 -XX:G1ReservePercent=20 -XX:SurvivorRatio=32 -XX:G1MixedGCCountTarget=3 -XX:G1HeapWastePercent=20 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1RSetUpdatingPauseTimePercent=0 -XX:MaxTenuringThreshold=1 -XX:G1SATBBufferEnqueueingThresholdPercent=30 -XX:G1ConcMarkStepDurationMillis=5.0 -XX:G1ConcRSHotCardLimit=16 -XX:G1ConcRefinementServiceIntervalMillis=150 -XX:GCTimeRatio=99"
Additional info i thought might be useful. I started experiencing this back in late august after not playing for almost 2 months. I didn't change anything on my pc that would cause this. I also benchmarked other games being but not limited to, GTA5, Cyberpunk 2077, Ready or Not, Contraband Police, Payday 3, Red dead redemption 2 and Satisfactory. This issue did not occur in any of them and the majority of them were 100 fps high to ultra settings. So its very likely this isnt a pc thing and more like a minecraft thing. I tried fixing the issue by playing minecraft with and without mods, using different mod "loaders" (fabric and quilt), updated graphics card drivers, used different launchers (default, multimc, curseforge, lunar, badlion and feather), changed settings in nvidia control panel and lowered and high-ed my allocated ram. None of this worked except for the jvm arguments