Minecraft starts lagging after a while

I have a decent PC, with an intel i3 CPU, 3 GBs of RAM and a 1 GB GDDR3 128-bits graphics card.

I can run MC just fine, getting over 60 fps most of the time. I noticed that when the memory usage of MC gets close to 1 GB, it started to freeze for 2 seconds then coming back and repeating the cycle. Only solution I seemed to find was restarting the game itself.

My guess is that after going through all those landscape elements, the used memory starts to build up and the game chokes (does that make any sense?).


Solution 1:

Reduces the render distance by one. (ie go from Far to Normal).

I've had a similar problem before, and that helped.

If you are willing to spend a bit more time, you can launch from command line to give it more memory, however that will only increase the length of the cycle.

Solution 2:

Because of the way Minecraft was developed (as a "fun" project of notch which was later transformed into a serious indie game) the code isn't exaclty clean, still I guess (or hope) that there are only minor memory leaks which just add up over time and fill your ram with garbage.

If this is true the only way to really fix that would be Mojang fixing the code...

The only thing you can do is just to restart the game, which shouldn't cause you too much trouble.

You could try to do the thing that is described here it won't fix the problem, but it will delay it a bit.

Solution 3:

Suggestions:

  1. Update Java. It really does make a difference, speeds up your game a lot. If you have a 64-bit computer, make sure you are using the 64 bit version.

  2. Update your graphics cards drivers.

  3. Consider the Optifine mod. The light one adds a lot of FPS to the game (warning, not compatible with Modloader or Forge), but since you have a more powerful processor, you probably want a better version. Set it so that it loads less chunks as you are moving.