SATA vs SCSI ...
truckman at FreeBSD.org
Tue Jun 28 23:55:59 GMT 2005
On 27 Jun, Artem Kuchin wrote:
> For the last 6 month i really think that if you don't need something
> high-end scsi then you should go for SATA. There are test on sites
> such as Tom's hardware guide and ixbt.com. They show then on
> sequrncial read there is no difference between scsi and sata.
> Acatuallty, modern hdds use the same mechanics for sata and scsi
> versions of them. The brains (electronics) on the hdds are different
> of course. However, when it comes to random read/writes scsi wins
> because of command queueing. This was an issue until recently,
> Recently SATA with NCQ became widly available. Test show that some of
> those SATA disks with NCW ***WIN*** over scsi 320. The test envolve
> artificialy random read/write tests as well as real application
> benchmarking. I din't rememeber where excatly i saw the tests on those
> site, but you could search.
SCSI command queuing also allows you to turn off write-caching on the
drive without taking the tremendous performance hit that you'll see if
you turn off write-caching on an ATA drive (without NCQ). Soft updates
assumes that the drive does not do write-caching and that the data is on
the platter when the drive acknowledges the write. If this assumption
is violated, a power failure that causes the loss of the unwritten data
in the drive's write cache may cause the on-disk state to be
inconsistent in a way that is not fixable by a background fsck.
I'm also under the impression that consumer-grade drives generally write
entire tracks at once so that they can dispense with the need for sector
headers and inter-sector gaps. If only one sector is being written, the
drive will need to read the entire track (if it is not in cache), update
the in-memory copy, and then rewrite the entire sector. For most users,
this is probably a good capacity vs. performance tradeoff. I don't know
about modern drives, but back in the olden days when I used SMD drives,
the per-sector overhead was 80+ bytes when using 512 byte sectors.
I would not expect much of a performance hit if the disk is used to
store jpegs and mp3s, but random write performance is likely to suffer,
especially if write-caching is disabled. Also, a power failure while a
write is in progress is more likely to corrupt data in an unrelated file
that happens to occupy the same track and is also likely to cause
inconsistencies that can't be fixed by a background fsck.
BTW, even with an UPS monitored by sysutils/nut, I've had a non-trival
number of ungraceful shutdowns caused by power problems (power cord
between UPS and computer falls out, sudden battery death, etc.). For
this reason, all of my machines (other than my PVR) use SCSI disks with
WCE set to 0.
More information about the freebsd-stable