1

I have been experiencing a lot of lag when I play with mods even with OptiFine. So, with my 24gb ram laptop which has intel graphics, I tried to increase the default 2gb of allocated ram. But no matter how much more ram I allocate to the game, it won't use more than 2gb of it in-game. I tried to use the optimized settings in the Intel graphics command center as shown below, but it says I have to run the game at least once. I have played the game so many times already!

Before someone says this is a duplicate question, yes I am aware that there is a similar question here: Why isn't Minecraft using the full amount of RAM? However, he uses Nvidia graphics, which is different than the Intel graphics that I have. Thus, any ideas how to force MC to use more ram in-game to decrease lag (or other ways to decrease lag)?

10
  • Excessively increasing RAM in Minecraft is completely counter-productive. Press F3 and watch the 'Mem:" entry in upper right corner. Java normally accumulates 'garbage' objects until it's close to filling up the memory allocated to it, then the process of garbage collection is kicked off and a big portion of the allocated RAM is freed up, usually in an unnoticeably short lag spike. The more RAM is to be freed up, the longer garbage collection takes - the period between garbage collections will be longer but each GC will take a noticeably long time, an actual, perceivable lag spike.
    – SF.
    Jan 15 at 21:12
  • 1
    why would your graphics card effect ram allocation?
    – Topcode
    Jan 15 at 21:46
  • Why would you force something to use more memory?
    – Penguin
    Jan 16 at 4:24
  • @SF. So you are saying allocating more ram is basically useless to decrease lag?
    – Subham
    Jan 16 at 4:30
  • @Subham A bit of extra RAM has a chance of decreasing certain kinds of lag. Plenty of RAM is completely counter-productive, introducing its own lag.
    – SF.
    Jan 16 at 12:25
0

There are other ways to reduce lag. such as turning Vsync off, changing the max framerate, and changing quality levels to fast. that works great, my proof is my lag went from 36 to 291 FPS.

2
  • This forum is a bit different than other, in one way being that you don't leave a signature. I've edited it out, but just a quick note for the future! Also, keep in mind a "max framerate" is what it sounds like. It's a cap. This shouldn't decrease or increase the FPS, it's literally just a cap.
    – Penguin
    Jan 16 at 4:28
  • Did you see significant improvement with modded Minecraft, or just vanilla?
    – Subham
    Jan 16 at 4:31
0

In case of this specific type of lag you've encountered - repeated periodic freezes of order of a second every couple seconds, occurring most frequently after a period of fast travel through the world (as opposed to spending time in one area), increasing the amount of memory allocated to Minecraft helps.

  • Open the launcher
  • pick 'installations' tab (above the pretty picture), you'll be brought to list of installations
  • click the installation you play (not any of the buttons on the right). You'll see a screen of "Edit installation"
  • click "More options" and scroll to the bottom.
  • In the 'Java Arguments' field, and change -Xmx2G to -Xmx6G

Garbage collection should be still reasonably fast, and the hiccups should stop.

1
  • I already wrote in my question that I tried that. I went in increments of 2gb all the way until even 20gb! There was no improvement whatsoever because mc always lags at around 2048 mb then goes back down, indicating it doesn't use that extra allocated space.
    – Subham
    Jan 22 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.