I still have two old ATA drives (one is only 8GB, one is somewhat defect) and I've been thinking about putting them into my PC and activating swap on them, too. What will be effect of this? Will my system spread data across the drives evenly so that swapping becomes faster?
Can I accelerate swap by using multiple harddrives?
linux;swap
Firstly, using a slow or defective hard drive for swap is not a good idea. It's like having really slow or buggy memory in a way.How your system spreads data across your swap partitions depends on the priority you give them in your /etc/fstabAs an example,/dev/hda5 none swap sw,pri=2 0 0/dev/hdb5 none swap sw,pri=1 0 0/dev/hdc6 none swap sw,pri=3 0 0Your system will use the partition with the highest priority first (in this case /dev/hdc6). Priorities go from 0 to 32767. You can assign the same priority to the different partitions and that will make your system use them equally (or spread the load across different drives). The main reason for this is that you want to use a faster (or less used but still fast) drive first, as it can have a major impact on your system.You can change your system's tendency to write to swap by setting swappiness. More info here.