Subject: Re: Explicit enabling of disk caches
To: None <thorpej@wasabisystems.com>
From: Greg Oster <oster@cs.usask.ca>
List: tech-kern
Date: 09/05/2001 11:13:21
Jason R Thorpe writes:
> On Sun, Sep 02, 2001 at 10:31:04AM -0700, Jason R Thorpe wrote:
> 
>  > I've been thinking of ways we can improve I/O performance, and one
>  > obvious way is to provide a mechanism to explicitly manipulate the
>  > read and write caches on disks.
> 
> I've done a little more work on this in my spare time, and have fleshed
> the DKCACHE bits out a bit more.
> 
> I know of at least one person who is quite happy with these changes (because
> his RAID performance improved roughly 4x), and can live with write-back
> mode because he trusts his UPS :-)

Said person would like to again thank Jason for his work on this. :) 

In the "before" case, I was seeing:

somebox# time dd if=/dev/rsd1g of=/dev/null bs=8k count=40000
40000+0 records in
40000+0 records out
327680000 bytes transferred in 12 secs (27306666 bytes/sec)
0.0u 1.2s 0:12.03 10.3% 0+0k 0+1io 0pf+0w
somebox# time dd if=/dev/zero of=/dev/rsd1g bs=8k count=40000
40000+0 records in
40000+0 records out
327680000 bytes transferred in 248 secs (1321290 bytes/sec)
0.0u 1.5s 4:07.92 0.6% 0+0k 0+2io 0pf+0w
somebox# 

AFTER turning on the write-back cache performance jumped to:

somebox# dd if=/dev/zero of=/dev/rsd0g bs=8k count=40000
40000+0 records in
40000+0 records out
327680000 bytes transferred in 11 secs (29789090 bytes/sec)
somebox# 

And the RAID set saw a nice boost too:

              -------Sequential Output-------- ---Sequential Input-- --Random--
              -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU  /sec %CPU
before   1000  4311  9.4  4301  3.0  3779  3.9 24568 65.6 24194 14.7 129.3  2.5
after    1000 15146 33.3 15183 10.8  5887  5.9 23786 63.2 23842 14.4 116.7  2.2

(RAID 1 set made up of two 9GB U160 <IBM-PSG, DDYS-T09170M  M, S9HA> drives in 
an IBM x330 1U server box (256MB, 1GHz PIII).)

Colour me a very happy camper... :)

Later...

Greg Oster