29

When copying large files or testing writespeed with dd, the max writespeed I can get is about 12-15MB/s on drives using the NTFS filesystem. I tested multiple drives (all connected using SATA) which all got writespeeds of 100MB/s+ on Windows or when formatted with ext4, so it's not an alignment or drive issue.

top shows high cpu usage for the mount.ntfs process.

AMD dual core processor (2.2 GHz)
Kernel version: 3.5.0-23-generic
Ubuntu 12.04
ntfs-3g version: both 2012.1.15AR.1 (Ubuntu default version) and 2013.1.13AR.2

How can I fix the writespeed?

Zulakis
  • 1,754

8 Answers8

24

Update: Use a newer version of Ubuntu. Newer versions of Ubuntu, e.g. 22.04+ should perform better and use bigger writes by default. Thanks to @dmitry-grigoryev who clarifies in an answer below that

big_writes was deprecated

If your version of fuse/libfuse < 3, then the original old solution provided here applies. To get the version.

fusermount -V

Solution for older Ubuntu systems (e.g. 20.04, supported until April 2025). Simply add the big_writes option, e.g.

sudo mount -o big_writes /dev/<device> /media/<mount_dir>

My Linux NAS with a low spec CPU now manages NTFS large file writes about three times faster. It improved from ~17MB/s to 50MB/s+. Even seen it peek at about 90MB/s in iotop which is probably near the external drives capability (a 2.5" USB3 HDD).

From the NTFS-3G man page:

 big_writes
              This option prevents fuse from splitting write buffers  into  4K
              chunks,  enabling  big  write buffers to be transferred from the
              application in a single step (up to some system limit, generally
              128K bytes).

A previous post was on the right track with the reference provided:

perhaps check here for ideas on what could be causing it. http://www.tuxera.com/community/ntfs-3g-faq/#slow

The original question mentions noticing the issue with large file transfers. In my experience with copying media files or doing backups, the key option in the above FAQ was:

Workaround: using the mount option “big_writes” generally reduces the CPU usage, provided the software requesting the writes supports big blocks.

Closing notes:

  • Paragon also offers an alternative @hi-angel's answer below provides more info if you have a newer Ubuntu version with kernel 5.15 and ntfs3 as an option.
  • Tuxera reserved the pro NTFS driver for embedded system partners and the open-sourced alternative wasn't as performant.
JPvRiel
  • 1,651
11

big_writes was deprecated in 2016, the corresponding behavior is always enabled when using libfuse version 3.0.0 or later. On a modern Linux system, poor NTFS performance usually means that:

  • the disk is fragmented
  • NTFS disk compression is enabled
  • inadequate mount options such as sync are used
2

Another likely reason is ntfs-3g you're using is slow by virtue of being a userspace driver. A kernel driver would be faster. So if you want a better speed, try the new ntfs3 driver (not to be confused with the older one called ntfs without the postfix 3). It was contributed into 5.15 Linux kernel by Paragon Software, so make sure you're using 5.15 or later.

To make use of ntfs3 when mounting, execute:

sudo mount /dev/sdX mnt/ -t ntfs3

Alternatively, if you want it in fstab, you may create an entry similar to this:

UUID=XXXXXXXXXXXXX   /path/to/mnt    ntfs3    defaults,uid=1000,gid=1000,force    0 0
Hi-Angel
  • 584
2

perhaps check here for ideas on what could be causing it. https://github.com/tuxera/ntfs-3g/wiki/NTFS-3G-FAQ

This sounds a bit like the 'old days' when file io was not using DMA by default. It's unlikely these days but is BIOS using IDE emulation for SATA drives? Because if it is emulating IDE then it may also be emulating non-DMA mode as well.

Another potential slow down is if ntfs file compression. Is compression enabled on the folder you are writing to? If it is, that will make any new files in that folder compressed as well.

Uschi
  • 18
  • 3
BeowulfNode42
  • 2,022
  • 2
  • 20
  • 25
0

This patch improves wrote performance for embedded devices: https://www.lysator.liu.se/~nietzsche/ntfs/

0

For me under XFCE, I was observing this problem with external USB mass storage automounted via Thunar's volman. Check /etc/udisks2/mount_options.conf . Uncomment the [defaults] section label and modify ntfs_allow and ntfs_defaults to suit your needs. After that, you still need to restart the service: systemctl restart udisks2 (maybe gracefully eject your removable volumes first, before this operation)

...and then I realized that it was really my shingled HDD that was slow, in that external USB enclosure :-(

frr
  • 303
0

This is an old thread, but for people looking for a solution to the same problem: do you have cpuspeed active? ntfs-3g is CPU-hungry and in my case cpuspeed mistakenly detected a low load for processes with lots of IO waits, eventually throttling down the core and starving the driver.

Try disabling cpuspeed (if e.g. it is running as a service) and test again.

irisx
  • 1
-1

NTFS isn't fast as EXT4.

You will always face the "fragmentation" that the Windows system has.

EXT4 can support individual files up to 16 terabytes, and volumes up to one exabyte in size. But, one of the aspects of EXT4 which contributes to better performance, though, is that EXT4 can handle a larger extents-a range of contiguous physical blocks of data. This allows it to work better with large files and reduce drive fragmentation.

Other factors include the allocate-on-flush technique used by EXT4. By delaying the allocation of data blocks until the data is ready to be written to disk, EXT4 improves performance and reduces fragmentation compared to file systems that allocate blocks earlier.

If you are not a windows user, EXT4 is strongly recommended, OSX has extFS, we don't need to follow the Windows Standard because it supports windows.

Unless you usually(daily) swap around the external USB onto the Windows system and Linux system, I will reformat the drive to EXT4.

Seandex
  • 179