Following up on the the previous tutorial How to create your Minecraft server , one key function to know about is the amount of RAM allowed to the server. Minecraft is highly dependent on resources especially on RAM. Allocating more is not a very complicated process and the following guide will describe how to do so on Linux-based ones.
The start command has a number of arguments including the one related to RAM allocation:
java -Xmx4096M -Xms4096M -jar minecraft_server.jar nogui
The interesting bit is this:
-Xmx4096M -Xms4096M
Replace the value in megabytes of 4096 on both arguments with the available RAM of your machine. For example, you could replace them with 8192M which means 8 GB of RAM allocated on startup to the Minecraft server.
A full example with 8GB :
java -Xmx8192M -Xms8192M -jar minecraft_server.jar nogui
Enjoy!