View Single Post
Banned | Posts: 358 | Thanked: 160 times | Joined on Dec 2010
#81
Originally Posted by nightfire View Post
Hey epitath,

There are two configurations:

What you have is like raid-0 "concat" mode. Basically, when your highest priority swap runs out of space (SD, because -1 > -2), it'll start swapping to the next highest priority swap area (internal).

Your total available swap space is the sum of these two.

This configuration is particularly useful when you have block devices of differing speeds (ie. compressed ramdisk and slow media) since you can tell the kernel to use the fast device until it's full, and then start using the slow device. It would be even more useful if the kernel could migrate infrequently used pages from fast->slow in the background, but I'm not sure if anyone has implemented it.

The other configuration is like raid-0 "striping" mode. When you have your swap areas set to the exact same priority, the kernel will interleave blocks between the two. This theoretically increases both read and write bandwidth, just as it does with striped raid-0, since the kernel can parallelize the writes, and some reads.

Like the "concat" configuration, your total available space is the sum of the two, though the "stripable" area (increased bandwidth) is equal to 2x the size of the smallest area.
Hi nightfire,

thank u for ur reply but my device feels better with my setting. Maybe it is a bug?