From owner-freebsd-questions Sat Sep 7 17:33:10 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E56537B400 for ; Sat, 7 Sep 2002 17:33:06 -0700 (PDT) Received: from monorchid.lemis.com (monorchid.lemis.com [192.109.197.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F5AC43E42 for ; Sat, 7 Sep 2002 17:33:03 -0700 (PDT) (envelope-from grog@monorchid.lemis.com) Received: (from grog@localhost) by sydney.worldwide.lemis.com (8.12.5/8.12.3/Submit) id g871glUq001452; Sat, 7 Sep 2002 11:42:47 +1000 (EST) Date: Sat, 7 Sep 2002 11:42:47 +1000 From: Greg Lehey To: "Jack L. Stone" Cc: Matthew Seaman , Warren Block , FreeBSD LIST Subject: Re: dd if=/dev/zero of=/dev/ad1 Message-ID: <20020907014247.GF1207@sydney.worldwide.lemis.com> References: <20020901223639.GA12421@happy-idiot-talk.infracaninophi> <3.0.5.32.20020901182122.014b5a00@mail.sage-one.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3.0.5.32.20020901182122.014b5a00@mail.sage-one.net> User-Agent: Mutt/1.4i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday, 1 September 2002 at 18:21:22 -0500, Jack L. Stone wrote: > At 12:00 AM 9.2.2002 +0100, Matthew Seaman wrote: >> On Sun, Sep 01, 2002 at 04:52:39PM -0600, Warren Block wrote: >>> On Sun, 1 Sep 2002, Matthew Seaman wrote: >>> >>>> It's part of the IDE specification: 128k is the maximum IO transfer >>>> size. Oh --- the equivalent figure for SCSI discs is 64kB. >>> >>> I'm reasonably certain that for SCSI it's 64K *blocks* of 512 bytes >>> each, or 32M. Some systems may have driver limitations that break >>> transfers up into 64K chunks, though. >> >> Like FreeBSD perhaps? >> >> happy-idiot-talk:/home/matthew:# dd if=/dev/da0c of=/dev/null bs=1m & >> [2] 13192 >> happy-idiot-talk:/home/matthew:# iostat da0 1 >> tty da0 cpu >> tin tout KB/t tps MB/s us ni sy in id >> 5 11 0.00 0 0.00 2 0 0 3 94 >> 1 43 64.00 556 34.77 1 0 2 2 95 >> 0 43 64.00 557 34.84 1 0 0 4 95 >> 0 42 64.00 556 34.74 0 0 2 3 95 >> 0 43 64.00 557 34.82 0 0 1 3 96 Yes, this is a limitation imposed by the CAM drivers. > ...and for the IDE as per Greg: > > dd if=/dev/ad0c of=/dev/null bs=128k & > and in the background do an 'iostat ad0 1'. Here's an example with an > IDE drive: > > === grog@zaphod (/dev/ttyp0) ~ 3 -> iostat ad0 1 > tty ad0 cpu > tin tout KB/t tps MB/s us ni sy in id > 0 3 5.19 7 0.03 11 0 4 1 84 > 0 126 127.36 183 22.74 0 0 6 2 92 > 0 44 128.00 190 23.76 0 0 2 0 98 > 0 44 128.00 191 23.89 0 0 5 0 95 > 0 44 128.00 191 23.88 0 0 7 1 92 > > As you can see, it's really doing 128 kB transfers, for an average > transfer rate of almost 24 MB/s. This may be due to an IDE limitation, but I don't know of any such limitation. More importantly, it's the maximum transfer that the system can make for any device. It's limited by the definition MAXPHYS, which you can find in /usr/src/sys/i386/include/param.h (for some value of i386 :-): #define MAXPHYS (128 * 1024) /* max raw I/O transfer size */ Greg -- See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message