On 05/03/15 00:12, Mark Rogers wrote:
On 4 March 2015 at 20:28, steve-ALUG@hst.me.uk wrote:
Swap space on SSD? Surely it's easier, quicker and faster to just shove more ram into the machine? RAM should be faster than SSD, and if you have enough of it, then swap space won't be used.
Most motherboards max out at 16GB RAM and I always find the O/S still finds some use for swap even if there's RAM available. I figure that if SSD is there it makes sense that if the O/S is going to swap at all it should swap to whatever is closest to RAM in speed, which is SSD.
It's possible to control "swappiness" on Linux. This is certainly true for Gentoo and Ubuntu, and probably for all distros. The default setting is 60 out of 100 which is much too high for normal desktop use but ok for servers. For SSD's, it's silly.
# cat /proc/sys/vm/swappiness
The value will probably be 60
The way to control this is to edit /etc/sysctl.conf and add the value of vm.swappiness=1 to the file (and reboot). This will minimise swap dramatically. Note that you do need a lot of memory to do this!
I know SSDs are fast, but they also have a limited life for writes. In my opinion, therefore, they are unsuitable for transient data such as logs, swap files, and so on.
There are many guides on the net for maximising the life of an SSD in Linux (which is far easier than in Windows, BTW), and I recommend reading a few before you make any decisions.
Here is a really good one for starters:
https://sites.google.com/site/easylinuxtipsproject/ssd
Cheers, Laurie.