From owner-freebsd-hackers Wed Mar 6 12:14:52 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from damnhippie.dyndns.org (12-253-177-2.client.attbi.com [12.253.177.2]) by hub.freebsd.org (Postfix) with ESMTP id F1F1337B400 for ; Wed, 6 Mar 2002 12:14:47 -0800 (PST) Received: from [172.22.42.2] (peace.hippie.lan [172.22.42.2]) by damnhippie.dyndns.org (8.11.6/8.11.6) with ESMTP id g26KEk807148; Wed, 6 Mar 2002 13:14:46 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) User-Agent: Microsoft Outlook Express Macintosh Edition - 5.01 (1630) Date: Wed, 06 Mar 2002 13:14:48 -0700 Subject: Re: A weird disk behaviour From: Ian To: Zhihui Zhang Cc: Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >> >> 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