From owner-freebsd-current@FreeBSD.ORG Sat Sep 25 21:45:16 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F275816A4CF for ; Sat, 25 Sep 2004 21:45:15 +0000 (GMT) Received: from mail.parodius.com (mail.parodius.com [64.62.145.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id B470C43D31 for ; Sat, 25 Sep 2004 21:45:15 +0000 (GMT) (envelope-from jdc@pentarou.parodius.com) Received: from pentarou.parodius.com (jdc@localhost [127.0.0.1]) by mail.parodius.com (8.13.1/8.13.1) with ESMTP id i8PLjFd8056728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 25 Sep 2004 14:45:15 -0700 (PDT) (envelope-from jdc@pentarou.parodius.com) Received: (from jdc@localhost) by pentarou.parodius.com (8.13.1/8.13.1/Submit) id i8PLjFbB056727 for freebsd-current@freebsd.org; Sat, 25 Sep 2004 14:45:15 -0700 (PDT) (envelope-from jdc) Date: Sat, 25 Sep 2004 14:45:15 -0700 From: Jeremy Chadwick To: freebsd-current@freebsd.org Message-ID: <20040925214515.GA56471@parodius.com> Mail-Followup-To: freebsd-current@freebsd.org References: <4155DC3F.5070904@freesurf.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4155DC3F.5070904@freesurf.ch> User-Agent: Mutt/1.5.6i Subject: Re: ATA disk performance (ICH2 controller), some tests and comparison with Linux 2.6.5 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Sep 2004 21:45:16 -0000 A few things from my perspective: 1) Using dd to test disk performance is somewhat of a misnomer. You should consider a tool like bonnie++ instead (ports/benchmarks/bonnie++). 2) Using block sizes of 512 bytes is pretty absurd. Try other block sizes, preferably 8KB, 16KB, 32KB, and 64KB. You may find disk performance is quite a bit better in such cases. 3) I happen to agree with Arne -- Linux is probably tricking you into believing the disk performance is higher than what it is due to memory caching. 4) There was a recent thread about ICH2-related issues (I believe performance was one of them) here on freebsd-current: http://lists.freebsd.org/mailman/htdig/freebsd-current/2004-September/036841.html 5) I have no idea what's up with the ATA channel re-init. Soren should (and probably will) chime in here. 6) I'm still amazed people have systems in production that use ICH2. AFAIK, the chipset is deprecated. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. | On Sat, Sep 25, 2004 at 10:59:43PM +0200, Mauro Triulzi wrote: > 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 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 > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"