How can I test SD card speed?
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.
- 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?
http://elinux.org/RPi_SD_cards#SD_card_performance
On this page is the 'official' way.
Write :
Read
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.
On this page is the 'official' way.
Write :
Code: Select all
dd if=/dev/zero of=~/test.tmp bs=500K count=1024
Code: Select all
dd if=~/test.tmp of=/dev/null bs=500K count=1024
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......
I must not tread on too many sacred cows......
- Amarand
- Posts: 19
- Joined: Tue Apr 28, 2015 7:32 pm
- Location: Galloway, OH, USA
- Contact: Website Yahoo Messenger Facebook YouTube
Re: How can I test SD card speed?
It's super important to do this (listed on that link above) after the write and before the read:pluggy wrote:http://elinux.org/RPi_SD_cards#SD_card_performance
On this page is the 'official' way.
Write :
ReadCode: Select all
dd if=/dev/zero of=~/test.tmp 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.Code: Select all
dd if=~/test.tmp of=/dev/null bs=500K count=1024
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!
-
- Posts: 4
- Joined: Mon Mar 07, 2016 11:31 am
Re: How can I test SD card speed?
Thank you these scripts helped.
Re: How can I test SD card speed?
It looks like there is a parameter you can pass to dd "oflag=dsync" to disable caching.
oflag=dsync (oflag=dsync) : Use synchronized I/O for data. Do not skip this option. This option get rid of caching and gives you good and accurate results
source : https://www.cyberciti.biz/faq/howto-lin ... d-command/
oflag=dsync (oflag=dsync) : Use synchronized I/O for data. Do not skip this option. This option get rid of caching and gives you good and accurate results
source : https://www.cyberciti.biz/faq/howto-lin ... d-command/