What Is RAM?
RAM or Random Access Memory is a type of computer memory that allows your operating system to read and write working data or computer code. RAM is usually used for applications or services that need to be reading or writing very fast. If you are running a CMS website for example (WordPress or Joomla) your website files will be stored under the servers RAM to allow easy and fast access when someone request to load your website. It is important to note that information stored under RAM is deleted when the server reboots so your files and websites are also stored under a storage device (Hard Drive or Solid State Drive).
Check How Much RAM Your Server Has:
In order to check how much RAM your server has you will need CLI or Command line access. Once you are in your command line interface you need to type in the command:
Then click on enter in your keyboard. After you run this command your server will return with the following:
[accountname@stellaris ~]$ free -h total used free shared buff/cache available Mem: 1.8G 1.3G 161M 19M 415M 406M Swap: 2.0G 730M 1.2G [accountname@stellaris ~]$
Let us break this down under the Mem field you will see:
total: 1.8G (This is the total amount of RAM your server or specific account has allocated)
used: 1.3G (So out of the total amount of RAM in this account or server it has used up 1.3GB)
free: 161M (This is the total free amount of RAM that is simply not doing anything)
shared: 19M (This is the total amount of RAM that is being shared across processes)
buff/cache: 415M (This is the total amount of RAM the OS has reserved for buffer internal processes)
available: 406M (This is your total free amount of RAM available to use without swapping)
Now let us break down the Swap field:
Firstly Swap RAM is not actual RAM but it is your server storage device. Server storage devices like (Hard drive or SSD) are much slower compared to actual RAM. So this is only used for last resort processes. As swap RAM is slower if your server starts to use a lot of Swap then that will cause most services including your website to slow down. We always try to avoid Swap usage in all servers as much as possible.
total: 1.8G (This is the total amount of Swap RAM your server or specific account has allocated)
used: 730M (So out of the total amount of Swap RAM in this account or server it has used up 730MB)
free: 161M (This is the total free amount of Swap RAM that is simply not doing anything and available to take. However as mentioned earlier it is best not to use Swap)