Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extremely slow NTFS write performance
09-16-2012, 10:29 PM
Post: #1
Extremely slow NTFS write performance
My Raspberry Pi is connected to a 3TB NTFS-formatted hard disk drive (Seagate "FreeAgent GoFlex Desk" with the USB 2.0 interface) which stores all of my media. Read performance is generally good but writing is extremely slow - as a test I tried copying a 100MB file over the network to the Raspberry Pi (so I could see the transfer speed). This took under 20 seconds when copying to the SD card, but over half an hour when copying to the NTFS hard disk drive (peaking at around 55KB/s). In addition, when writing the drive is very noisy (at least in comparison to when it is connected to my Windows PC).

I don't believe the issue is network-related as I first became aware of it when attempting to use the XBMC Backup add-on to save my settings - it ran for over an hour but had only copied around 50MB data when I finally cancelled it.

Is this sluggish write performance unavoidable or can something be done to improve it?
Find all posts by this user
Quote this message in a reply
09-16-2012, 10:37 PM (This post was last modified: 09-16-2012 11:33 PM by Quonith.)
Post: #2
RE: Extremely slow NTFS write performance
Sounds like the same problem I had (HERE)

I fixed it in the end by adding a line to /etc/fstab
Code:
UUID=<Drive UUID here> /media/usb0 ntfs noatime 0 0
Don't know why that fixed it, but it did.
Find all posts by this user
Quote this message in a reply
09-16-2012, 11:21 PM
Post: #3
RE: Extremely slow NTFS write performance
That does indeed sound like an identical problem (I couldn't find your thread as I was looking for NTFS), and your fix works for me too (I'm getting just over 1MB/s when copying now). Many thanks!
Find all posts by this user
Quote this message in a reply
09-17-2012, 01:02 PM
Post: #4
RE: Extremely slow NTFS write performance
Yeah! I've had the same problem for some days now and didn't find any solution!

How to obtain the UUID of your drives:
sudo blkid /dev/sda1

thx a lot
Find all posts by this user
Quote this message in a reply
09-30-2012, 03:52 PM
Post: #5
RE: Extremely slow NTFS write performance
Quonith you wonderful, sexy person. I've been struggling with this for a while now and this has solved it. Write speed increased from ~25kb/s to ~1.5MB/s (also with a Seagate 3TB). Thank you!
Find all posts by this user
Quote this message in a reply
10-01-2012, 05:45 AM
Post: #6
RE: Extremely slow NTFS write performance
For those interested, the reason why that particular line in fstab fixes this problem is because of a "feature" of Linux known as atime, or access time. By default, whenever a file is read, it's access time is updated, by writing to the drive. Since writes are much slower than reads, this has the potential to slow things down a lot.

But you are writing anyways, how could this make things slow? There was probably something else accessing the drive, or for some reason copying to the drive also induced reads as well as writes. Because a harddrive works by moving a magnetic head over a spinning disk, it takes time to move between two sections on the disk. So because reading and writing was happening in many different parts of the disk, it was thrashing, or spending most of it's time moving around, and not a lot of time reading/writing.

The option 'noatime' disables updating the access time when files are read. Some very old software relies on this feature, but I don't know of any modern software that relies on it, so this modification is perfectly safe, and I would recommend it on any linux based system.
Find all posts by this user
Quote this message in a reply
10-01-2012, 02:43 PM
Post: #7
RE: Extremely slow NTFS write performance
Thanks for the info mythmon, will bear it in mind if I hit similar problems on other linux setups.
Find all posts by this user
Quote this message in a reply
11-18-2012, 10:10 PM
Post: #8
RE: Extremely slow NTFS write performance
Is this suppose to work with RC5?? I tried this fix because my smb speed is painfully slow, 500 kb/s, but now my drive won't mount at startup. Comparing to speed listed on raspberrypi.org forum, it's deceiving....

Anyone know Why??
Find all posts by this user
Quote this message in a reply
11-30-2012, 07:34 AM (This post was last modified: 11-30-2012 08:03 AM by bduerst.)
Post: #9
RE: Extremely slow NTFS write performance
(11-18-2012 10:10 PM)nickunk Wrote:  Is this suppose to work with RC5?? I tried this fix because my smb speed is painfully slow, 500 kb/s, but now my drive won't mount at startup. Comparing to speed listed on raspberrypi.org forum, it's deceiving....

Anyone know Why??

Ugh, I had to go through silly registration with this forum to answer your question. Guess I'm registered here now.

What happened is you didn't mount the drive properly in the fstab file. The same happened to me, but then I followed this walkthrough:

http://kwilson.me.uk/blog/force-your-ras...starts-up/

and the drive mounted properly at startup, and I could see it when I typed "df". The UUID mounting didn't work, but using the identified file extension (/dev/sda1/ for me) worked.

To stop the atime, follow the walkthrough, and then when you put your line in fstab, be be sure to put "defaults,noatime" instead of "defaults" for the settings in the settings column of your line.

Also, if anyone is still experiencing speed problems after setting to noatime, then make sure you aren't connecting via sftp. Sftp is encrypted, and the raspbmc cpu will be a bottleneck - so make sure you connect via ftp, not sftp.

Good luck!
Find all posts by this user
Quote this message in a reply
03-28-2013, 07:42 PM
Post: #10
RE: Extremely slow NTFS write performance
Hi, I also thought that I have a problem with slow USB, max speed that I get while copying from laptop to USB drive connected to raspberry or while copying between two USB drives connected to raspberry, is ~1.5 MB/s, which is quite slow compared to the speed that I get on my windows laptop (~20 MB/s). I am quite surprised that you seem to be happy with 1 MB/s speed...is this maximum what I can get from raspberry? If yes, why?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Sponsored Advertisement