简体   繁体   中英

SD card bechmarking using iozone tool

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 ??

 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.

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 ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM