Hi! I'm trying to create my first Minecraft server, I have some experience with programming and computers but not in this particular area. I am having what I believe is a problem with my server's RAM use.
I'm using my Windows 10 laptop with 6 GB of RAM installed. According to my computer's Resource Monitor, 41% of my RAM is being used, supposedly leaving the rest to be used by my server. When I launch the server with a maximum RAM allocation of 1 GB, it runs, but if I try to play on the server the GUI quickly tells me that it can't keep up, that the server is probably overloaded. So, I went back into my batch file and set the maximum allocated RAM to 2G. But when I try to run the server with this new amount of RAM, it won't initialize, saying it can't reserve enough space.
I don't understand why this is happening, since I should have at least 3GB of RAM available, right? Anyone run into a similar problem?
What kind of processor do you have? The 'can't keep up' error can frequently be related to a lack of CPU performance. Are you playing and hosting on the same computer? Do you notice any in-game lag, or just the messages in the console?
I had this problem for 2 days and had no idea how to fix it, but now I have a resolution. You need to download the very latest version of Java (x64) on your computer. I thought I had it downloaded, but apparently it wasn't the right one or something. After I downloaded the new version and replaced the old version, I put in the "java -Xmx#G -Xms#G -jar server.jar nogui" in a new batch file within the minecraft server folder, ran it, and it worked like a champ.
Thanks so much everyone, the Java fix worked! According to Oracle's website I did have the latest version installed, but once I manually uninstalled it and put it back again, it worked for some reason.