Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jan 2004 15:55:09 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Derek Marcotte <derek@cpainc.ca>
Cc:        questions@freebsd.org
Subject:   Re: Poor SCSI disk preformance [more on camcontrol please!]
Message-ID:  <20040106215508.GL38169@dan.emsphone.com>
In-Reply-To: <088a01c3d490$31993850$0301a8c0@office.cpainc.net>
References:  <000201c3d461$eea71770$0301a8c0@office.cpainc.net> <012d01c3d47d$40fe8b50$f4f0a8c0@pcmedx.com> <086401c3d481$d35e2ce0$0301a8c0@office.cpainc.net> <20040106194244.GJ38169@dan.emsphone.com> <088a01c3d490$31993850$0301a8c0@office.cpainc.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jan 06), Derek Marcotte said:
> > Aha.  Check the WCE bit to see if your write cache is enabled on
> > the disk
> 
> Bingo:
> 
> # dd if=/dev/zero of=/dev/da0 bs=64k &
> # iostat -K -w 1 da0
>       tty             da0             cpu
>  tin tout  KB/t tps  MB/s  us ni sy in id
>    0   43 64.00 223 13.92   1  0  6  1 92
> 
> I guess I don't have a page 2 for some reason...  This will probably
> cause this bit to be reset on reboot as well, because it is the
> current page?

Possibly.  Power the drive off and see if the change sticks. :)

> Is it prudent to attempt to set the WCE:1 on all drives that get
> attached?  I will be formatting a large number of greatly varying
> drives, including ATA converted to SCSI type drives, and really
> old, and really new drive types.

I've never seen WCE hurt sequential write access, so it's probably safe
to turn on.  If you're paranoid about possibly getting damaged
filesystems during power outages, you might want to turn it back off,
although every year or so there's a thread that pops up debating its
merits.
 
> I've had a look at man camcontrol earlier, but I don't know
> enough about the inner workings of SCSI for this to mean much to
> me.  It seems to be pretty obscure (like how would I know to
> enable features/specs to edit a modepage?), but extremely
> powerful.  Where can I read more about this, is there a good
> camcontrol FAQ/tutorial out there that explains what these
> details actually mean/do?

Everything under "camcontrol modepage" and "cmd" is pretty much
straight from the SCSI spec.  You can buy copies of it from ANSI (I
think you can download draft copies from www.t10.org somewhere), and
sometimes disk vendors will ship copies with vendor-specific info. 
About 15 years ago, I bought a Maxtor disk that didn't include the
little sheet saying which jumpers were which SCSI id.  I called up and
asked them to send me a copy, and they sent me the whole reference
manual for the drive, detailing every SCSI command and modepage.

-- 
	Dan Nelson
	dnelson@allantgroup.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040106215508.GL38169>