I have 256GB ssd drive, 32GB DDR RAM, and 1TB HDD. What is the maximum limit of Swap memory that can be set in SSD?
Using the default installation method, Ubuntu will create a swap partition that is the equivalent to your system's memory size.
Most systems nowadays come with 2GB of RAM or more, and will hardly use swap, unless you want to use hibernation.
What I've done is set swap to 0, so I can reduce writes to swap, since too many write cycles will increase the wear and tear on the SSD.
The value of
/proc/sys/vm/swappiness has a default value is 60, setting it to 0 means to never use swap when RAM is still available.
/etc/sysctl.conf file, and set
Hope that will help.
If you're using multiple memory intensive applications, you can create a large swap partition. I can tell you this much, the maximum amount of swap in your case, is larger than the size of your SSD. Take a look at swap man page. The relevant section of the man page (emphasis mine) is:
The size parameter is superfluous but retained for backwards compatibility. (It specifies the desired size of the swap area in 1024-byte blocks. mkswap will use the entire partition or file if it is omitted.
You have plenty of disk space, the limiting factor for swap.
If your intent is to use all of the SSD for swap, you can install the OS as minimal as you wish, creating a few small partitions and then allocate all remaining space to swap.
as much as you need for your apps/data
rest of disk
Run your application(s); monitor memory and swap use, either buy a larger SSD or use the 1TB HD if needed.