From owner-freebsd-current@FreeBSD.ORG Sun Sep 26 00:25:54 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 9016916A4CE for ; Sun, 26 Sep 2004 00:25:54 +0000 (GMT) Received: from mail-fs.sunrise.ch (mta-fs-be-04.sunrise.ch [194.158.229.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id E590B43D41 for ; Sun, 26 Sep 2004 00:25:53 +0000 (GMT) (envelope-from triulzi@freesurf.ch) Received: from [62.167.66.149] (62.167.66.149) by mail-fs.sunrise.ch (7.0.028) id 4125B06200FC4A8B; Sun, 26 Sep 2004 02:25:50 +0200 Message-ID: <41560C61.1040009@freesurf.ch> Date: Sun, 26 Sep 2004 02:25:05 +0200 From: Mauro Triulzi User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040906) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeremy Chadwick References: <4155DC3F.5070904@freesurf.ch> <20040925214515.GA56471@parodius.com> In-Reply-To: <20040925214515.GA56471@parodius.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org Subject: Re: ATA disk performance (ICH2 controller), some tests andcomparison 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: Sun, 26 Sep 2004 00:25:54 -0000 Jeremy Chadwick wrote: >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. > > Many thanks for your piece of advice. You and Arne got it right, I have 755 MB Ram. I apologize for my naive approach. Nevertheless I repeated the benchmarks this time with bonnie before and after the ATA channel re-init: i) Before re-init foo# bonnie -s 1500 File './Bonnie.2561', size: 1572864000 Writing with putc()...done Rewriting...done Writing intelligently...done Reading with getc()...done Reading intelligently...done Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done... -------Sequential Output-------- ---Sequential Input-- --Random-- -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks--- Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU 1500 14533 12.8 14184 4.6 9360 3.2 27774 24.0 29067 5.7 119.1 0.6 ii) ATA channell re-init foo# atacontrol reinit 0 Master: ad0 ATA/ATAPI revision 6 Slave: no device present and then iii) After re-init foo# bonnie -s 1500 File './Bonnie.2582', size: 1572864000 Writing with putc()...done Rewriting...done Writing intelligently...done Reading with getc()...done Reading intelligently...done Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done... -------Sequential Output-------- ---Sequential Input-- --Random-- -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks--- Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU 1500 27787 24.6 24690 8.3 12519 4.3 24487 21.4 24870 5.0 128.1 0.6 iv) Bonnie in Linux 2.6.5 triulzi@linux:~/temp/bonnie> ./Bonnie -s 1500 Bonnie 1.4: File './Bonnie.2732', size: 1572864000, volumes: 1 Writing with putc()... done: 26859 kB/s 97.7 %CPU Rewriting... done: 22480 kB/s 8.1 %CPU Writing intelligently... done: 59118 kB/s 14.0 %CPU Reading with getc()... done: 22508 kB/s 78.9 %CPU Reading intelligently... done: 48501 kB/s 9.0 %CPU Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done... ---Sequential Output (nosync)--- ---Sequential Input-- --Rnd Seek- -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --04k (03)- Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU linux 1*1500 26859 97.7 59118 14.0 22480 8.1 22508 78.9 48501 9.0 177.1 0.5 v) Comments After re-init are the write and read performance per character in Linux and FreeBSD very similar. Block-write, Block-read and rewrite are much better in Linux. As Frode Nordahl rightly said are Linux and FreeBSD on different parts of the disk and so it's not easy to compare I/O performance, but I don't think that this explains such a difference.