This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
microSD card testing
#1
Information 
Hello.

TB (rk3288) supports faster microSD card (on SDmmc) - SDIO-3/UHS-I - sdr12, sdr25, sdr50, sd-uhs-sdr104 (208MHz/SDR/4bit == 104MB/s).
TB SDmmc speed is limited in range 400kHz - 150MHz that results up to 150MHz/SDR/4bit == 75MB/s.

I did some iozone tests on rockchip-4.4 kernel (all transfer speeds enabled in dts) with microSDHC card 16GB ADATA Premier Pro/UHS-I/UHS speed class 3 (U3)/declared up to 95MB/s and ext4 filesystem (stripped irrelevant outputs):

Code:
# dmesg | grep mmc0

[    4.084535] mmc_host mmc0: Bus speed (slot 0) = 148500000Hz (slot req 150000000Hz, actual 148500000HZ div = 0)
[    4.536343] mmc0: new ultra high speed SDR104 SDHC card at address 59b4
[    4.546588] mmcblk0: mmc0:59b4 SD    14.7 GiB

##### first test with "standard" interactive governor and default minimum frequency 126000, 2x iozone output, measuring cpuinfo_cur_freq shows variable speed between 126-1008MHz, thermal_zone1/temp ~49 C (open case, standard heatsink)
# grep '' /sys/devices/system/cpu/cpufreq/policy0/scaling_[gm]*
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:interactive
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:126000
# iozone -e -I -a -s 100M -r 4k -r 1024k -i 0 -i 1 -i 2
                                                              random    random                                        
              kB  reclen    write  rewrite    read    reread    read     write       
          102400       4     1042     1282     6917     7156     5109      864  
          102400       4     1117     1244     5862     7254     6236      845  
          102400    1024    11913    21835    34522    34879    31550    18664   
          102400    1024    12126    20257    34766    37053    32538    15894   

##### second test with minimum frequency 600000, 2x iozone output, measuring cpuinfo_cur_freq shows that speed is not changing from 600MHz, thermal_zone1/temp ~50 C
# echo 600000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
# grep '' /sys/devices/system/cpu/cpufreq/policy0/scaling_[gm]*
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:interactive
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:600000
# iozone -e -I -a -s 100M -r 4k -r 1024k -i 0 -i 1 -i 2
                                                             random    random                                        
             kB  reclen    write  rewrite    read    reread    read     write        
         102400       4     1321     1459     7752     8072     7457     1005                                                          
         102400       4     1288     1391     8060     7873     7485     1007                                                          
         102400    1024    13976    27038    53387    54065    53818    23876                        
         102400    1024    12816    10466    53776    53746    53323    10667

##### third test with minimum frequency 1008000, 2x iozone output, measuring cpuinfo_cur_freq shows that speed is not changing from 1008MHz, thermal_zone1/temp ~52 C
# echo 1008000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
# grep '' /sys/devices/system/cpu/cpufreq/policy0/scaling_[gm]*
/sys/devices/system/cpu/cpufreq/policy0/scaling_governor:interactive
/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:1008000
# iozone -e -I -a -s 100M -r 4k -r 1024k -i 0 -i 1 -i 2
                                                             random    random                                        
             kB  reclen    write  rewrite    read    reread    read     write        
         102400       4     1147     1391     8699     8699     7975      998                                                          
         102400       4     1382     1474     8925     8915     8279     1001                                                          
         102400    1024    12038    27139    58261    58484    58190    24044                                                          
         102400    1024    18905    27519    58339    58480    58199    24411                                                    

TL;DR: Performance UHS-1/U3 microSD card with ext4 filesystem depends cpu speed (in interactive mode). I recommend increase minimum speed or set other governor (scaling_available_governors:conservative ondemand userspace powersave interactive performance). TB SDmmc bus theoretical bandwidth is 75MB/s.
- default minimum 126Mhz - 34 MB/s read, 12-15MB/s write
- set minimum to 600MHz - 54 MB/s read, 13-23MB/w write
- set minimum to 1008MHz - 58 MB/s read, 15-24MB/w write

PS: Does anyone have access to "TRM RK3288 Chapter 15 Mobile Storage Host" (older) or "Chapter 1 of Part 3 Mobile Storage Host Controller" (newer) to verify chip capability (dts may be wrong) (missing rk3288-chapter-15-*) ?
UPDATE: response from opensource rock-chips.com: According to Rockchip document policy, you need to sign NDA for part2 TRM... Sad
Reply
#2
Code:
First Run:
                                                             random    random     bkwd    record    stride
             kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
         102400       4     3414     4018     9068     9141     7197     2418
         102400    1024     4009     4480    53160    53290    49846    13536

Second Run:
                                                              random    random     bkwd    record    stride
              kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
          102400       4     3561     4038     9565     9309     7110     2384
          102400    1024     5830    12485    52010    52022    54347    16721

This was my result with a ho-hum SanDisk Ultra 16 GiB Class 10, minimum CPU speed 408 MHz  (I was testing if there were any thermal improvements having idle there instead of the Armbian default 600 MHz.  There are none.)  Thanks to my larger heatsink and tiny fan I never got above 36 C.  I highly recommend it, http://a.co/gSxhKkL with a couple fins knocked off a corner to clear an inductor.  Those silicone thermal pads are useless for this sort of app, get a 20x20 from somewhere else.

On Armbian Kernel 4.4.66, all transfer speeds enabled in dts.
Reply
#3
Synopsys DesignWare Mobile Storage Host Controller is tested upto 200Mhz. I do not known exact version "DWC_mobile_storage" used in rk3288 but let's overclock to 200Mhz. It works OK. Tested with set minimum cpu speed to 1008MHz - 75 MB/s read, 16-23MB/w write on ext4 (theoretic maximum bandwidth is 200MHz/SDR/4bit == 100MB/s).

Code:
# dmesg | grep mmc0
[    3.494747] mmc_host mmc0: Bus speed (slot 0) = 200000000Hz (slot req 200000000Hz, actual 200000000HZ div = 0)
[    3.929288] mmc0: new ultra high speed SDR104 SDHC card at address 59b4
[    3.929834] mmcblk0: mmc0:59b4 SD    14.7 GiB

# echo 1008000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
# iozone -e -I -a -s 100M -r 4k -r 1024k -i 0 -i 1 -i 2
                                                             random    random                                        
             kB  reclen    write  rewrite    read    reread    read     write       
         102400       4     1305     1497     9170     9176     8338     1017                                                          
         102400    1024    15742    27662    74244    74646    74333    23260                                                          

         102400       4     1395     1446     9173     9159     8474     1022                                                          
         102400    1024    16223    28486    75285    75584    75237    23309                                                          

You can regulate microSD card frequency (between min-max) simple with "echo 150000000 > /sys/kernel/debug/mmc0/clock".
Reply
#4
I tried the same test on a class 10 64GB Lexar 300x UHS1 SDXC with the default kernel settings (armbian, so min fq 600MHz, conservative governor)
Code:
iozone -e -I -a -s 100M -r 4k -r 1024k -i 0 -i 1 -i 2

                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
         102400       4     1708     1718     6886     6903     5301     1050
         102400    1024     6791    11934    40086    40053    39312    10154

Now using ondemand governor, I reset the minimum fq to ~1Ghz:
Code:
root@tinkerboard:/home/bedalus# echo 1008000 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
bedalus@tinkerboard:~$ iozone -e -I -a -s 100M -r 4k -r 1024k -i 0 -i 1 -i 2
                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4     1823     1682     7382     7355     5558     1118
          102400    1024     7572     6461    42422    42473    42286     9406

Next run, apply the mmc clock max fq 150MHz:
Code:
root@tinkerboard:/home/bedalus# echo 150000000 > /sys/kernel/debug/mmc0/clock
bedalus@tinkerboard:~$ iozone -e -I -a -s 100M -r 4k -r 1024k -i 0 -i 1 -i 2

                                                              random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4     1875     1855     7762     7744     5803     1155
          102400    1024     7789    17280    59471    59620    59277    22220

Just got a new Samsung Evo+ 32GB UHS-3. Didn't need to set the mmc clock on this, it was already at 150MHz.
Code:
random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4     3755     3903    13673    13873    13745     2904                                                          
          102400    1024    24487    23484    62745    62583    62848    21516

* * *

Misc results:
Sandisk Ultra 32GB SDHC class 10 (older card, not UHS-1), stock setup (comparable to the first set of Lexar results in this post):
Code:
random    random
              kB  reclen    write  rewrite    read    reread    read     write
          102400       4     2644     2673     8422     7977     5152     1169
          102400    1024    20633    16453    40476    40349    40090     5378
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)