From owner-freebsd-questions@FreeBSD.ORG Sat Jul 21 21:47:37 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98FDA16A417 for ; Sat, 21 Jul 2007 21:47:37 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from eskimo.tundraware.com (eskimo.tundraware.com [66.92.130.161]) by mx1.freebsd.org (Postfix) with ESMTP id 3CDC213C4B5 for ; Sat, 21 Jul 2007 21:47:37 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from [192.168.0.2] (ozzie.tundraware.com [66.92.130.199]) (authenticated bits=0) by eskimo.tundraware.com (8.14.1/8.14.1) with ESMTP id l6LLlJ2i062393 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Sat, 21 Jul 2007 16:47:19 -0500 (CDT) (envelope-from tundra@tundraware.com) Message-ID: <46A27EE2.8060204@tundraware.com> Date: Sat, 21 Jul 2007 16:47:14 -0500 From: Tim Daneliuk Organization: TundraWare Inc. User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: Dan Nelson References: <46A22253.8080100@tundraware.com> <20070721165539.GA2579@dan.emsphone.com> In-Reply-To: <20070721165539.GA2579@dan.emsphone.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-tundraware.com-MailScanner-Information: Please contact the ISP for more information X-tundraware.com-MailScanner: Found to be clean X-tundraware.com-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.399, required 1, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-tundraware.com-MailScanner-From: tundra@tundraware.com X-Spam-Status: No Cc: FreeBSD Mailing List Subject: Re: SATA 300 Drive Being Run At 150 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: tundra@tundraware.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2007 21:47:37 -0000 Dan Nelson wrote: > In the last episode (Jul 21), Tim Daneliuk said: >> I asked this question a while back, but needed to do more digging to make >> sure I had latest sources etc. >> >> I have an Intel motherboard that shows this for a SATA controller: >> >> atapci1: port 0x20c8-0x20cf,0x20ec-0x20ef,0x20c0-0x20c7,0x20e8-0x20eb,0x20a0-0x20af mem 0x90204000-0x902043ff irq 19 at device 31.2 on pci0 >> >> But the hard drive - a SATA 300 device - shows up like this: >> >> ad4: 238475MB at ata2-master SATA150 >> ^^^^^^^ >> Using dd, I have confirmed that the drive is running nowhere near >> SATA-III speeds, at least on reads: >> >> 968470075 bytes transferred in 7.132891 secs (135775249 bytes/sec) > > What was your dd commandline? If you've got more than 1GB of RAM and > tested by reading a file and not the raw device itself, you just tested > FreeBSD buffer cache. I just did: dd if=abigfile of=/dev/null But, you're right, cacheing does make things look better, so I did this: dd if=/dev/ad4s1 of=/dev/null count=100000 100000+0 records in 100000+0 records out 51200000 bytes transferred in 9.569672 secs (5350236 bytes/sec) Hmmm ... that seems slow, then again, 512b is a silly block size. How about: dd if=/dev/ad4s1 of=/dev/null count=100000 bs=1024 100000+0 records in 100000+0 records out 102400000 bytes transferred in 9.916191 secs (10326546 bytes/sec) Better, but really, the block size should be even bigger in today's reality: dd if=/dev/ad4s1 of=/dev/null count=100000 bs=4096 100000+0 records in 100000+0 records out 409600000 bytes transferred in 13.556418 secs (30214471 bytes/sec) So, going for broke: dd if=/dev/ad4s1 of=/dev/null count=10000 bs=32768 10000+0 records in 10000+0 records out 327680000 bytes transferred in 5.051286 secs (64870609 bytes/sec) (I got similar results for 16K blocks, so this would appear to be the max for this combination of drive/controller/OS overhead.) Not bad, and in line with your observation below about the max sustained speed of the drive's buffer to disk. According to > http://www.wdc.com/en/products/productspecs.asp?driveid=135 , that > drive's maximum sustained speed is only 93.5 MB/sec, so it doesn't It's actually less than that, since there is some overhead needed for serial transfer beyond just the 8 bits of data. The max speed is probably more like 75 MB/sec. > really matter if your interface is running at SATA150 or SATA300 unless > you plan on reading exclusively from its 8MB buffer :) > Point taken - and I never expected to see a full 300MB/sec throughput. But ... I *am* curious why the interfaces are not running at full speed, since both drive and controller are SATA-300 devices. The theory of the moment is thus that the drive cable can't handle SATA-300. We'll see. Thanks for your time ... -- ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/