Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
Have you tried testing dd with raw drive access (on the drive or partition, doesn't matter)? Note that testing that way will destroy the filesystem and will lose any data on it. It will bypass the NTFS drivers entirely. –  Bob Jun 30 '13 at 17:17
    
Yep I just did, the result is 149MB/s. –  Zulakis Jun 30 '13 at 17:20
    
Just out of curiosity I have to ask if this drive is one of those 4k drives and if therefore your filesystem might be unaligned somehow?! –  Waxhead Jun 30 '13 at 18:05
    
try bonnie++ and what kernel are you using? uname -r –  cybernard Jun 30 '13 at 18:25
1  
I believe that the free version of NTFS-3G is crippled so that it uses 4 KiB writes with no caching, causing extremely slow write performance on SSDs and USB drives. The company behind the driver suggests buying the commercial version for better performance. Apparently no-one cares enough to actually fix (and if necessary, fork) the open source version because this problem has been around for almost a decade, ever since NTFS-3G was first released. –  Tronic Mar 9 at 2:23

3 Answers 3

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

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.

share|improve this answer
    
How can I test if it is using DMA? Apart from this, I have already tried out all the suggestions on the page. –  Zulakis Jul 1 '13 at 13:53
    
Uhm, from what I have read, DMA is only relevant for IDE drives? I am only using SATA drives. –  Zulakis Jul 1 '13 at 13:58
    
According to en.wikipedia.org/wiki/Serial_ATA#Transport_layer it sounds like DMA is the only option for SATA. Lets find out if his bios is using ide emulation –  BeowulfNode42 Jul 2 '13 at 3:11

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.

Simply add the big_writes option, e.g.

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

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).

Closing notes:

  • the big_writes option probably won't help a 4K random write benchmark ;-)
  • While Tuxera seem to be reserving the pro NTFS driver for embeded system partners, Paragon offers an alternate free for personal useNTFS driver called NTFS&HFS for Linux 9.0 Express and a professional version. I don't however vouch for this product and when I tried a previous version (v8.5), I could not get it to work with my Linux Kernel version at the time.
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.