Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Apr 1998 12:12:21 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        mark@vmunix.com, mike@smith.net.au
Cc:        hardware@FreeBSD.ORG, stable@FreeBSD.ORG
Subject:   Re: best wdc0 flags ?
Message-ID:  <199804190212.MAA14356@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>We've been duplicating 3GB Western Digital disks the last few days under
>2.2.6, flags 0x80ff80ff on 166MHz P5/430TX boards, and averaging about
>5M/sec throughput.

Seems a bit slow.  For a Fireball ST6.4 under -current, flags 0xa0ffa0ff
(DMA...) on a K6/233/VIA2, I get 9-10M/sec for `dd if=/dev/rwd2
of=/dev/null bs=1m count=1280'.  5-6M/sec is normal for the previous
generation of 5400 rpm IDE drives and for the outer tracks of this drive.

>Try  'dd if=/dev/wd1 of=/dev/null bs=1m' to get an 
>idea of your raw disk speed as opposed to filesystem throughput.

A bad idea.  /dev/wd1 is not a raw disk.  It is a buffered disk
with a too-small block size of 2K.  The effects of the buffer
cache are difficult to analyze, and not very interesting because
real file systems don't use a too-small block size, and clustering
usually gives an effective block size of 64K or 128K for large
sequential files.  Read clustering seems to be unpessimizing the
throughput for the 2K block size in -current, but at a huge cost:

	$ time dd if=/dev/rwd2 of=/dev/null bs=1m count=1280  # raw
	1280+0 records in
	1280+0 records out
	1342177280 bytes transferred in 136.574105 secs (9827465 bytes/sec)
	      137.22 real         0.00 user         2.04 sys

	$ time dd if=/dev/wd2 of=/dev/null bs=1m count=1280  # buferred
	1280+0 records in
	1280+0 records out
	1342177280 bytes transferred in 136.127378 secs (9859716 bytes/sec)
	      136.78 real         0.02 user       116.84 sys
	                                          ^^^^^^^^^^ huge cost

A slightly slower CPU would not be able to keep up with the disk.  DMA
only helps in this benchmark by freeing up some CPU cycles.  PIO at
16.6M/sec would consume over half the CPU cycles, so the same CPU would
not be able to keep up if the disk were in non-DMA mode.

The cost for a too-small block size on the raw device is large but not
huge:

	$ time dd if=/dev/wd2 of=/dev/null bs=2k count=1280  # raw, pessimized
	655360+0 records in
	655360+0 records out
	1342177280 bytes transferred in 136.931865 secs (9801789 bytes/sec)
	      136.99 real         2.19 user        46.39 sys

Bruce

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804190212.MAA14356>