Ubuntu Swap Partition – How to Change Size

linuxswapUbuntu

Trying here to do an installation of Ubuntu 18.04 LTS, focusing on domestic surveillance with some ip cameras.

There will be about 12 cameras, which we are going to add in Zoneminder with images capture function.

With this in mind, what should be the Swap partition size?

And how may one enable this partition and start using it?

I already have an installation system with 5GB of Swap, but heard that it isn't enough.

Best Answer

Honestly, I wouldn't overengineer this situation. Of course, there're different scenarios and for each of them, you might want a different size of swap, but for normal needs you might have at home, you can stick to this recommendation by Red Hat: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-disk-partitioning-setup-x86#sect-recommended-partitioning-scheme-x86 (table 8.3, you need to scroll a bit).

Having said that, start with finding out how much RAM you have.

Another discussion about the same topic from 2013 is on askubuntu: https://askubuntu.com/questions/49109/i-have-16gb-ram-do-i-need-32gb-swap You might want to read through it.

As for the second question. If you install the system, you don't really need to do anything else to start using it. The system (Ubuntu) will use your swap automatically whenever runs out of RAM.

Related Question