How to Fix Raspberry Pi Slow USB Drive Write Speed Problem
A simple guide to fix the super slow USB HDD write speed on Raspberry Pi
One thing I notice after owning some Rapsberry Pis for about 4 years, the default write speed on one of its USB port is very slow, especially when you attach an external HDD with NTFS format.
To see what I mean, let’s check the write speed directly.
I assume you’re using Raspbian, or its derivative, as the OS.
First, change the working directory to your attached usb drive.
Then we can simulate file writing using dd
tool.
The following command will create binary file called test.bin
with 1000 MB of size (or roughly 1 GB).
As you can see, the last line is the avergage write speed when performing dd
command.
It’s only 1.4 MB/s!
That’s slower than my fiber optic internet.
The results may vary for everyone, but you get the idea how slow it is.
To solve this, we need to remove sync
from MOUNTOPTIONS
variable.
This variable is written at /etc/usbmount/usbmount.conf
file.
So let’s open the file and modify it.
Find MOUNTOPTIONS
variable declaration.
The default text will look like following snippet.
Next, remove sync
text from it.
After you’ve done that, the text will look like following snippet.
Save and close your editor. Then reboot your Raspberry pi.
To see the updated speed, let’s test it again with dd
similar with previous test.
Now as you can see, the new write speed become 23.8 MB/s! It’s 17x times faster than previous test. That should be normal speed for an external HDD attached to USB 2.0 port.
That’s all I can write today. As always, thanks for reading. Will post more articles like this in the future.
References
- RPi3 extremely slow usb hard drive write speed - Raspberry Pi Forums
- Poor writing performance with new 2TB drive
Cover Photo by Harrison Broadbent on Unsplash