1

How do I allocate more RAM to my Minecraft?

Frankelz 8/12/14 11:00 am
5.4k
8/13/2014 8:16 am
I know that in theory with the new MC launcher you should be able to allocate more RAM to minecraft through the "JVM Arguments" section of edit your profile.
But my JVM Arguments look different from most peoples. Here is what mine looks like:
http://i.imgur.com/NngVVUz.png
When I change the allocated Ram from 1G to 2G, like this: http://i.imgur.com/p1r786f
I get this error message when I hit play: http://i.imgur.com/lkQadDI

Hopefully someone can help!
Posted by
Frankelz
Level 5 : Apprentice Hunter
6

  Have something to say?

JoinSign in

24

Aequotis
08/13/2014 8:16 am
Level 74 : Legendary Pig
Wow, this has been very useful for myself, as I have been having the same problems:

I had 4GB allocated, yet I was getting an average of 10fps.

I do have mods installed, so I'm guessing that doesn't help.

(I found clearing my cache, player data and screenshots helped too)

Thankfully some nice guys from the PMC underground chat helped me out, as when I tried changing the allocated ram, I'd get error messages and be returned to the launcher.
1
Casval
08/12/2014 3:00 pm
Level 25 : Expert Lumberjack
Im surprised no one said anything about detonated wham
1
Killertoad
08/12/2014 3:19 pm
Level 22 : Expert Crafter
hahahaha, I wonder how many people have even seen that...
1
Karrfis
08/12/2014 3:22 pm
They/Them • Level 35 : Artisan uwu uwu
1
Casval
08/13/2014 1:40 am
Level 25 : Expert Lumberjack
did i just derail a thread again
1
Karrfis
08/13/2014 6:52 am
They/Them • Level 35 : Artisan uwu uwu
yis
1
TheUltimateArchitect
08/12/2014 11:28 am
Level 37 : Artisan Blacksmith
So I have done this before, and it DID make it run faster. Not necessarily FPS wise, but I got much fewer lag spikes, and I was able to run higher settings. I am running 64-bit Java and Windows, and I was able to allocate 3 GB of ram. What I did was I made a text document with this:
Click to reveal
java -Xmx3072M -Xms2048M -jar "C:/Users/Matt/Desktop/Minecraft.exe
in it, you would have to edit the file position. I then saved it in notepad, and renamed it "FasterMC.bat". You then run it, and load the profile you want to play! Hope this helps!
1
Karrfis
08/12/2014 11:20 am
They/Them • Level 35 : Artisan uwu uwu
if you are playing on a 32x OS you can only allocate 1gb ram
if you are playing on a 64x os make sure your java is 64x also
1
DarkFadeLink
08/12/2014 11:18 am
Level 19 : Journeyman Nerd
I have had this problem before. The way I fixed it was by downloading the newest Java version If your computer is 64 bit, I recommend you download this. Make sure it is the 64 bit offline version: http://www.java.com/en/download/manual.jsp

If you have Installed java before, Uninstall it and then install the newer 64 bit version.

Good luck!
1
Frankelz
08/12/2014 11:20 am
Level 5 : Apprentice Hunter
Thanks, I'll try it right after I try to change the minimum ram
1
DarkFadeLink
08/12/2014 2:29 pm
Level 19 : Journeyman Nerd
Did my method work for you?
1
Killertoad
08/12/2014 11:14 am
Level 22 : Expert Crafter
Why do you want to allocate more ram? It's not gonna make it run any faster.
1
Afootpluto
08/12/2014 11:31 am
Level 16 : Journeyman Ninja
This. If you allocate too much RAM you will have a decrease in performance.
1
Frankelz
08/12/2014 11:15 am
Level 5 : Apprentice Hunter
It has in the past for me
1
Killertoad
08/12/2014 12:28 pm
Level 22 : Expert Crafter
Minecraft will only use up to 512mb's of ram. Normally it stays around 200mb's. If you allocate more, it's still only gonna use, 200mb's.

You think it makes it faster, but it really doesn't.
1
Paril
08/13/2014 8:03 am
He/Him • Level 89 : Elite Scapegoat Programmer
Firstly, Xmn isn't "minimum" usage - it's the heap used for smaller objects. Increasing it will allow smaller objects to be allocated without needing to deallocate others in the pool/cause a full generation of that pool. This could be a reason why he was having issues; if his young generation pool was filled (why it was set to 128 MB I have no idea) and it tried to allocate a new object (and like 90% of the objects you allocate are fairly small), it wouldn't have found room for it.

Secondly, yes, increasing RAM does actually change the way JVM handles things. A good way of understanding how this works is by watching memory usage when you are standing still. The current usage will go up continuously until it hits a certain point, then a collection is performed which wipes out any unreachable objects (JS and .NET use a similar system). Anyways, now, increase -Xmx and -Xms (and possibly -Xmn, although Xmn can stay small) - it will do the same thing, however it will wait longer before doing a full sweep, as it knows it has more RAM to spare. It's also worth noting that the allocated size will increase on every generation (which is JVM's way of saying "I may need more memory for future operations" since the memory usage is continuously going up and needing to do a full sweep, which is almost like a last resort operation) up until it reaches -Xmx.

The game does use a lot more than 512 MB if you specify that the JVM should reserve more than that. It probably won't matter too much since generations happen pretty often in high performance operations with Java, which is one of the reasons why it tends to be a slower language than something like C/C++ where memory management is easily optimized since it is handled by the programmer.

EDIT: it seems that the point where it auto-generates is time-dependent or something. I went and set fire to a crapload of trees and eventually it got to a point where used memory was reaching 2 GB really quickly ( http://i.imgur.com/hKPH6aF.png ); it hits about 2000 MB before doing a full sweep. I'm guessing it's both time and usage-based for when it decides to do it.
1
Aspiria
08/12/2014 12:48 pm
Level 41 : Master Enderdragon
Unless you're loading large areas of chunks. (Around 25+ view distance, then you want atleast 2GB of ram, and it does create a vast improvement, but mainly cause the 512mb's doesn't function with such view distances xD.
If you have a bunch of mods, you might want to allocate a bit more if you notice to much is being used, but overall 512mb should be enough for all your modification usage, and allocating more ram, will not improve any fps, nor make it run faster. Now, I would suggest you get MagicLauncher, and allocate more RAM in it, or use the default MC launcher to set the amount of ram you want to allocate in the JVM Arguments.
1
Killertoad
08/12/2014 12:55 pm
Level 22 : Expert Crafter
But you can't get 25+ view distance on an unmodified minecraft.

Anyways, it doesn't use much more ram. Instead of 200, it may use 300.

Source: Using a computer I just built, a 4440/270x/8gb's of ram, can run minecraft maxed out, with optifines 32 render distance, at 200 fps. It didn't use much more ram.
1
Ivain
08/13/2014 7:07 am
Level 63 : High Grandmaster Terraformer
I think this might not be fully accurate. on vanilla minecraft lowest settings with optifine, I use about 95% of 512 megabyte at all times. since I upped my RAM use to 2 GB, I dont have lag at all anymore, except the rare server lag. now setting it higher than this probably won't do much, as my graphics card is an important variable as well as my CPU. but it really does work.

BTW, to the person who started this thread, I use the Magiclauncher, which allows easy changing of things like RAM usage in the Setup>advanced tab
1
UtimX
08/12/2014 11:06 am
Level 7 : Apprentice Ranger
Change your Minimum Ram use instead, It may help.
1
Frankelz
08/12/2014 11:07 am
Level 5 : Apprentice Hunter
How do you do that?
1
UtimX
08/12/2014 11:12 am
Level 7 : Apprentice Ranger
Look at the very end of the arguments list. It will have something similar to the max ram thing you tried to change, but will say Xmn instead of Xmx.
1
Frankelz
08/12/2014 11:25 am
Level 5 : Apprentice Hunter
Thanks so much dude! It worked, I now get steady 30 fps .
<3
1
UtimX
08/12/2014 11:05 am
Level 7 : Apprentice Ranger
You can't add that much RAM unfortunately. My MineCraft does the same thing. Maybe that is the max that minecraft can possibly use for your computer,

My arguments look exactly the same, so don't worry.
1

Welcome