Swappiness is a comparison between the relative I/O (input/output) cost of swapping and filesystem paging.
At swappiness = 100, it considers swapping and filesystem paging to have equal I/O cost, and will thus apply memory pressure to the page cache and swap-backed pages equally. Lower values signify more expensive swap I/O, higher values signify cheaper.
So if you've got a slow spinning-rust hard drive as your swap drive, and lots of RAM, you'd want swappiness to be low (only used when you've used all the available RAM) to keep system speed higher.
If you've got a really fast hard drive setup (RAID array or ZFS mirrored drives), you'd want swappiness to be higher (I have mine set to 100, with 3 mirrored ZFS drives improving read speed and 2 mirrored SLOG drives improving write speed. Even at swappiness = 100, the system doesn't swap until it reaches the set high mark of RAM usage (which I've set as 85% of total RAM)).
If you've got your swap drive on a SSD (not recommended), you want swappiness low, to prevent bit-burnout of the SSD.
If you could somehow get your hands on a RAM-based drive on a really fast interface, or if you're running zram or zswap, you can push swappiness beyond 100, to as high as 200... that'll preferentially push data onto the (compressed) in-memory zram or zswap swapfile. The zram or zswap will fill up first, and since it's compressed, that can significantly increase the perceived memory size.
I don't believe that concern for swapping will improve PC performance in any efficient way. There would be little performance impact from swapping infrequently accessed data that would be subject to priority swapping.
Well, it won't affect much unless you're running zswap, which sets up a RAM-based swapfile (and swaps to disk when it gets full) which is compressed.
Because it's compressed, it's more beneficial to swap than to do filesystem paging... it holds the data that was going to be swapped out to disk in memory and compresses it, so access to that data is faster.
Say you've got half your RAM set up as zswap, and say you've got 16 GB RAM. With 3:1 compression and swappiness set to 200, the machine now acts as if it's got 32 GB of RAM.
# Set up swap drive partitions.
UUID=de1a46a0-1e14-4158-b93f-a94971d01683 none swap discard,noatime,pri=1 0 0
UUID=8580f890-b596-4391-ac13-b727aabd50c5 none swap discard,noatime,pri=1 0 0
Note the "pri=1" bits... that sets the priority for each swap partition. If two (or more) partitions have the same priority, the system will use those swap partitions in round-robin fashion. Higher-priority swap partitions will preferentially be used first.
NAME TYPE SIZE USED PRIO
/dev/sdb2 partition 24G 0B 1
/dev/sda2 partition 24G 0B 1
The number of swap partitions you can have has varied over the years... nowadays it's safe to say you can have up to 29.
You have 8Gb of DRAM, your installing something & just for a brief time your machine needs 9Gb of DRAM, Would you rather the machine freeze & maybe corrupt you install.?
Would it be a good idea to have DRAM backup, to do the demanding task?
Cheers for your kind words.
I remember a statement somewhere awhile back.
"You could write 20Gb a day to an SSD & the SSD should last 10yr's,"
In saying that, Over writing continually to the same sector/file, can render a part of the drive as useless.
This can be over come by creating a new sector/file,
Bottom line: your SSD's Should last around 10yr Just like thumb drives.
As a preventative maintenances, It's a good idea to swap-out your drives, every 10yr.
Just like the BIOS battery, has a life span of 5-10yrs.
Hope this may help
There are always a workaround for most things.
As Zorin OS/Website is based on new users to Zorin/Linux.
This Tutorial is just based on, explaining what SWAP & SWAPPINESS, Is.
As are the Examples, being based on Explaining the concept of SWAP & SWAPPINESS.
This is not meant to help fix issue's or to show workarounds. Hence i tried to keep it as basic as possible for those that just want to know what is SWAP/SWAPPINESS.