Low NTFS read performance
Diomidis Spinellis
dds at FreeBSD.org
Wed Jan 23 14:31:04 PST 2008
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
More information about the freebsd-current
mailing list