Date: Sat, 6 Dec 2003 11:29:51 -0800 (PST) From: Don Lewis <truckman@FreeBSD.org> To: ianjhart@ntlworld.com Cc: freebsd-scsi@FreeBSD.org Subject: Re: More Adaptec 29320 + Seagate ST336607LW woes Message-ID: <200312061929.hB6JTpeF042644@gw.catspoiler.org> In-Reply-To: <200312061144.22425.ianjhart@ntlworld.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6 Dec, ian j hart wrote: > On Friday 05 December 2003 8:33 pm, Don Lewis wrote: >> I've been meaning to suggest that if you haven't done so already, use >> "camcontrol modepage" to set the WCE bit to 0 which will disable write >> caching on the drive. In the testing that I've done, I haven't seen any >> significant performance penalty in doing this if tagged command queuing >> and softupdates are in use. It is also safer for soft updates because >> the drive no longer lies about when write data reaches stable storage. > > I thought tagged queuing needed WCE. Nope. As near as I can tell, the drive always returns the "Done" response to a write command immediately if WCE is on, and waits until the data hits the platter if WCE is off. The difference with tagged queuing is that while the drive will attempt to do the write as soon as possible, it will accept more than one command at a time and will attempt to schedule the physical I/O in some sort of optimim order to maximize throughput. If the OS wants to enforce a particular order, it can just wait for commands to complete before sending new ones to the drive, which is pretty much what soft updates does. I think there are also some other ways for the OS to constrain the physical I/O ordering. One place where folks have noticed a performance difference between WCE on and WCE off is when using newfs after we got rid of the buffered block devices and forced newfs to use the raw character device. Newfs only issues one write() at a time and waits for the status before issuing another write(). If WCE is on, the writes only have to hit the drive cache before the drive returns a status that gets returned to userland, but if WCE is off the data has to hit the platter before the status is returned, which slows down newfs quite considerably. Tagged queuing doesn't make any difference in this case because the drive will only see at most only one command at a time.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312061929.hB6JTpeF042644>