Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Mar 2002 12:55:30 -0800 (PST)
From:      Julian Elischer <julian@elischer.org>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: A weird disk behaviour
Message-ID:  <Pine.BSF.4.21.0203051255050.26829-100000@InterJet.elischer.org>
In-Reply-To: <Pine.SOL.4.21.0203051527280.10139-100000@onyx>

next in thread | previous in thread | raw e-mail | index | archive | help

more writes fit in the disk's write cache?


On Tue, 5 Mar 2002, Zhihui Zhang wrote:

> 
> I am doing some raw I/O test on a seagate SCSI disk running FreeBSD 4.5.
> This situation is like this:
> 
>  +-----+----+----+----+----+----+----+----+----+----+---+------
>  |     |    |    |    |    |    |    |    |    |    |   | ....
>  +-----+----+----+----+----+----+----+----+----+----+---+------
> 
> Each block is of fixed size, say 8192 bytes. Now I have a user program
> writing each contiguously laid out block sequentially using /dev/daxxx
> interface. There are a lot of them, say 15000.  I write the blocks in two
> ways (the data used in writing are garbage):
> 
> (1) Write each block fully and sequentially, ie. 8192 bytes.
> 
> (2) I still write these blocks sequentially, but for each block I only
> write part of it.  Exactly how many bytes are written inside each block is
> determinted by a random number between 512 .. 8192 bytes (rounded up a
> to multiple of 512 bytes).
> 
> I find out the the performance of (2) is several times better than the
> performance of (1). Can anyone explain to me why this is the case?
> 
> Thanks for any suggestions or hints.
> 
> -Zhihui
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message
> 


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0203051255050.26829-100000>