Tuesday, July 19, 2011

Measuring read/write BW of sdcard(s) on your android phones

I needed a quantitative way to measure the performance of the sd-card on my LG Optimus 2X. Hence I wrote the tool 'sd-speed'. Currently, this tool is supported only on linux and windows platforms. The project is hosted on github at the following location: 'git@github.com:teju85/sd-speed.git'. I have released it with the WTFPL (do What The Fuck you want to Public License).

Here are the results of running my program on my 'external sd-card', 'internal sd-card' and on 'phone memory' respectively: (Phone: LG O2X, CM7)

External sd-card
$ ./sdCardSpeedTest.sh /mnt/sdcard
NOTE: Test might take about 5-10 min depending on your sd-card speed!
      Please be patient during this time...

Evaluating write-BW...
100000000 bytes transferred in 26.371 secs (3792044 bytes/sec)
100000000 bytes transferred in 19.656 secs (5087505 bytes/sec)
100000000 bytes transferred in 20.697 secs (4831618 bytes/sec)
100000000 bytes transferred in 20.086 secs (4978592 bytes/sec)
100000000 bytes transferred in 53.975 secs (1852709 bytes/sec)
100000000 bytes transferred in 28.934 secs (3456141 bytes/sec)
Write BandWidth: 3.81448 MBps

Evaluating read-BW...
100000000 bytes transferred in 18.844 secs (5306728 bytes/sec)
100000000 bytes transferred in 17.818 secs (5612302 bytes/sec)
100000000 bytes transferred in 17.331 secs (5770007 bytes/sec)
100000000 bytes transferred in 17.301 secs (5780012 bytes/sec)
100000000 bytes transferred in 17.306 secs (5778342 bytes/sec)
100000000 bytes transferred in 17.310 secs (5777007 bytes/sec)
Read BandWidth: 5.40803 MBps

Cleaning up all the temporary files...


Internal sd-card
$ ./sdCardSpeedTest.sh /mnt/emmc
NOTE: Test might take about 5-10 min depending on your sd-card speed!
      Please be patient during this time...

Evaluating write-BW...
100000000 bytes transferred in 9.372 secs (10670081 bytes/sec)
100000000 bytes transferred in 6.579 secs (15199878 bytes/sec)
100000000 bytes transferred in 6.252 secs (15994881 bytes/sec)
100000000 bytes transferred in 6.321 secs (15820281 bytes/sec)
100000000 bytes transferred in 6.532 secs (15309246 bytes/sec)
100000000 bytes transferred in 6.516 secs (15346838 bytes/sec)
Write BandWidth: 14.0415 MBps

Evaluating read-BW...
100000000 bytes transferred in 5.168 secs (19349845 bytes/sec)
100000000 bytes transferred in 5.038 secs (19849146 bytes/sec)
100000000 bytes transferred in 4.661 secs (21454623 bytes/sec)
100000000 bytes transferred in 4.671 secs (21408691 bytes/sec)
100000000 bytes transferred in 4.694 secs (21303792 bytes/sec)
100000000 bytes transferred in 4.693 secs (21308331 bytes/sec)
Read BandWidth: 19.8165 MBps

Cleaning up all the temporary files...


Phone memory
$ ./sdCardSpeedTest.sh /data/local
NOTE: Test might take about 5-10 min depending on your sd-card speed!
      Please be patient during this time...

Evaluating write-BW...
100000000 bytes transferred in 6.876 secs (14543339 bytes/sec)
100000000 bytes transferred in 8.566 secs (11674060 bytes/sec)
100000000 bytes transferred in 8.565 secs (11675423 bytes/sec)
100000000 bytes transferred in 6.783 secs (14742739 bytes/sec)
100000000 bytes transferred in 7.617 secs (13128528 bytes/sec)
100000000 bytes transferred in 8.168 secs (12242899 bytes/sec)
Write BandWidth: 12.3989 MBps

Evaluating read-BW...
100000000 bytes transferred in 5.537 secs (18060321 bytes/sec)
100000000 bytes transferred in 5.641 secs (17727353 bytes/sec)
100000000 bytes transferred in 5.274 secs (18960940 bytes/sec)
100000000 bytes transferred in 5.275 secs (18957345 bytes/sec)
100000000 bytes transferred in 5.268 secs (18982536 bytes/sec)
100000000 bytes transferred in 5.273 secs (18964536 bytes/sec)
Read BandWidth: 17.7468 MBps

Cleaning up all the temporary files...

I have compiled these results in a tabular format for quick comparison.
Location Write BW (MBps) Read BW (MBps)
External sd-card 3.81 5.41
Internal sd-card 14.04 19.82
Phone Memory 12.40 17.75
If you find any issues with this tool, do drop-in a comment here!

No comments:

Post a Comment