0

I am trying to get performance of mounted Sd card to my board and i am using Iozone tool to do that but i am getting starnge results:

command:

# mount /dev/mmcblk2p2 /mnt/SD
# cd  /mnt/SD
# iozone -a -s 10M -r 5K -w -e

results:

                                       random  random    bkwd   record   stride                                   
          KB  reclen   write rewrite    read    reread    read   write    read  rewrite     read   fwrite frewrite   fread  freread
       10240       5    4283    4136    68681   378738  337652    3871  133905    96074   216912     4122     5013  364024   376181

the results are in Kbytes that's mean the speed random read is 300MB/s ?? my card is class 4 normally the write speed is 4 MB/s and the reading speed is not very different to this value ??

osgx
  • 90,338
  • 53
  • 357
  • 513
Mondher123
  • 67
  • 1
  • 9
  • Your OS (linux?) may cache data read from SD flash card; so 300 MB/s may be reading from RAM memory – osgx Jun 24 '16 at 14:17

2 Answers2

1
 iozone -a -s 10M -r 5K -w -e

                                   random  random    bkwd   record   stride                                   
      KB  reclen   write rewrite    read    reread    read   write    read  rewrite     read   fwrite frewrite   fread  freread
   10240       5    4283    4136    68681   378738  337652    3871  133905    96074   216912     4122     5013  364024   376181

Yes, your results are in kilobyte/s (KB/s; don't use -s silent option and iozone will say it Output is in kBytes/sec), and yes, there was 380 MB/s for "reread" speed (and 200 MB/s for read after reread?). But reread may be not the speed of your block device (SD card/HDD/SSD) if you test set (10 MB) is smaller than your RAM amount (it is).

Most OS (and Linux too) have software cache-in-RAM for filesystems and block devices. When you access some block for first time (since boot), it will be read from the device and stored in Page Cache of OS. Next access (read) of this block will be served directly from RAM, not from the device itself (unless O_DIRECT option was used in I/O operation, -I option of iozone).

So, your test run is incorrect. Read man page of iozone before use: http://linux.die.net/man/1/iozone and try bigger test set (gigabytes) or use -I to bypass page cache.

osgx
  • 90,338
  • 53
  • 357
  • 513
  • My RAM is 512M and i want to pass the test of SD speed in a few of seconds that's why i am using 10M as size, the option -I is not helping it's still the same result. – Mondher123 Jun 27 '16 at 07:49
0

here is the results when i am using the -I option

                                                            random  random    bkwd   record   stride                                   
          KB  reclen   write rewrite    read    reread    read   write    read  rewrite     read   fwrite frewrite   fread  freread
       10240    1024    2356    2950    19693    20865   20833    2095   20111     1734    14375     2875     3566  386809   389443


   write seq :               2,3  Mo/s
   read seq:                 19,2  Mo/s
   write rand:               2  Mo/s
   read rand:                20 Mo/s
   read blk                  20 Mo/s

why the read speed still so high ?

Mondher123
  • 67
  • 1
  • 9
  • Is it too high? 20 MB/s is adequate speed of reading data from NAND flash, it is real to SD interface to pass 20 MB data per second. Reading from NAND is always around 2-4 times faster than writing to it. SD interface has several speed protocols and ratings: [Secure_Digital#Speeds of wikipedia](https://en.wikipedia.org/wiki/Secure_Digital#Speeds), some UHS variants of SD may pass up to 50 and 100 MB/s. – osgx Jun 27 '16 at 13:52