0

How to Benchmark MicroSD card internal and external in Android Mobile Phone through ADB SHELL commands?

There are many Benchmark Apps (Andro Bench, PCMark, 3D Mark, Crystal Bench for windows) to check speed of Internal and external memory card but I have read in a forum question answer that these Apps Results are not accurate or reliable as they can give wrong results and different results at different time

So some user recommended to use ADB shell commands

How to check the performance of a External Micro SD card and Internal Memory Card (via ADB shell commands or Scripts tools).

  1. I want to generally know how to test through the Random write speed, the Random read speed,Cache size and speed of internal and external memory card

  2. What is more relevant for best performance for general booting android and system apps and general applications Random Read/write 4KB (QD=32), Random Read/write 4KB (QD=1) or Random Read /write 512KB?

before answering commenting kindly refer the following link

Lynix ubuntu commands for hard disk test in Ubuntu

I have founded following commands but working for lynx but I dont know how to alter their syntax for android and use them and read their output values kindly guide me

which of the following command works and gives actual values and how to ALTER them for android and which one will be safe and not damage Android Lolipop 5.1.1 OS or my Mobile device

  1. THROUGH FIO COMMANDS

    fio --name TEST --eta-newline=5s --filename=fio-tempfile.dat --rw=read --size=500m --io_size=10g --blocksize=1024k --ioengine=libaio --fsync=10000 --iodepth=32 --direct=1 --numjobs=1 --runtime=60 --group_reporting

    i tried in adb shell android but output is

    /system/bin/sh : fio not found

  2. THOUGH HDPARM COMMAND

    hdparm -Tt /dev/sda

/system/bin/sh : hdparm not found

  1. THROUGH BONNIE++ COMMAND

    bonnie++ -d [TEST_LOCATION] -s [TEST_SIZE] -n 0 -m [TEST_NAME] -f -b -u [TEST_USER] bonnie++ -d /tmp -s 4G -n 0 -m TEST -f -b -u james

/system/bin/sh : bonnie++ not found

  1. THROUGH IOTOP TOOL

    apt-get install iotop
    sudo iotop

  2. THROUGH DD IF COMMAND

for sequential writing speed

sync ; 
time sh -c "dd if=/dev/zero of=testfile bs=100k count=1k  && sync" ; 
rm testfile

for sequential reading speed

sh -c "sync && echo 3 > /proc/sys/vm/drop_caches"
dd if=./largefile of=/dev/null bs=4k

for random writing speed

 sync ; 
time sh -c "dd if=/dev/urandom of=testfile bs=100k count=1k  && sync" ; 
rm testfile

for random writing speed

sh -c "sync && echo 3 > /proc/sys/vm/drop_caches" dd if=./largefile of=/dev/null bs=4k

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.