Linux only writes swap evenly accross multiple disks (stripe) if you set the
swap priority of each swap
partition to an equal value. If one is set higher than another (which is
what swapon defaults to doing if
you do not specify priorities), then you get the same effect as in using the
"linear" (also called "append")
type md driver, where the kernel only writes to one swap partition till said
partition is full, then it writes to
the next, following the swap priorities. See the swapon man page for
details. Using a RAID 0 device for swap instead of using multiple swap
partitions may or may not be a win. Using RAID 0 will lose on overhead to
direct swap, but since you can tune the stripe size on a RAID device, it
might come out ahead with
certain hardware. (I would be interested to see this tested.) Using swap on
RAID levels other than 0 may be of use to some for fault tolerance.
-Paul
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/