I have about 4GB of available memory and 1GB of free memory. Can I allocate 5GB to my Minecraft server? I am a noob, just got Ubuntu :D
I have no idea what the difference between free and available memory is.
I have about 4GB of available memory and 1GB of free memory. Can I allocate 5GB to my Minecraft server? I am a noob, just got Ubuntu :D
I have no idea what the difference between free and available memory is.
Let's see a typical free output:
total used free shared buff/cache available
Mem: 32806952 7552612 780696 949180 24473644 23843300
Swap: 2097148 36864 2060284
Here available
is free
+ part of buff/cache
, you could not add them together because free will be counted twice.
Also if you allocate all available
memory to your minecraft server, it means your computer will not have any memory left to use disk cache. OS will try to swap something out, and could be incredibly slow.
Follow the 'Available' estimate, or your system will start to swap (and slow down). Remember that it's an estimate - it might be high, it might be low.
Let's review the relevant memory definitions: (from https://askubuntu.com/a/859664/19626)
Total = Used + Free
Available: Estimation of how much memory is available for starting new applications, without swapping. Unlike the data provided by the cache or free fields, this field takes into account page cache and also that not all reclaimable memory slabs will be reclaimed due to items being in use.
Note that 'Available' and 'Free' are apples-and-oranges. Do not add them and expect a useful result.