From owner-freebsd-questions@FreeBSD.ORG Fri Oct 15 08:57:15 2004 Return-Path: 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 4CF1216A4CE for ; Fri, 15 Oct 2004 08:57:15 +0000 (GMT) Received: from tierra2.ng.fadesa.es (tierra2.ng.fadesa.es [195.55.55.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F39E43D2D for ; Fri, 15 Oct 2004 08:57:14 +0000 (GMT) (envelope-from fandino@ng.fadesa.es) Received: from [195.55.55.163] ([195.55.55.163]) (authenticated bits=0) by tierra2.ng.fadesa.es (8.12.10/8.12.10) with ESMTP id i9F8vAi3011423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 15 Oct 2004 10:57:12 +0200 Message-ID: <416F90E6.10108@ng.fadesa.es> Date: Fri, 15 Oct 2004 10:57:10 +0200 From: fandino User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: gl, en, es MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <416EB6B1.6060405@ng.fadesa.es> <416F849F.8020508@solid-state-logic.com> In-Reply-To: <416F849F.8020508@solid-state-logic.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Sender: user fandino from 195.55.55.163 X-Virus-Scanned: clamd / ClamAV version 0.75.1, clamav-milter version 0.75c on tierra2 X-Virus-Status: Clean Subject: Re: FreeBSD and poor ata performance X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: fandino@ng.fadesa.es List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Oct 2004 08:57:15 -0000 I'm out of ideas, It doesn't matter if I use other PC or hard disks, performance sucks compared to Linux :-( Any advice or idea about the possible cause? I can't believe this difference of throughput with ata disks.Hello Martin, >> for linux it took about 23 seconds write the file and 18 read it. >> >> # time dd if=/dev/zero of=aa bs=1024k count=1024 >> 1024+0 records in >> 1024+0 records out >> >> real 0m23.408s >> user 0m0.000s >> sys 0m4.470s >> >> # time dd if=aa of=/dev/null bs=1024k >> 1024+0 records in >> 1024+0 records out >> >> real 0m18.311s >> user 0m0.000s >> sys 0m5.850s >> >> and for FreeBSD it took 40 seconds write the file and 42 read it: >> >> # dd if=/dev/zero of=aa bs=1024k count=1024 >> 1024+0 records in >> 1024+0 records out >> 1073741824 bytes transferred in 40.143630 secs (26747502 bytes/sec) >> >> # dd if=aa of=/dev/null bs=1024k >> 1024+0 records in >> 1024+0 records out >> 1073741824 bytes transferred in 42.711242 secs (25139560 bytes/sec) >> >> so as you can see linux was two times faster that FreeBSD :-? >> I would like to know if anyone knows if this is normal or >> is a bug? > > On linux which filesystem - ext2/ext3/....also which kernal/distro vanilla slackware 8.1 with an old 2.4.18 kernel and ext2 filesystem > For FreeBSD I presume this was UFS2 rather the UFS, in either case did > you enable softupdates? > > A better 'test' is the bonnie++ utility where you can throw different > file sizes etc at the disks, so see what happens with multiple files > etc. This gives a more real world view, rather a single file write. I don't think so. I suspect a low level problem. This time I did the test using raw devices instead of block devices, this way filesystem, buffer-cache, softupdates are not present at all. The results were as bad as predicted. # dd if=/dev/zero of=/dev/ad4 bs=1024k count=1024 1024+0 records in 1024+0 records out 1073741824 bytes transferred in 38.184851 secs (28119576 bytes/sec) # dd if=/dev/ad4 of=/dev/null bs=1024k count=1024 1024+0 records in 1024+0 records out 1073741824 bytes transferred in 31.090536 secs (34535970 bytes/sec) As a curiosity transfers between disk are slower :-? # dd if=/dev/ad4 of=/dev/ad6 bs=1024k count=1024 1024+0 records in 1024+0 records out 1073741824 bytes transferred in 69.606197 secs (15425952 bytes/sec) I'm out of ideas, It doesn't matter if I use other PC or hard disks, performance sucks compared to Linux :-( Any advice or idea about the possible cause? I can't believe this difference of throughput with ata disks. # atacontrol list ATA channel 0: Master: ad0 ATA/ATAPI revision 4 Slave: acd0 ATA/ATAPI revision 5 ATA channel 1: Master: ad2 ATA/ATAPI revision 6 Slave: acd1 ATA/ATAPI revision 5 ATA channel 2: Master: ad4 ATA/ATAPI revision 6 Slave: no device present ATA channel 3: Master: ad6 ATA/ATAPI revision 6 Slave: no device present # atacontrol mode 2 Master = UDMA100 Slave = BIOSPIO # atacontrol mode 3 Master = UDMA100 Slave = BIOSPIO dmesg: http://lists.freebsd.org/pipermail/freebsd-geom/2004-October/000350.html