From owner-freebsd-performance@FreeBSD.ORG Mon May 2 22:19:11 2005 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B69E16A4D6 for ; Mon, 2 May 2005 22:19:11 +0000 (GMT) Received: from web41205.mail.yahoo.com (web41205.mail.yahoo.com [66.218.93.38]) by mx1.FreeBSD.org (Postfix) with SMTP id D198243D68 for ; Mon, 2 May 2005 22:19:10 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Received: (qmail 36687 invoked by uid 60001); 2 May 2005 22:19:10 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=aV35ZJ/F8peD2d2jbr3aFmu6PKJWkYJHkzIQ9zLzTGqfiO8sXd/U+prhxoDEYZxwNLSvfT/Zs5bL4l2QQywcRzTlBhTG4uejwAWNdscUgy+HH1KRMo3tP2VojrjtRyWZoRJjCQTcMiMm1SRCH0h1SOxLDDlLFA/C78H65fyMzhI= ; Message-ID: <20050502221910.36685.qmail@web41205.mail.yahoo.com> Received: from [213.54.148.161] by web41205.mail.yahoo.com via HTTP; Mon, 02 May 2005 15:19:10 PDT Date: Mon, 2 May 2005 15:19:10 -0700 (PDT) From: Arne "Wörner" To: Steven Hartland , Poul-Henning Kamp In-Reply-To: <00fe01c54f61$df220d60$b3db87d4@multiplay.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: Eric Anderson cc: freebsd-performance@freebsd.org cc: Robert Watson Subject: Re: Very low disk performance on 5.x X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2005 22:19:11 -0000 --- Steven Hartland wrote: > ----- Original Message ----- > From: "Poul-Henning Kamp" > > On -current and 5.4 you don't have to make partitions if you > > intend to use the entire disk (and provided you don't want > > to boot from it). You can simply: > > > > newfs /dev/da0 > > mount /dev/da0 /where_ever > > /dev/da0: 1526216.3MB (3125691008 sectors) block size 16384, > fragment size 2048 > using 8306 cylinder groups of 183.77MB, 11761 blks, 23552 > inodes. > mount /dev/da0 /mnt > > dd if=/dev/zero of=/mnt/testfile bs=64k count=100000 > 100000+0 records in > 100000+0 records out > 6553600000 bytes transferred in 44.424588 secs (147521908 > bytes/sec) > > /usr/bin/time -h dd of=/dev/null if=/mnt/testfile bs=64k > count=100000 > 100000+0 records in > 100000+0 records out > 6553600000 bytes transferred in 48.150473 secs (136106658 > bytes/sec) > 48.27s real 0.01s user 12.33s > sys > > /usr/bin/time -h cat /mnt/testfile > /dev/null > 48.12s real 0.26s user 14.92s > sys > > Raw read: > /usr/bin/time -h dd of=/dev/null if=/dev/da0 bs=64k count=100000 > > 100000+0 records in > 100000+0 records out > 6553600000 bytes transferred in 32.028544 secs (204617482 > bytes/sec) > 32.02s real 0.02s user 2.73s > sys > > /usr/bin/time -h dd of=/dev/null if=/dev/da0 bs=1m count=6000 > 6000+0 records in > 6000+0 records out > 6291456000 bytes transferred in 31.518195 secs (199613460 > bytes/sec) > 31.51s real 0.00s user 1.87s > sys > > > One thing you could try is to use a larger block/fragment size > > on your filesystem. Try: > > > > newfs -b 32768 -f 4096 /dev/da0 > /dev/da0: 1526216.3MB (3125691008 sectors) block size 32768, > fragment size 4096 > using 2063 cylinder groups of 740.00MB, 23680 blks, > 47360 inodes. > > /usr/bin/time -h dd if=/dev/zero of=/mnt/testfile bs=64k > count=100000 > 100000+0 records in > 100000+0 records out > 6553600000 bytes transferred in 35.237328 secs (185984590 > bytes/sec) > 35.34s real 0.07s user 28.81s > sys > > /usr/bin/time -h dd of=/dev/null if=/mnt/testfile bs=64k > count=100000 > 100000+0 records in > 100000+0 records out > 6553600000 bytes transferred in 39.154845 secs (167376477 > bytes/sec) > 39.16s real 0.01s user 14.33s > sys > > Slower than the default :( > Why? It looks like the 32k-bs-fs terminates 20% earlier than the 16k-bs-fs. Furthermore I would like to re-interpret my analysis about my hard disc /dev/ad0: It looks like, I damaged the write cache somehow... atacontrol's output is not consistent in this point (it changes from reboot to reboot, while the write rate is always 5 times lower than the read rate), while hw.ata.wc is always 1. So I just see, that there is some overhead. Example: my /dev/ad1: 92MB/sec theoretical maximum (data transfer rate from the medium (disc) to device's buffer) 60MB/sec if I read bs=128k 40MB/sec if I read from a ufs+s with std bs (16kB?) -Arne __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com