Thread (21 messages) 21 messages, 5 authors, 2013-08-02

Re: RFC swap over raid1

From: Doug Ledford <hidden>
Date: 2013-08-02 15:21:52

On 08/01/2013 10:01 PM, Roberto Spadim wrote:
the point is: using swap at two partitions / disks, is "better" than
using a swap over a md raid1? (or any other level?)
That depends on your goals.  If your goal is for your system to be
resilient to disk failure, and you've put your filesystems on a raid
device to be tolerant of failure, then your swap needs to be on one too
or else you are undermining the work you did on your filesystems.  If
that's not the case, then two swap partitions gets you twice the
capacity, but slightly lower performance, than a raid1 swap device over
the same partitions due to the fact that when you are swapping out,
performance is about the same, but when swapping in, we can load balance
reads and increase performance.  Of course, you only have half as much
swap this way.
other point is... swap have a badblock feature? i think it's not
linux-raid but linux-vm or something like it...
for example if i'm using a disk and swap find a badblock, it will use
it? does swap handle bad blocks? it remove the device? continue using
it? or change the device priority?
The swap layer does not do bad blocks *while in use*.  You can pass in a
list of badblocks when creating the device, in which case it won't ever
use those blocks.  However, if a block *goes* bad while in use, and we
get a read error, then whatever application was trying to page in that
page of swap is going to get killed due to an unhandled page fault.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help