From owner-freebsd-current@FreeBSD.ORG Wed Jan 23 22:31:04 2008 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CE3E16A418 for ; Wed, 23 Jan 2008 22:31:03 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from mx-out-05.forthnet.gr (mx-out.forthnet.gr [193.92.150.104]) by mx1.freebsd.org (Postfix) with ESMTP id 2323B13C4D9 for ; Wed, 23 Jan 2008 22:31:02 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from mx-av-04.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-05.forthnet.gr (8.13.8/8.13.8) with ESMTP id m0NMV1h2018102 for ; Thu, 24 Jan 2008 00:31:01 +0200 Received: from MX-IN-03.forthnet.gr (mx-in-05.forthnet.gr [193.92.150.32]) by mx-av-04.forthnet.gr (8.14.1/8.14.1) with ESMTP id m0NMV165008044 for ; Thu, 24 Jan 2008 00:31:01 +0200 Received: from [192.168.136.22] (ppp144-181.adsl.forthnet.gr [62.1.135.181]) by MX-IN-03.forthnet.gr (8.14.2/8.14.2) with ESMTP id m0NMUv55000616 for ; Thu, 24 Jan 2008 00:30:58 +0200 Authentication-Results: MX-IN-03.forthnet.gr smtp.mail=dds@FreeBSD.org; spf=permerror Authentication-Results: MX-IN-03.forthnet.gr header.from=dds@FreeBSD.org; sender-id=permerror Message-ID: <4797C01E.1010807@FreeBSD.org> Date: Thu, 24 Jan 2008 00:30:54 +0200 From: Diomidis Spinellis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070509 SeaMonkey/1.1.2 MIME-Version: 1.0 To: freebsd-current@FreeBSD.org References: <4797BADB.7000802@FreeBSD.org> In-Reply-To: <4797BADB.7000802@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Low NTFS read performance X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 23 Jan 2008 22:31:04 -0000 Diomidis Spinellis wrote: > Diomidis Spinellis wrote in freebsd-stable@: >> I can't get an Ultrium-2 LTO drive to stream, and (I think) I've >> traced the problem to the read performance of the USB2-attached NTFS [...] >> I'd appreciate any suggestions you may have. > > Today I upgraded the machine to 8.0-CURRENT, and obtained similar results: > - 5372041 bytes/sec reading an NTFS file > - 15369758 bytes/sec reading from the raw device > > The raw/FS read performance difference with UFS is a lot lower: > - 33162654 bytes/sec reading a UFS file > - 47221133 bytes/sec reading from the raw device > > I'd welcome any ideas on why the NTFS layer makes reading three time > slower than reading from the raw device and suggestions for improving > the performance. I'd also be happy to work on improving the situation, > if I get any pointers on where to start. [Apologies for talking to myself.] It looks like the problem is the small (4K) block size NTFS uses for its requests. iostat -t da -zx -w 1 NTFS file: device r/s w/s kr/s kw/s wait svc_t %b da0 1329.6 0.0 5318.5 0.0 1 0.7 95 Raw device: device r/s w/s kr/s kw/s wait svc_t %b da0 234.8 0.0 15024.4 0.0 1 6.3 100 iostat -z -w1 NTFS file: tty ad0 da0 cpu tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id 0 77 0.00 0 0.00 4.00 1324 5.17 0 0 1 0 99 0 78 0.00 0 0.00 4.00 1331 5.20 0 0 1 0 99 0 78 0.00 0 0.00 4.00 1322 5.16 0 0 0 0 100 0 79 0.00 0 0.00 4.00 1331 5.20 0 0 0 0 100 Raw device: tty ad0 da0 cpu tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id 0 228 8.00 1 0.01 64.00 236 14.73 0 0 0 0 100 0 78 0.00 0 0.00 64.00 235 14.67 0 0 0 0 100 0 78 0.00 0 0.00 64.00 235 14.67 0 0 0 0 100 0 78 0.00 0 0.00 64.00 235 14.67 0 0 0 0 100 Diomidis Spinellis - http://www.spinellis.gr