On 12 Dec 1998, Marc SCHAEFER wrote:

> C S Hendrix <[EMAIL PROTECTED]> wrote:
> > The tests were actually faster with write cache turned off.  I'm not
> > sure I really expected it to be faster, but I was surprised that
> > cache slowed things down.
> 
> The write cache must be taken from somewhere, ie less read cache.

Indeed, of course, absolutely, etc ...  Write caching disabled for a hard
disk only means that the drive will send the completion status after
having actually written the data to the media. Obviously the disk will use
its memory for the data, but only sending the completion status to user
when the data are written will prevent it from being flooded with lots of
data not being yet written to the media and so will save memory for data
prefetching. Note, that disks being so flooded, may send QUEUE FULL status
and most SCSI code donnot like that. Even when its write caching is
disabled, a _real_ disk can accept several tagged write operations,
disconnect the SCSI BUS as needed, and perform reordering to optimize
throughput. 

On an O/S that performs good caching and asynchronous IO operations, 
using write behind caching at disk level isn't worth'it and probably 
eats much memory that could be used for prefetching. I am not surprised 
that disabling write caching for a disk may increase performances 
under Linux.

There are O/Ses that use to write meta-data synchronously. On these O/Ses,
disk write caching may increase performances, but just breaks at the same
time the assumption of data being written synchronously. It is way stupid
isn't it ? ;-) 

Prefetching is very important in order to be able to get the read sustaint
data rate of a disk, especially when using RAID0 with disks that are not
generally not synchronized. If you want additive read sustaint data rate,
drives have to be able to prefetch up to one track of data when they are
not synchronized. 

> Caching is best when I/O size (on SCSI bus) matches one of the
> cache segment length. 

Perhaps, but it would be too complex to try to guess that from the kernel
code. SCSI disks allows to tune some parameters related to caching and
some of them are well documented. You may try to play with these
parameters to optimize a given hard disk. 

Regards,
   Gerard.




-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to