Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Mar 2002 19:18:24 -0500 (EST)
From:      Zhihui Zhang <zzhang@cs.binghamton.edu>
To:        "Brian T.Schellenberger" <bts@babbleon.org>
Cc:        Julian Elischer <julian@elischer.org>, Lars Eggert <larse@ISI.EDU>, "Rogier R. Mulhuijzen" <drwilco@drwilco.net>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: A weird disk behaviour
Message-ID:  <Pine.SOL.4.21.0203051909050.14810-100000@onyx>
In-Reply-To: <20020305235404.9AE73BA03@i8k.babbleon.org>

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

On Tue, 5 Mar 2002, Brian T.Schellenberger wrote:

> On Tuesday 05 March 2002 06:29 pm, Julian Elischer wrote:
> > On Tue, 5 Mar 2002, Lars Eggert wrote:
> > > Zhihui Zhang wrote:
> > > > Several times slower! The point is that writing less data performs
> > > > worse. So I call it weird.
> > >
> > > Huh? You originally said:
> > >  > (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.
> > >
> > > ...
> > >
> > >  > 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?
> > >
> > > If (2) is better than (1), then writing *less* data is faster. Which is
> > > it, now?
> >
> > Um yeah that is what all my suggestions were based on..
> 
> If, however, the later mail is right and the earlier mail is wrong, this 
> *would* be easily explained:  Many disks have optimization for the case of 
> linear writes and seeking slows them down a *lot*.  Why?  Because it's very 
> common to do linear writes, and it make sense to optimize the common case.

But the write in both cases are done sequentially.  In the second case, I
merely skip some sectors by writing less-than-full blocks.  For example, I
could write 3584, 5120, 7680, 7168, 8192 bytes in each successive 8192
byte blocks. But all these blocks are contiguous.  Maybe the disk
controller is not smart enough to figure out this is actually sequential.
Only 8192, 8192, 8192, 8192 are regarded as sequential?

-Zhihui

> But it'll be easier for us all to explain away the results if you can tell us 
> what the results actually are :-)
> 
> >
> > > Lars
> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-hackers" in the body of the message
> 
> -- 
> Brian T. Schellenberger . . . . . . .   bts@wnt.sas.com (work)
> Brian, the man from Babble-On . . . .   bts@babbleon.org (personal)
>                                 ME -->  http://www.babbleon.org
> http://www.eff.org   <-- GOOD GUYS -->  http://www.programming-freedom.org 
> 


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.SOL.4.21.0203051909050.14810-100000>