From owner-freebsd-current@FreeBSD.ORG Wed Jan 23 22:34:58 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 9F8C616A419 for ; Wed, 23 Jan 2008 22:34:56 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from mx-out.forthnet.gr (mx-out.forthnet.gr [193.92.150.104]) by mx1.freebsd.org (Postfix) with ESMTP id 306CF13C447 for ; Wed, 23 Jan 2008 22:34:55 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from mx-av-02.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-02.forthnet.gr (8.14.0/8.14.0) with ESMTP id m0NM8WvK000725 for ; Thu, 24 Jan 2008 00:08:32 +0200 Received: from MX-IN-03.forthnet.gr (mx-in-05.forthnet.gr [193.92.150.32]) by mx-av-02.forthnet.gr (8.14.1/8.14.1) with ESMTP id m0NM8W6j017259 for ; Thu, 24 Jan 2008 00:08:32 +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 m0NM8UsA011227 for ; Thu, 24 Jan 2008 00:08:31 +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: <4797BADB.7000802@FreeBSD.org> Date: Thu, 24 Jan 2008 00:08:27 +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 Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: quoted-printable 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:34:58 -0000 Diomidis Spinellis wrote in freebsd-stable@: > I can't get an Ultrium-2 LTO drive to stream, and (I think) I've traced= =20 > the problem to the read performance of the USB2-attached NTFS disk, and= =20 > specifically the NTFS filesystem. I'm reading a single 190GB file, and= =20 > the throughput I'm getting is 5.4MB/s: >=20 > $ dd if=3Dad2c.dump of=3D/dev/null bs=3D1M > ^=D4 > load: 0.04 cmd: dd 1434 [biord] 0.00u 4.78s 2% 1672k > 610+0 records in > 610+0 records out > 639631360 bytes transferred in 117.937613 secs (5423472 bytes/sec) >=20 > The is an old but relatively fast machine >=20 > CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2407.18-MHz 686-class CPU) >=20 > running 7.0-RC1: >=20 > $ uname -a > FreeBSD icarian.dmst.aueb.gr 7.0-RC1 FreeBSD 7.0-RC1 #0: Mon Dec 24=20 > 12:18:24 UTC 2007=20 > root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >=20 > and the load during the read remains comfortably low: >=20 > $ uptime > 6:34PM up 3:50, 3 users, load averages: 0.09, 0.04, 0.04 >=20 > Reading from the raw device tripples the performance: >=20 > # dd if=3D/dev/da0s1 bs=3D1m of=3D/dev/null > 533725184 bytes transferred in 34.777460 secs (15346871 bytes/sec) >=20 > bringing it on par with what I get from Windows (on a different machine= ): >=20 > F:\>dd if=3Dother.20051007.tgz of=3D/dev/null bs=3D1M > 1231030919 bytes (1.2 GB) copied, 82.845 s, 14.9 MB/s >=20 > [...] >=20 > I'd appreciate any suggestions you may have. Today I upgraded the machine to 8.0-CURRENT, and obtained similar result= s: - 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=20 slower than reading from the raw device and suggestions for improving=20 the performance. I'd also be happy to work on improving the situation,=20 if I get any pointers on where to start. Diomidis Spinellis - http://www.spinellis.gr