Low NTFS read performance

Diomidis Spinellis dds at FreeBSD.org
Tue Jan 22 09:17:36 PST 2008


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 disk, and 
specifically the NTFS filesystem.  I'm reading a single 190GB file, and 
the throughput I'm getting is 5.4MB/s:

$ dd if=ad2c.dump of=/dev/null bs=1M
^Τ
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)

The is an old but relatively fast machine

CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2407.18-MHz 686-class CPU)

running 7.0-RC1:

$ uname -a
FreeBSD icarian.dmst.aueb.gr 7.0-RC1 FreeBSD 7.0-RC1 #0: Mon Dec 24 
12:18:24 UTC 2007 
root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

and the load during the read remains comfortably low:

$ uptime
  6:34PM  up  3:50, 3 users, load averages: 0.09, 0.04, 0.04

Reading from the raw device tripples the performance:

# dd if=/dev/da0s1 bs=1m of=/dev/null
533725184 bytes transferred in 34.777460 secs (15346871 bytes/sec)

bringing it on par with what I get from Windows (on a different machine):

F:\>dd if=other.20051007.tgz of=/dev/null bs=1M
1231030919 bytes (1.2 GB) copied, 82.845 s, 14.9 MB/s

These are some (vaguely) relevant parts of dmesg:

ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb2: EHCI version 0.95
usb2: companion controllers, 3 ports each: usb0 usb1
usb2: <NEC uPD 720100 USB 2.0 controller> on ehci0
usb2: USB revision 2.0
uhub2: <NEC EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb2
uhub2: 5 ports with 5 removable, self powered
[...]
ad0: 76319MB <WDC WD800JB-00CRA1 17.07W17> at ata0-master UDMA100
acd0: DVDROM <DVD-ROM BDV316C/VER .20R> at ata1-master UDMA33
acd1: DVDR <SONY DVD RW DW-U10A/1.1d> at ata1-slave UDMA33
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <WDC WD32 00JB-00KFA0 \\0000\\0000> Fixed Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: 305245MB (625142448 512 byte sectors: 255H 63S/T 38913C)
GEOM_LABEL: Label for provider da0s1 is ntfs/Backup.
Trying to mount root from ufs:/dev/ad0s2a
GEOM_LABEL: Label ntfs/Backup removed.
GEOM_LABEL: Label for provider da0s1 is ntfs/Backup.

I'd appreciate any suggestions you may have.

Diomidis Spinellis - http://www.spinellis.gr



More information about the freebsd-stable mailing list