The Solaris group is a forum where peers share technical expertise, solve problems, and discuss issues related to the Solaris operating system, including OS-related malfunctions, security issues, and network performance.

Swap space & mirroring

Anyone know of any reason why swap space shouldn't be mirrored, if you're going to use Volume Manager to mirror root? I've looked in a lot of places on the net and couldn't find anything to indicate any good negative reasons=2E I've heard that mirroring would have a negative impact on performance, but from what I understand it isn't going to be something that is "noticeable" to the system as a whole=2E

Popular White Paper On This Topic

There is no any good reason to spent disk preserving a temporal data,
besides if your raid is soft-made you spent cpu to keep it mirrored, but if
spenting money isn't an issue for you, well er... if it makes you a happy
man...

We definately mirror swap using Soltice Disk Suite Solaris versions 8 ,9
Several class servers. Works well for us. Of course , I split the disks / mount
across two
different controllers. Perfmeter has not shown any issues of concern.

Why put swap on a mirrored device?
Note the definition of swap. If you are out of RAM, you start using
disk space. If you have errors on that disk, you've basically had
a memory failure. You're up the creek without a paddle.

Why is swap-on-raid1 not as good as multiple swap partitions, for
performance reasons?

Because when a server is in a RAM shortage, you tend to get in a swap
LOOP. Swap something in, play with it, write it out again. Repeat with
some other section of virtual memory.

So for essentially everything in swap space, you will be writing to
both
disks at once. From a performance standpoint, you may as well only
have one disk.

I think mirroring swap space is a good practice. Imagine your OS disk crashes and there's no swap space, your Solaris won't be able to boot from the other mirror disk cause there's no swap space on it.

The question is truely what advantage is there to mirroring swap?
Overhead for the mirror, 50% loss of disk space, no technical advantage.
It is like putting premium gas in a low compression vehicle, it wastes money and provides no benifit.

>The question is truely what advantage is there to mirroring swap?
>Overhead for the mirror, 50% loss of disk space, no technical
advantage.
>It is like putting premium gas in a low compression vehicle, it wastes
money and provides no benifit.

I believe you will increase the through put of swap reads because of the
ability to read from two different disks.

I thought that with software mirroring using Volume Manager, it is both striping and mirroring.

Also, found this excerpt from a Solaris Volume Manager Performance Best Practices guide, written in 2003 by Glenn Fawcett from Sun's Strategic Application Engineering group:

"Software mirroring uses additional bandwidth on writes but performs well on reads.
By default, Solaris Volume Manager software implements a round-robin read policy,
which balances I/O across both sides of the mirror. For a well-balanced I/O
subsystem, round-robin works the best.
In addition to round-robin, Solaris Volume Manager software supports Geometric
and First features. Geometric splits the logical addresses into ranges. Geometric is
used to increase sequential read throughput in a well balanced environment. The
First read policy only reads the first subdisk of the mirror. First is useful if the
secondary device is slower than the primary."

If you want fault tolerance you should spend some money too mirror your swap=2E If you have swapped out pages on a failing disk and swap isn't mirrored then your system will most likely panic=2E After the reboot you need to manually switch your swap to another disk=2E Downtime which can be avoided=2E

Concept of the swap is , in shor , in case Physical memory running low or
full swap works as RAM,
concept of mirroring is if your primary disk fail(if you talking about
root disk mirroring) , the secondary disk will take over and if secondary
disk do not have a swap configured, and system process required swap
then system will get panic.

A friend of mine that works with Solaris told me that initial installation requires the creation of a fixed area of swap space in disk, either internal or external=2EHe also told me that this swap area cannot be deleted so any single instance of the OS Solaris can startup without swap space=2E Please confirm this=2E

If this is true, then you have to create a mirror for the swap space in the mirror disk=2E

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.