Date: Sat, 25 Sep 2004 22:59:43 +0200 From: Mauro Triulzi <triulzi@freesurf.ch> To: freebsd-current@freebsd.org Subject: ATA disk performance (ICH2 controller), some tests and comparison with Linux 2.6.5 Message-ID: <4155DC3F.5070904@freesurf.ch>
next in thread | raw e-mail | index | archive | help
Hello, I post some tests about the performance of my ATA disk (which is not very spectacular under FREEBSD 6.0). Notice that the write performance improves considerably after reinitializing the ATA channel. I've given a comparison with the performance under Linux (kernel 2.6.5) which is far better (with identical HW of course, since I can boot both Linux 2.6.5 and FreeBSD current). Can someone help me to explain this facts or tell me what I am doing wrong? Kind regards, Mauro i) System & hardware foo# uname -a FreeBSD foo.bar.com 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Sat Sep 25 17:54:29 CEST 2004 triulzi@foo.bar.com:/usr/src/sys/i386/compile/MYKERNEL i386 source tree actualized and built today, all debugging options disabled. My HW: foo# pciconf -v -l (...) atapci0@pci0:31:1: class=0x010180 card=0x01451028 chip=0x244b8086 rev=0x04 hdr=0x00 vendor = 'Intel Corporation' device = '82801BA (ICH2) UltraATA/100 IDE Controller' class = mass storage subclass = ATA (...) Mode (before reinitialization, see below) foo# atacontrol mode 0 Master = UDMA100 Slave = BIOSPIO Kernel parameters (also before reinitialization): foo# sysctl hw.ata. hw.ata.ata_dma: 1 hw.ata.wc: 1 hw.ata.atapi_dma: 1 ii) TESTS: all tests with 512B blocks read/write a) under FreeBSD Write test: foo# date && dd if=/dev/zero of=deleteme.now count=1000000 && date Sat Sep 25 22:04:02 CEST 2004 1000000+0 records in 1000000+0 records out 512000000 bytes transferred in 34.238161 secs (14954074 bytes/sec) Sat Sep 25 22:04:36 CEST 2004 Read test: foo# date && dd if=/dev/ad0s3g of=/dev/null count=1000000 && date Sat Sep 25 22:08:13 CEST 2004 1000000+0 records in 1000000+0 records out 512000000 bytes transferred in 125.686697 secs (4073621 bytes/sec) Sat Sep 25 22:10:18 CEST 2004 Reinitialize the ATA channel: foo# atacontrol reinit 0 Master: ad0 <IC35L060AVV207-0/V22OA63A> ATA/ATAPI revision 6 Slave: no device present Write test after reinitialization: foo# date && dd if=/dev/zero of=deleteme.now count=1000000 && date Sat Sep 25 22:12:30 CEST 2004 1000000+0 records in 1000000+0 records out 512000000 bytes transferred in 15.110452 secs (33883831 bytes/sec) Sat Sep 25 22:12:45 CEST 2004 (about twice faster!! Why?) Read test after reinitialization: foo# date && dd if=/dev/ad0s3f of=/dev/null count=1000000 && date Sat Sep 25 22:14:51 CEST 2004 1000000+0 records in 1000000+0 records out 512000000 bytes transferred in 125.860301 secs (4068002 bytes/sec) Sat Sep 25 22:16:56 CEST 2004 (read from another device to avoid caching effects) Reinitialization of the ATA channel has effects only on write performance. Read performance is very bad. b) Now the same under Linux (kernel 2.6.5) Write performance linux:/usr # date && dd if=/dev/zero of=deleteme.now count=1000000 && date Sat Sep 25 21:38:30 CEST 2004 1000000+0 records in 1000000+0 records out Sat Sep 25 21:38:35 CEST 2004 deleteme.now is about 488 MB, rate about 100 MB/sec!! Read performance linux:/usr # date && dd if=/dev/hda11 of=/dev/null count=1000000 && date Sat Sep 25 21:41:31 CEST 2004 1000000+0 records in 1000000+0 records out Sat Sep 25 21:41:43 CEST 2004 that is about 40MB/sec!! (/dev/hda11 read for the first time, to avoid caching). Kind regards, Mauro
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4155DC3F.5070904>