Difference between revisions of "SD Card Performance Benchmarking"
Line 6: | Line 6: | ||
copy 16 bytes from /dev/random into a file e.g. sd001.seed: | copy 16 bytes from /dev/random into a file e.g. sd001.seed: | ||
dd if=/dev/random of= | dd if=/dev/random of=sd001.seed bs=16b count=1 | ||
=Benchmark Write Speed= | =Benchmark Write Speed= |
Revision as of 18:00, 13 February 2021
1 Preparations
Note: Be aware that this will wipe/erase all data on the SD card we are benchmarking, also be extra careful to select the correct device/mount point to not wipe you PCs internal drive instead by accident.
get this http://vserver.13thfloor.at/Stuff/prng.c and build it with "-O3":
gcc prng.c -o prng -O3
copy 16 bytes from /dev/random into a file e.g. sd001.seed:
dd if=/dev/random of=sd001.seed bs=16b count=1
2 Benchmark Write Speed
run:
./prng sd001.seed | dd of=/dev/sdXX bs=128k iflag=fullblock oflag=direct status=progress
where /dev/sdXX is the device for the SD card
this should run for a while an write pseudo random data to the sd card
any errors there are a general problem except for when the sd card is full
once you know the number of blocks for the specific sd card
you want to add count=xxx to avoid overrun
3 Benchmark Read Speed
dd if=/dev/sdXX bs=128k iflag=direct count=xxx status=progress | md5sum
this will give a read performance and calculate a checksum
the checksum can then be verified with:
./prng sd001.seed | dd bs=128k count=xxx | md5sum
if the checksums do not match, the sd card is not keeping the data written