In order to perform the changes follow the above instructions:
- Log into your server with SSH (root)
- Open the Terminal / Console.
- Edit the "/etc/default/grub" file with any editor:
Now add mem=2G in GRUB_CMDLINE_LINUX_DEFAULT. Make sure to replace your own limit with mem=2G
GRUB_CMDLINE_LINUX_DEFAULT="mem=2G"
When the changes are done, run the command:
update-grub2
To apply the changes! Now check the RAM limit with df / free. The available RAM limit should be reduced now!
Tip: If update-grub2 does not exists on your server, execute: grub2-mkconfig -o /boot/grub2/grub.cfg ; reboot
Make sure to revert the changes once your work is done if you want to utilize the full RAM for your applications!