Why can't I give minecraft 3GB of RAM?

April 29, 2014 2.7k views
I've set up a droplet with 4GB of ram, but when I try to start a minecraft server with 3GB, it says there's not enough memory. I have no other processes running. Any ideas? Thanks!
7 Answers
java -Xms512M -Xmx3G -jar minecraft_server.jar nogui

This should work...
The -Xms is the initial memory and the Xmx is the maximum memory. the server will allocate the 512 Mb of memory when you start it and then whenever it needs more it will automatically allocate it up to a maximum of 3Gb.
Alright, I'll try that. Do you know why I can't start it with 3GB allocated?
No, I would assume that the server or java doesn't like reserving more than X amount of ram for a process though.
Even with that command... not working :/
It's definitely a 4GB droplet.
What's the output of
free -m
Sorry it took me so long to reply got caught up but are you running 64bit jvm?
and what is the maximum memory it lets you use.

Have another answer? Share your knowledge.