You can control the amount of memory used by Java for the Minecraft sandbox video game by setting parameters in the server_start.bat file located in the directory where the Minecraft software was installed. To reduce the contention of the Minecraft server with other software running on the system for the system's memory, you can specify the maximum memory it will consume with a
Xmx
parameter.
E.g., the following example uses a server_start.bat
file where the maximum of memory that Java will use for running the
game software is 1 gigabyte (GB)
java -Xmx1G -Xms1G -jar forgeserver.jar nogui
PAUSE
[ More Info ]