mpalomer
Posts: 26
Joined: Mon Dec 31, 2012 5:26 am

How can I test SD card speed?

Fri Feb 01, 2013 12:12 am

I want to see how fast my SD card operates on the Raspberry Pi. How do I do this? Also, in your experience, what's the fastest card out there? I'm not doing anything that needs a lot of storage, so anything as low as 4GB would be fine with me.

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: How can I test SD card speed?

Fri Feb 01, 2013 8:57 am

http://elinux.org/RPi_SD_cards#SD_card_performance

On this page is the 'official' way.

Write :

Code: Select all

dd if=/dev/zero of=~/test.tmp bs=500K count=1024
Read

Code: Select all

dd if=~/test.tmp of=/dev/null bs=500K count=1024
With most operating systems and uses, read speed is far more important than write speed. But you need to run the write test first since it creates a file used in the read test.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

User avatar
Amarand
Posts: 12
Joined: Tue Apr 28, 2015 7:32 pm
Location: Galloway, OH, USA
Contact: Website Yahoo Messenger

Re: How can I test SD card speed?

Thu Apr 30, 2015 9:19 pm

pluggy wrote:http://elinux.org/RPi_SD_cards#SD_card_performance

On this page is the 'official' way.

Write :

Code: Select all

dd if=/dev/zero of=~/test.tmp bs=500K count=1024
Read

Code: Select all

dd if=~/test.tmp of=/dev/null bs=500K count=1024
With most operating systems and uses, read speed is far more important than write speed. But you need to run the write test first since it creates a file used in the read test.
It's super important to do this (listed on that link above) after the write and before the read:

sync; echo 3 | sudo tee /proc/sys/vm/drop_caches

If you don't, then you'll hit cache and may see speeds like this:

524288000 bytes (524 MB) copied, 0.998347 s, 525 MB/s

Rather than this:

524288000 bytes (524 MB) copied, 27.8044 s, 18.9 MB/s

Hope that helps!

Return to “Beginners”