Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Mar 2002 13:14:48 -0700
From:      Ian <freebsd@damnhippie.dyndns.org>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        <freebsd-hackers@freebsd.org>
Subject:   Re: A weird disk behaviour
Message-ID:  <B8ABC6C8.ACA5%freebsd@damnhippie.dyndns.org>
In-Reply-To: <Pine.SOL.4.21.0203061247260.6633-100000@onyx>

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

>> 
>> When I instrumented code in various places to try to track down why there
>> was such a huge difference when fragsize != blocksize I found that the
>> killer was repeated read-modify-write cycles, especially on filesystem
>> metadata.  Creating a file and writing a few bytes to it could result in
>> dozens of blocks read then written, and some of the blocks got re-read
>> several times in the process.  It was always a mystery to me why the same
>> sectors would get read over and over again (isn't that what buffer and
>> filesystem caches are for?)  But I know for certain the physical reads were
>> happening because the instrumentation for that was in a custom raid driver
>> of our own.
> 
> Could you tell me where is your custom raid driver? I mean, is it part of
> the operating system or inside the disk controller?
> 

It was custom hardware and software for an embedded system.  We had a
motherboard with 18 adaptec AIC 78xx chips on it, and our own software raid
layer (modified freebsd kernel) that did special-purpose stuff (striping and
error recovery using custom parity-generating hardware also on the mobo).

I mentioned the raid driver only as a way of indicating that I was sure I
was instrumenting real physical IO at the very lowest talk-to-the-drive
layer, and I was seeing read-modify-write cycles at that layer that
indicated the same sectors were being read over and over again (filesystem
metadata sectors) during the higher-level operation of create-file, write 1
byte to file, close file.

-- Ian


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?B8ABC6C8.ACA5%freebsd>