:date: 2013-01-15 18:02 .. index:: tech, linux, hd parm Memory Card Read/Write Speed ---------------------------- .. image:: /_images/images/gallery/2013/2013-placeholder/20130115194000-sandisk_cfcard.jpg :alt: Quick enough :align: center :scale: 50 You've got a new memory card and you wonder which speed it reads? `hdparm` will do the trick here for you: .. code:: bash $ sudo hdparm -t /dev/sdb /dev/sdb: Timing buffered disk reads: 82 MB in 3.07 seconds = 26.67 MB/sec $ sudo hdparm -t /dev/sdb /dev/sdb: Timing buffered disk reads: 82 MB in 3.05 seconds = 26.86 MB/sec sudo hdparm -t /dev/sdb /dev/sdb: Timing buffered disk reads: 82 MB in 3.06 seconds = 26.77 MB/sec So my SanDisk card performs with ~26.5 MB/sec. That's OK for me. It didn't matter if I addressed `/dev/sdb` or `/dev/sdb1`, the existing file-system wasn't destroyed. And as always it's always neat to read the man page .. code:: bash -t Perform timings of device reads for benchmark and comparison purposes. For meaningful results, this operation should be repeated 2-3 times on an otherwise inactive system (no other active processes) with at least a couple of megabytes of free memory. This displays the speed of reading through the buffer cache to the disk without any prior caching of data. This measurement is an indication of how fast the drive can sustain sequential data reads under Linux, without any file-system overhead. To ensure accurate measurements, the buffer cache is flushed during the processing of -t using the BLKFLSBUF ioctl. ---- As an alternative you can use `dd` as well and test the writing as well: .. code:: bash $ sudo dd count=1k bs=1M if=/dev/zero of=/dev/sdb 1024+0 oppføringer inn 1024+0 oppføringer ut 1073741824 byte (1,1 GB) kopiert, 50,7091 s, 21,2 MB/s $ sudo dd count=1k bs=1M if=/dev/zero of=/dev/sdb 1024+0 oppføringer inn 1024+0 oppføringer ut 1073741824 byte (1,1 GB) kopiert, 50,7402 s, 21,2 MB/s $ sudo dd count=1k bs=1M if=/dev/zero of=/dev/sdb 1024+0 oppføringer inn 1024+0 oppføringer ut 1073741824 byte (1,1 GB) kopiert, 50,7049 s, 21,2 MB/s