This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to measure read/write performance of UFS

Part Number: TDA4VM

Hi TI,

I am currently investigating on the read/write speed of the Flash (THGAF8G8T23BAILB), which is mounted on the EVM. I made a ext4 partition, which is listed as /dev/sdb1 in the available devices:

root@j7-evm:~# df -hT
Filesystem           Type            Size      Used Available Use% Mounted on
/dev/root            ext4           14.5G      1.8G     11.9G  13% /
devtmpfs             devtmpfs        1.6G     64.0K      1.6G   0% /dev
tmpfs                tmpfs           1.8G         0      1.8G   0% /dev/shm
tmpfs                tmpfs           1.8G     27.7M      1.8G   1% /run
tmpfs                tmpfs           1.8G         0      1.8G   0% /sys/fs/cgroup
tmpfs                tmpfs           1.8G         0      1.8G   0% /tmp
tmpfs                tmpfs          16.0M         0     16.0M   0% /media/ram
tmpfs                tmpfs          50.0M    256.0K     49.8M   1% /var/volatile
tmpfs                tmpfs         378.9M         0    378.9M   0% /run/user/0
/dev/mmcblk1p1       vfat           61.0M      2.4M     58.7M   4% /run/media/mmcblk1p1
/dev/sdb1            ext4           29.0G      1.0G     26.4G   4% /mnt/flash

However, when executing the common commands for measuring read/write speed, I encounter some issues:

1. using hdparm

root@j7-evm:~# hdparm -tT /dev/sdb1

/dev/sdb1:
 Timing cached reads:   5784 MB in  2.00 seconds = 2894.49 MB/sec
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 Timing buffered disk reads: 2750 MB in  3.00 seconds = 916.49 MB/sec

Q1: Why is there a problem with missing sense data?

2. using dd

root@j7-evm:~# dd if=/dev/zero of=tempfile bs=1M count=1024; sync
1024+0 records in
1024+0 records out
root@j7-evm:~# 

Q2: Here, I do not get the expected output, which tells me the measured write speed. Why? Apart from this, the command worked as expected. It wrote a file "tempfile" to the flash.

Thanks for your help!

  • Hi,

    I am looking at this problem, let me have a response by tomorrow.

    Regards,

    Karan

  • Hi Karan,

    Is there maybe also a possibility to check the cpu load while testing? And to see which of the A72 cores are being used for testing?

    Thanks again!

  • Hi,

    user6456602 said:

    Is there maybe also a possibility to check the cpu load while testing? And to see which of the A72 cores are being used for testing?

    I think you can just try to use the htop or the top command and see the load.

    On the original question, got the below response from the expert on this:

    hdparam is not the right tool to use with SCSi devices like UFS. UFS follows much newer SCSI specification and therefore may not support some legacy commands.

    For measuring UFS performance, recommended tool is FIO which does multi threaded read/write. A simple dd cannot saturate UFS bandwidth.
    There is  a LTP-DDT test in SDK filesystem at:
    /opt/ltp/runtest/ddt/ufs_perf

    See implementation at: /opt/ltp/testcases/bin/ddt/blk/blk_device_filesystem_perf_test.sh

    Regards,

    Karan