Another update: Sebastian Sjoholm very kindly sent the results of him benchmarking his own Raspberry Pi with both a 4GB SD card (Samsung) and a 60GB OCZ Vertex SSD connected via a USB to SATA adapter. On firmware 346337 he used kernel version 3.2.27 and on 364242 he used 3.6.11. This makes it tricky to know whether the firmware or kernel version is having an effect on the differing results, so take those with a pinch of salt. It appears the SSD and SD card give similar read performance, but much different write performance. Worth knowing, thanks Sebastian!
|Device||Firmware||Cache Read||Buffer Read||DD Read||DD Write|
|4GB SD Card||346337||71.90 MB/s||17.33 MB/s||19.8 MB/s||7.8 MB/s|
|–||364242||156.86 MB/s||17.98 MB/s||20.2 MB/s||8.0 MB/s|
|OCZ Vertex Plus 60Gb SSD||346337||155.21 MB/s||18.37 MB/s||20.4 MB/s||17.9 MB/s|
|–||364242||161.92 MB/s||24.20 MB/s||24.6 MB/s||22.9 MB/s|
I notice a lot of people massively overestimating the performance a Raspberry Pi in the media and on their forums; people discuss using it as a file server or a network router, neither of which it would be great at doing.
To demonstrate this, I have done a quick benchmark of SD card read performance on the Raspberry Pi today using hdparm which is admittedly designed for ATA drives, but I don’t think that matters. I’m using this Class 10 16GB SDHC card.
pi@raspberrypi:~$ sudo hdparm -t /dev/mmcblk0 /dev/mmcblk0: Timing buffered disk reads: 14 MB in 3.13 seconds = 4.48 MB/sec pi@raspberrypi:~$ sudo hdparm -T /dev/mmcblk0 /dev/mmcblk0: Timing cached reads: 136 MB in 2.02 seconds = 67.30 MB/sec
The important value is the first one, showing 4.4MB/s. A Class 10 SD card can theoretically reach 10MB/s so I’m guessing 6MB/s is lost on the USB bus or Linux SD card driver; which is a lot. I don’t know if the same performance would be achieved with an external USB hard drive, I expect the answer is ‘probably’.
For comparison, here’s a consumer SATA drive in my Linux server:
jalada@tombraider:~$ sudo hdparm -t /dev/sdb /dev/sdb: Timing buffered disk reads: 368 MB in 3.01 seconds = 122.10 MB/sec jalada@tombraider:~$ sudo hdparm -T /dev/sdb /dev/sdb: Timing cached reads: 1946 MB in 2.00 seconds = 973.86 MB/sec
It would be interesting to benchmark the SD card in another machine, to see if I’m right about the lost 6MB/s.
Edit: At request, I benchmarked the same SD card in another device. I benchmarked using my SD card slot in my Macbook Air. I’ll admit the test is different as I couldn’t use hdparm, instead I used ‘AJA System Test’.
The results were:
Given that this is a Class 10, those results seem a little high, but I guess it should help give a rough idea of the difference in performance. If I get chance, I’ll do the same test with hdparm on Linux.