Fix your Minecraft lag guide

Disastrous

Staff member
Network Owner
Administrator
Jan 20, 2018
79
12
8
#1
Hey, I am writing a quick guide here to help you fix your lag with Minecraft. This guide is written for our server but can be applied on a lot of Minecraft servers.

FPS Lag:
FPS lag is mainly from your CPU/GPU on Minecraft. Now Mojang's approach to optimizing player's performance is for players to get better hardware; most players can't really afford this. However, there are some community made mods and optimizations meant to help you fix your FPS which I will write about below.

Everyone's favourite: Optifine
Optifine is a community made optimization mod to help with FPS related lag.

Link: https://optifine.net/downloads

My recommended video settings with Optifine (Hit 'ESC' on your keyboard -> go to options -> video settings):
  • Graphics: Fast
  • Smooth Lighting: Off or Minimum
  • Dynamic Lights: Off or Fast
  • Shaders: None
  • Use VBOs: On
Details(click on Details in video settings):
  • Clouds: Off
  • Trees: Fast
  • Fog: Off
  • Vignette: Fast
  • Swamp Colors: Fast
  • Rain and Snow: Off
  • Biome Blend: Off
Animations(click on Animations in video settings):
  • All off
Quality(click on Quality in video settings):
  • Better grass: Off
  • Custom fonts: Off
  • Connected Textures: Fast
  • Custom sky: Off
  • Better snow: Off

Performance(click on Performance in video settings):
  • Smooth FPS: On
  • Fast render: On
  • Chunk Updates: 1
  • Render regions: on (Only turn on if you have a dedicated GPU, if you don't know, don't use it)
  • Smart animations: On
  • Fast Math: On

#2 Badlion Client
Badlion client is a Minecraft client with a built-in AntiCheat system that also comes packed with Optifine and something they refer to as "BetterFrames".

Link: https://client.badlion.net/optifine-and-betterframes-boost-your-minecraft-fps

Recommend settings:
  • Same as above
#3 Texture Packs
You can use a less intensive texture than the Minecraft default or any other texture pack you're currently using. You can google FPS increasing texture packs but I will link some below.

Texture Pack 1: MaxFPS
Link: ᐅ MaxFPS (FPS Boost) Texture Pack für Minecraft 1.14/1.13/1.12/1.11

Texture Pack 2: 44Craft
Link: 44Craft - 4*4 PACK [Increase FPS] Minecraft Texture Pack

Ping lag
There is not much you can do about Ping lag but there are some minor things you might be able to optimize on your computer to improve your Ping. However, if you're running Windows I've written down some steps below to help you out.

1. Go to task manager.
2. Click "expand view"
3. Right click on "Java (TM) Platform SE Binary" and click "Go to details"
4. This should take you to another page and it will highlight something. Right click on the highlighted something.
5. Set priority to HIGH. DO NOT, and I mean it, DO NOT set it to Realtime because Realtime may break your computer in someway.
What do those steps do? It essentially tells Windows that Minecraft is the priority for your computer's resources. Your CPU/GPU/Internet will do what Minecraft wants it to do first, and then work on other programs running. It may not be effective, but a few users have reported a ping decrease of about 10-50ms so it should help; it may also help with FPS.

You will have to repeat those 5 steps every time you play Minecraft.

Beyond that, there isn't much you can do for Ping lag.

Java Garbage Collector
Now, you may not know what this is so I'll explain it. The way Java works is it stores objects in RAM and then runs a garbage collection to remove the objects it's no longer using. There are multiple different garbage collectors available in Java but the one I've found most effective is G1GC. I've spent a couple of days working towards optimizing flags for G1GC on the Minecraft client.

Optimizations I've made:
1. Minecraft uses A LOT of "newgen" memory, so I increased G1GC's maximum newgen size.
2. I attempted to lower the maximum amount of time G1GC is allowed to take for garbage collection to around 25ms.
3. Enabled multithreaded G1GC.
4. Modified the TargetSurvivorRatio which makes it so Java doesn't try and put everything from "newgen" into "oldgen". (oldgen can take longer to do a garbage collection for)

Amount of RAM to use?
Mojang recommends having a minimum of 4GB of RAM on your PC... Go to your task manager and find out how much you have available. If you have 1 GB available, try using all of 1 GB of it. However, do not allocate RAM you may need for other things like Browser, Discord, etc. If you have 8GB, try 2GB. If you have 16GB, try 8GB. I wouldn't recommend going past 8GBs because you won't need notice a performance boost really.

G1HeapRegionSize?
  • 4GB or less: 1M
  • 8GB or less: 2M
  • 16GB or less: 4M (side note: this much RAM is probably pointless.

RAM Reference: 1 GB = 1024 Megabytes
Make sure Xms and Xmx have the exact same value.

Flags to use:
-Xms<AmountOfRamInMegaBytes>M -Xmx<AmountOfRamInMegaBytes>M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:MaxGCPauseMillis=25 -XX:G1HeapRegionSize=<RegionHeapSize>M -server -XX:+ParallelRefProcEnabled -XX:TargetSurvivorRatio=90

Where do I put the flags?
  1. Open your launcher
  2. Click "Installations"
  3. Hover over what installation you're currently using (if using optifine go to the optifine one)
  4. Three little dots should appear, click those
  5. Click edit
  6. Click more options
  7. Edit the Flags from above to your specifications
  8. And then paste those flags into "JVM Arguments"
  9. Click save
  10. Click play
  11. And then launch Minecraft
 
Last edited: