On Sat, Apr 01, 2017 at 09:26:50AM +0000, Michael van Elst wrote: > > >Setting WCE on SCSI drives is simply a bad idea. It is > >not necessary for performance and creates data integrity > >isues. > > I don't know details about data integrity issues although > I'm sure there are some. But unfortunately WCE makes a difference > on many SCSI drives nowadays. You either run with WCE or > use a RAID controller with it's own stable storage (BBU/Flash) > or live with a significant speed penalty for writes.
But the RAID controller is just another embedded computer, with its own SCSI initiator. If it's not setting WCE on the drive, how does it get better performance than we could? The answer must be either: A) Less barriers (ignoring cache flushes or clearing ORDERED tags earlier because it has stable "cache") B) Larger commands (we could do this...sigh). C) More tags in flight. These are, in theory, things we could do too. However -- I believe for the 20-30% of SAS drives you mention as shipping with WCE set, it should be possible to obtain nearly identical performance and more safety by setting the Queue Algorithm Modifier bit in the control mode page to 1. This allows the drive to arbitrarily reorder SIMPLE writes so long as the precedence rules with HEAD and ORDERED commands are respected. I don't seem to have a drive like the ones you're describing (all my SAS stuff is several years old at best, and nothing shipped with WCE turned on as far as I can tell), but if you're able to try this, I'd love to know what the result is. Given enough tags in flight, the only difference between using SIMPLE tags for writes with QAM=1 and running with WCE enabled is that the host should be able to tell when the writes actually hit stable storage, which is kind of a big deal... Thor