gmirror on 1 or 2 IDE cables

Gayn Winters gayn.winters at bristolsystems.com
Sat Nov 5 22:28:22 GMT 2005


> -----Original Message-----
> From: Peter Clutton [mailto:peterclutton at gmail.com] 
> Sent: Thursday, November 03, 2005 2:30 PM
> To: Steve Bertrand
> Cc: gayn.winters at bristolsystems.com; freebsd-questions at freebsd.org
> Subject: Re: gmirror on 1 or 2 IDE cables
> 
> 
> On 11/4/05, Steve Bertrand <iaccounts at ibctech.ca> wrote:
> >
> > > Using gmirror to mirror two identical drives, how much of a
> > > performance hit is it to have
> > >
> > > 1.  Both drives on one IDE cable?
> > > Compared to:
> > > 2.  One drive primary on one cable and one secondary on the
> > > other cable?
> > > Compared to:
> > > 3.  Both drives primary but on separate IDE cables?
> >
> > My understanding that only a single drive on each IDE channel can be
> > accessed at any one time.
> >
> > Thus, if you put one drive on one channel, and the other 
> drive on the
> > second channel, they can be accessed simultaneously. The 
> location on the
> > cable(s) does not matter,
> 
> That is correct about the two channels, one should be on each. However
> it does make a difference as to primary or secondary, if you have
> other drives attached (such as cdrom). Try putting the cdrom as
> primary, then secondary, and have a watch to discover the difference.
> This might not be noticed with a normal secondary hard drive, as you
> may not write to it much. However in a mirror the second is always
> written to, and you will notice the difference if you are also using
> the cdrom
> 
Apologies to everyone, but I'm still a little confused...

If the hard drive has a decent buffer, then doesn't (or at least
couldn't) a write free up the IDE channel right after the buffer fills
and before the buffer empties and the write is complete?  In which case,
can't a second write to the other drive on the channel overlap the first
disk writing out its buffer?  At the very least couldn't gmirror have
the smarts to do this by interleaving the main and mirrored writes
appropriately (given the size of the buffers)?  Of course, mirroring
should go faster if the mirror is on a different channel.

As for a write to a secondary drive being slower than the same write to
a primary drive... Why should that be?  Doesn't the write data contain
the address (0=primary or 1=secondary) on the IDE channel of the drive
to which the write is going?  If this is the case, then why should one
be slower than the other?

Thanks for the help!

-gayn

Bristol Systems Inc.
714/532-6776
www.bristolsystems.com 




More information about the freebsd-questions mailing list