Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jan 2008 00:08:27 +0200
From:      Diomidis Spinellis <dds@FreeBSD.org>
To:        freebsd-current@FreeBSD.org
Subject:   Re: Low NTFS read performance
Message-ID:  <4797BADB.7000802@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4797BADB.7000802>