Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 May 2001 12:12:20 -0600
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        Jan Conrad <conrad@th.physik.uni-bonn.de>
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: Write Cacheing on SCSI controllers?
Message-ID:  <20010506121220.A94905@panzer.kdm.org>
In-Reply-To: <20010506120611.C94763@panzer.kdm.org>; from ken@kdm.org on Sun, May 06, 2001 at 12:06:11PM -0600
References:  <Pine.BSF.4.33.0105061509510.84550-100000@merlin.th.physik.uni-bonn.de> <20010506120611.C94763@panzer.kdm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, May 06, 2001 at 12:06:11 -0600, Kenneth D. Merry wrote:
> On Sun, May 06, 2001 at 15:35:29 +0200, Jan Conrad wrote:
> > Hi,
> > 
> > I am setting up a new file server right now so I have some time to play
> > around setting WCE on or off.
> > 
> > To my surprise it did'nt matter that much! Just dd'ing 400MB of zeros to
> > the disc gives me about 32MB/s, (nearly) no matter how WCE is set.
> > (29160, IBM DDYS-T18350N) (softupdates on/off does'nt matter that much
> > either...)
> > 
> > This is in sharp contrast to ATA disks, where the write throughput drops
> > by a factor of 3 when disabling WC.
> > 
> > Is it possible that the SCSI controller does the write cacheing,
> > compensating for the drive not doing it?
> 
> I don't know of any modern SCSI controllers that do caching.  The 29160
> definitely doesn't cache.  (RAID controllers are another story.) So no,
> the controller isn't doing it.
> 
> As Joerg pointed out, what you're probably seeing is the effect of tagged
> queueing.  With SCSI, (and with some ATA drives), tagged queueing gives you
> the ability to queue a whole bunch of commands to the disk and then wait
> for completion.
> 
> Without tagged queueing (often the case with ATA), you can only issue one
> command to the disk and then you have to wait for completion.  If you've
> got write caching turned on, though, the disk can acknowledge the command
> immediately, even though it hasn't been committed to disk.  So the time
> between writes goes down and you're better able to saturate the disk.
> 
> If you want to see a difference in performance with a SCSI disk with and
> without write caching, try a whole bunch of random I/O.  (newfs used to be
> a good test, although that may have been fixed recently.)

One thing I should point out is that newfs runs through the raw device, so
it issues one command at a time.  Therefore the lower latency you get with
write caching enabled translates into increased performance.

If you're using the filesystem, though, you can queue more than one
transaction to the disk at a time, so the effect of write caching might not
be as noticeable.

Ken
-- 
Kenneth Merry
ken@kdm.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




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