Friday, September 16, 2005

"split /swap between 2 disks": HOW? (and, "GOOD?")

Subject: Re: seen-advice: "split /swap between 2 disks": HOW? (and, "GOOD?")

> Various times I've seen the advice, when setting
> up partitions, to "split" /swap between two disks.

As rule, that is good advice, because Solaris will use
the slices in a round-robin manner, spreading the I/O
load (so disks on different controllers are ideal).

> Just how does one do that?

> ie, what commands do you give?

Assuming you're partitioned the other disk with format,
the easiest way to add the swap is to edit /etc/vfstab.
Right now this machine has one swap slice, on c1t1d0s1:

/dev/dsk/c1t1d0s1 - - swap - no -

If you add (say) target 2, you'd add another line like
this:

/dev/dsk/c1t2d0s1 - - swap - no -

Assuming you want to put swap on slice 1 of that disk too.

You can also add swap on the fly using the swap command,
but it will go away when you next reboot if you don't
add it to /etc/vfstab.

E.g., swap -a /dev/dsk/c1t2d0s1 will add the above device.

Subject: Re: seen-advice: "split /swap between 2 disks": HOW? (and, "GOOD?")

> On Fri, 9 Sep 2005, David Combs wrote:
>> Various times I've seen the advice, when setting
>> up partitions, to "split" /swap between two disks.
> As rule, that is good advice, because Solaris will use
> the slices in a round-robin manner, spreading the I/O
> load (so disks on different controllers are ideal).

To note one exception to the rule: If reliability is more important than
performance, making a mirror for all slices, including swap, is probably
the better idea:
Just because swap is strictly non-persistent data doesn't mean you want
to lose it in-flight.

My guess for an unrecoverable defect on swap would be a kernel panic;
never had it though.

Yours, Bernd

0 Comments:

Post a Comment

<< Home