I'm getting very poor write performance on an external USB HDD that has an NTFS partition.
I know that the sync option can slow down NTFS quite a lot, but that option isn't on for me: rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2
. As far as I know, big_writes
is no longer necessary since it is on by default in the ntfs-3g driver. What can I do to improve performance?
Here's the result of a disk benchmark:
KDiskMark (3.1.3): https://github.com/JonMagon/KDiskMark
Flexible I/O Tester (fio-3.34): https://github.com/axboe/fio
---------------------------------------------
* MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s]
* KB = 1000 bytes, KiB = 1024 bytes
[Read]
Sequential 1 MiB (Q= 8, T= 1): 5683.719 MB/s [ 5550.5 IOPS] < 1417.53 us>
Sequential 1 MiB (Q= 1, T= 1): 6310.817 MB/s [ 6162.9 IOPS] < 161.15 us>
Random 4 KiB (Q= 32, T= 1): 755.180 MB/s [ 188795.1 IOPS] < 169.29 us>
Random 4 KiB (Q= 1, T= 1): 753.670 MB/s [ 188417.6 IOPS] < 5.17 us>
[Write]
Sequential 1 MiB (Q= 8, T= 1): 11.009 MB/s [ 10.8 IOPS] < 2564.91 us>
Sequential 1 MiB (Q= 1, T= 1): 10.485 MB/s [ 10.2 IOPS] < 238.27 us>
Random 4 KiB (Q= 32, T= 1): 6.108 MB/s [ 1527.0 IOPS] < 377.90 us>
Random 4 KiB (Q= 1, T= 1): 4.234 MB/s [ 1058.5 IOPS] < 11.58 us>
Profile: Default
Test: 1 GiB (x5) [Measure: 5 sec / Interval: 5 sec]
Date: 2023-06-18 13:37:59
OS: org.kde.Platform 5.15-21.08 [linux 5.19.0-45-generic]
~~The read performance looks very high (too high?), but the write performance is abysmal, and this speed is similar to what I was getting with rsync.~~ The above results are obviously incorrect as there is no way an HDD connected over USB3 could achieve such read speeds. Ignore the read speeds, but the write speeds seem to match what I got in practice.
The performance is normal on Windows:
---------------------------------------------
CrystalDiskMark 8.0.4 x64 (C) 2007-2021 hiyohiyo
Crystal Dew World: https://crystalmark.info/
---------------------------------------------
* MB/s = 1,000,000 bytes/s [SATA/600 = 600,000,000 bytes/s]
* KB = 1000 bytes, KiB = 1024 bytes
[Read]
SEQ 1MiB (Q= 8, T= 1): 68.943 MB/s [ 65.7 IOPS] <120142.86 us>
SEQ 1MiB (Q= 1, T= 1): 65.787 MB/s [ 62.7 IOPS] < 15884.81 us>
RND 4KiB (Q= 32, T= 1): 1.068 MB/s [ 260.7 IOPS] <118571.44 us>
RND 4KiB (Q= 1, T= 1): 0.422 MB/s [ 103.0 IOPS] < 9676.17 us>
[Write]
SEQ 1MiB (Q= 8, T= 1): 93.746 MB/s [ 89.4 IOPS] < 84761.63 us>
SEQ 1MiB (Q= 1, T= 1): 69.955 MB/s [ 66.7 IOPS] < 13087.88 us>
RND 4KiB (Q= 32, T= 1): 5.369 MB/s [ 1310.8 IOPS] < 24361.27 us>
RND 4KiB (Q= 1, T= 1): 5.588 MB/s [ 1364.3 IOPS] < 730.32 us>
Profile: Default
Test: 1 GiB (x5) [E: 88% (1229/1397GiB)]
Mode: [Admin]
Time: Measure 5 sec / Interval 5 sec
Date: 2023/07/09 14:33:14
OS: Windows 11 [10.0 Build 22621] (x64)