Nr90
Posts: 216
Joined: Sat Nov 26, 2011 12:39 pm

SD vs USB HDD performance

Mon Jun 11, 2012 1:42 am

Dear all,
As the arrival date of my RPi is (hopefully) approaching I am weighing my options on what storage to use.

My options:
- The standard SD route. I picked up a sandisk extreme class 10 card (32 gb). This unit is rated at 45 Mbps, however it appears to need the latest firmware to work (like many class 10 cards). With the RPi being unable to use the low voltage with these cards I do not see it hitting that 45 Mbps.
- An old USB HD I have lying around. This is Freecom 27030. Specs:
USB 2.0
160 gb
7200 rpm
Supposedly it's 60 Mbps.

My planned use will be some general purpose computing, torrent server, media center and some programming in vim. I'll most likely run Arch as that is what my laptop and desktop run.

My thoughts so far:
The HD obviously has more storage.
The HD is pretty big, so it'll make the RPi less mobile. This is not a huge issue for me.

Then there's the speed. Will this aging hard drive be much faster then the SD card in real use? Taking into account that it'll also use Ethernet and wireless keyboard + mouse over USB.

I would appreciate any (hopefully educated) guesses :D

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: SD vs USB HDD performance

Mon Jun 11, 2012 6:19 am

I am currently running my system of an old 2.5" IDE drive recycled from a notebook and put into a USB case. After the initial boot from the SD card the system runs completely from the HD. This gives noticeably better performance than running off the SD card.

Having said that, I gather from forum messages that significant strides have been made recently at the kernel level that should significantly boost SD card performance. This may mean that the performance advantages of using the HD disappear. If that becomes the case then I intend to ditch using the HD as running purely from the SD card would be much more convenient.

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: SD vs USB HDD performance

Mon Jun 11, 2012 7:11 am

itimpi wrote:I gather from forum messages that significant strides have been made recently at the kernel level that should significantly boost SD card performance. This may mean that the performance advantages of using the HD disappear. If that becomes the case then I intend to ditch using the HD as running purely from the SD card would be much more convenient.
A USB HDD will always be faster than pretty much any SD card, no matter how fast the card is. HDD I/O speeds start around 20 MB/s, especially for writes, while SD cards generally max out writes in the 15 ~ 17 MB/s range. HDD reads on modern drives can easily exceed the ~60 MB/s burst speed maximum limited by the USB 2.0 interface (480 Mbits/s, which is never actually achieved for more than a handful of bytes in sequence). HDDs also have significant-sized RAM buffers that help them maintain hefty sustained I/O (upwards of 120 MB/s on higher-end drives), overcoming their inherent seek-time delays as the drive waits for the next sector to become positioned under the read-write head(s).

The USB bus on the Pi is shared by however many USB devices are attached, as well as the Ethernet port, due to the combined controller used on the Pi, so, sustained storage device speed rapidly becomes constrained below ~20 MB/s on even the fastest SD cards. People just need to realize that cost was always the number one design consideration on the Pi whenever more than one criterion had to be traded off. There's a very good reason the word "fast" doesn't appear anywhere in the Foundation's motto, "An ARM GNU/Linux box for $25. Take a byte!" - emphasis on the words "a byte" ;)
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: SD vs USB HDD performance

Mon Jun 11, 2012 7:58 am

I agree that if you are talking about the performance of HD hardware against SD hardware, then I agree that HD wins out. However when you throw other factos into consideration it not always the raw HD speed that is the dominant factor. In this case I am talking about the effective performance of a HD in a USB case attached via USB to the Pi. It is not clear that in such a situation the effective HD performance is necessarily fater than what the Pi can do with the SD card.

Note that I am talking about perceived system responsiveness. If we can get to the state where working of the SD card does not feel signifcantly slower overall, then I will switch to that mode simply because of the convenience factor. In my case, removing the HD means that I could also remove my reuirement for a powered hub on this particular Pi which would be very convenient The convenioence factor may be more important than the perofmance one as far as I am concerned in the way this particular Pi is to be used.

Nr90
Posts: 216
Joined: Sat Nov 26, 2011 12:39 pm

Re: SD vs USB HDD performance

Tue Jun 12, 2012 3:30 am

Itimpi thank you for sharing your experience using the pi with a HDD.

And Jim thank you for your thorough and clear reply!

I'll probably run it with the hard drive :)

jerrylamos
Posts: 27
Joined: Sun Jul 15, 2012 8:33 pm

Re: SD vs USB HDD performance

Thu Aug 23, 2012 11:46 pm

How did you copy the second partition from the SD card to the hard drive? I'm using Linux notebook to do the img dd's to the SD card.

Do you then erase the 2nd partition on the SD card leaving the boot partition on the SD card?

Do you add an entry into /etc/fstab for the hard drive or will Debian see it?

Maybe there's already a "how to" in the Pi forums I didn''t find it.

I'm likely more concerned with the SD card write wear out than the performance at the moment, just doing some internet browsing with a memory split 224/32 and overclock 900/450/450 and bookmarks so I don't have any more than one tab open at once. 1366x768 resolution TV pretty legible.

Thanks

Return to “General discussion”