Firefly开源社区

打印 上一主题 下一主题

[技术讨论] ROC-RK3568-PC全面性能测试

ROC-RK3568-PC全面性能测试

发表于 2022-9-19 10:31:32      浏览:2521 | 回复:0        打印      只看该作者   [复制链接] 楼主
本帖最后由 Firefly搬运工 于 2022-9-19 10:31 编辑

前言

板子的性能不仅仅和CPU相关,也和存储等相关,是一个综合体现,所以我们从CPU,存储,等几个关键的部分去进行性能测试。

CPU性能: Coremark跑分


git clone [https://github.com/eembc/coremark.git]
(https://github.com/eembc/coremark.git)

cd coremark/


单线程

make ITERATIONS=100000
打印信息如下
  1. root@firefly:~/coremark# make ITERATIONS=100000

  2. make XCFLAGS=" -DPERFORMANCE_RUN=1" load run1.log

  3. make[1]: Entering directory '/root/coremark'

  4. make port_prebuild

  5. make[2]: Entering directory '/root/coremark'

  6. make[2]: Nothing to be done for 'port_prebuild'.

  7. make[2]: Leaving directory '/root/coremark'

  8. make link

  9. make[2]: Entering directory '/root/coremark'

  10. cc -O2 -Ilinux -Iposix -I. -DFLAGS_STR=\""-O2 -DPERFORMANCE_RUN=1  -lrt"\" -DITERATIONS=100000 -DPERFORMANCE_RUN=1 core_list_join.c core_main.c core_matrix.c core_state.c core_util.c posix/core_portme.c -o ./coremark.exe -lrt

  11. Link performed along with compile

  12. make[2]: Leaving directory '/root/coremark'

  13. make port_postbuild

  14. make[2]: Entering directory '/root/coremark'

  15. make[2]: Nothing to be done for 'port_postbuild'.

  16. make[2]: Leaving directory '/root/coremark'

  17. make port_preload

  18. make[2]: Entering directory '/root/coremark'

  19. make[2]: Nothing to be done for 'port_preload'.

  20. make[2]: Leaving directory '/root/coremark'

  21. echo Loading done ./coremark.exe

  22. Loading done ./coremark.exe

  23. make port_postload

  24. make[2]: Entering directory '/root/coremark'

  25. make[2]: Nothing to be done for 'port_postload'.

  26. make[2]: Leaving directory '/root/coremark'

  27. make port_prerun

  28. make[2]: Entering directory '/root/coremark'

  29. make[2]: Nothing to be done for 'port_prerun'.

  30. make[2]: Leaving directory '/root/coremark'

  31. ./coremark.exe  0x0 0x0 0x66 100000 7 1 2000 > ./run1.log

  32. make port_postrun

  33. make[2]: Entering directory '/root/coremark'

  34. make[2]: Nothing to be done for 'port_postrun'.

  35. make[2]: Leaving directory '/root/coremark'

  36. make[1]: Leaving directory '/root/coremark'

  37. make XCFLAGS=" -DVALIDATION_RUN=1" load run2.log

  38. make[1]: Entering directory '/root/coremark'

  39. make port_preload

  40. make[2]: Entering directory '/root/coremark'

  41. make[2]: Nothing to be done for 'port_preload'.

  42. make[2]: Leaving directory '/root/coremark'

  43. echo Loading done ./coremark.exe

  44. Loading done ./coremark.exe

  45. make port_postload

  46. make[2]: Entering directory '/root/coremark'

  47. make[2]: Nothing to be done for 'port_postload'.

  48. make[2]: Leaving directory '/root/coremark'

  49. make port_prerun

  50. make[2]: Entering directory '/root/coremark'

  51. make[2]: Nothing to be done for 'port_prerun'.

  52. make[2]: Leaving directory '/root/coremark'

  53. ./coremark.exe  0x3415 0x3415 0x66 100000 7 1 2000  > ./run2.log

  54. make port_postrun

  55. make[2]: Entering directory '/root/coremark'

  56. make[2]: Nothing to be done for 'port_postrun'.

  57. make[2]: Leaving directory '/root/coremark'

  58. make[1]: Leaving directory '/root/coremark'

  59. Check run1.log and run2.log for results.

  60. See README.md for run and reporting rules.
复制代码

run1.log
  1. root@firefly:~/coremark# vi run1.log

  2. 2K performance run parameters for coremark.

  3. CoreMark Size    : 666

  4. Total ticks      : 14036

  5. Total time (secs): 14.036000

  6. Iterations/Sec   : 7124.536905

  7. Iterations       : 100000

  8. Compiler version : GCC9.4.0

  9. Compiler flags   : -O2 -DPERFORMANCE_RUN=1  -lrt

  10. Memory location  : Please put data memory location here

  11. (e.g. code in flash, data on heap etc)

  12. seedcrc          : 0xe9f5

  13. [0]crclist       : 0xe714

  14. [0]crcmatrix     : 0x1fd7

  15. [0]crcstate      : 0x8e3a

  16. [0]crcfinal      : 0xd340

  17. Correct operation validated. See README.md for run and reporting rules.

  18. CoreMark 1.0 : 7124.536905 / GCC9.4.0 -O2 -DPERFORMANCE_RUN=1  -lrt / Heap
复制代码

run2.log
  1. root@firefly:~/coremark# vi run2.log

  2. 2K validation run parameters for coremark.

  3. CoreMark Size    : 666

  4. Total ticks      : 14138

  5. Total time (secs): 14.138000

  6. Iterations/Sec   : 7073.136229

  7. Iterations       : 100000

  8. Compiler version : GCC9.4.0

  9. Compiler flags   : -O2 -DPERFORMANCE_RUN=1  -lrt

  10. Memory location  : Please put data memory location here

  11. (e.g. code in flash, data on heap etc)

  12. seedcrc          : 0x18f2

  13. [0]crclist       : 0xe3c1

  14. [0]crcmatrix     : 0x0747

  15. [0]crcstate      : 0x8d84

  16. [0]crcfinal      : 0x5c66

  17. Correct operation validated. See README.md for run and reporting rules.
复制代码
多线程


make XCFLAGS="-DMULTITHREAD=4 -DUSE_FORK"

打印如下
  1. root@firefly:~/coremark# make XCFLAGS="-DMULTITHREAD=4 -DUSE_FORK"

  2. make XCFLAGS="-DMULTITHREAD=4 -DUSE_FORK -DPERFORMANCE_RUN=1" load run1.log

  3. make[1]: Entering directory '/root/coremark'

  4. make port_preload

  5. make[2]: Entering directory '/root/coremark'

  6. make[2]: Nothing to be done for 'port_preload'.

  7. make[2]: Leaving directory '/root/coremark'

  8. echo Loading done ./coremark.exe

  9. Loading done ./coremark.exe

  10. make port_postload

  11. make[2]: Entering directory '/root/coremark'

  12. make[2]: Nothing to be done for 'port_postload'.

  13. make[2]: Leaving directory '/root/coremark'

  14. make port_prerun

  15. make[2]: Entering directory '/root/coremark'

  16. make[2]: Nothing to be done for 'port_prerun'.

  17. make[2]: Leaving directory '/root/coremark'

  18. ./coremark.exe  0x0 0x0 0x66 0 7 1 2000 > ./run1.log

  19. make port_postrun

  20. make[2]: Entering directory '/root/coremark'

  21. make[2]: Nothing to be done for 'port_postrun'.

  22. make[2]: Leaving directory '/root/coremark'

  23. make[1]: Leaving directory '/root/coremark'

  24. make XCFLAGS="-DMULTITHREAD=4 -DUSE_FORK -DVALIDATION_RUN=1" load run2.log

  25. make[1]: Entering directory '/root/coremark'

  26. make port_preload

  27. make[2]: Entering directory '/root/coremark'

  28. make[2]: Nothing to be done for 'port_preload'.

  29. make[2]: Leaving directory '/root/coremark'

  30. echo Loading done ./coremark.exe

  31. Loading done ./coremark.exe

  32. make port_postload

  33. make[2]: Entering directory '/root/coremark'

  34. make[2]: Nothing to be done for 'port_postload'.

  35. make[2]: Leaving directory '/root/coremark'

  36. make port_prerun

  37. make[2]: Entering directory '/root/coremark'

  38. make[2]: Nothing to be done for 'port_prerun'.

  39. make[2]: Leaving directory '/root/coremark'

  40. ./coremark.exe  0x3415 0x3415 0x66 0 7 1 2000  > ./run2.log

  41. make port_postrun

  42. make[2]: Entering directory '/root/coremark'

  43. make[2]: Nothing to be done for 'port_postrun'.

  44. make[2]: Leaving directory '/root/coremark'

  45. make[1]: Leaving directory '/root/coremark'

  46. Check run1.log and run2.log for results.

  47. See README.md for run and reporting rules.
复制代码

run1.log

  1. root@firefly:~/coremark# vi run1.log

  2. 2K performance run parameters for coremark.

  3. CoreMark Size    : 666

  4. Total ticks      : 15471

  5. Total time (secs): 15.471000

  6. Iterations/Sec   : 28440.307672

  7. Iterations       : 440000

  8. Compiler version : GCC9.4.0

  9. Compiler flags   : -O2 -DMULTITHREAD=4 -DUSE_FORK -DPERFORMANCE_RUN=1  -lrt

  10. Parallel Fork : 4

  11. Memory location  : Please put data memory location here

  12. (e.g. code in flash, data on heap etc)

  13. seedcrc          : 0xe9f5

  14. [0]crclist       : 0xe714

  15. [1]crclist       : 0xe714

  16. [2]crclist       : 0xe714

  17. [3]crclist       : 0xe714

  18. [0]crcmatrix     : 0x1fd7

  19. [1]crcmatrix     : 0x1fd7

  20. [2]crcmatrix     : 0x1fd7

  21. [3]crcmatrix     : 0x1fd7

  22. [0]crcstate      : 0x8e3a

  23. [1]crcstate      : 0x8e3a

  24. [2]crcstate      : 0x8e3a

  25. [3]crcstate      : 0x8e3a

  26. [0]crcfinal      : 0x33ff

  27. [1]crcfinal      : 0x33ff

  28. [2]crcfinal      : 0x33ff

  29. [3]crcfinal      : 0x33ff

  30. Correct operation validated. See README.md for run and reporting rules.

  31. CoreMark 1.0 : 28440.307672 / GCC9.4.0 -O2 -DMULTITHREAD=4 -DUSE_FORK -DPERFORMANCE_RUN=1  -lrt / Heap / 4:Fork

  32. ~
复制代码

run2.log

  1. root@firefly:~/coremark# vi run2.log

  2. 2K validation run parameters for coremark.

  3. CoreMark Size    : 666

  4. Total ticks      : 15582

  5. Total time (secs): 15.582000

  6. Iterations/Sec   : 28237.710178

  7. Iterations       : 440000

  8. Compiler version : GCC9.4.0

  9. Compiler flags   : -O2 -DMULTITHREAD=4 -DUSE_FORK -DPERFORMANCE_RUN=1  -lrt

  10. Parallel Fork : 4

  11. Memory location  : Please put data memory location here

  12. (e.g. code in flash, data on heap etc)

  13. seedcrc          : 0x18f2

  14. [0]crclist       : 0xe3c1

  15. [1]crclist       : 0xe3c1

  16. [2]crclist       : 0xe3c1

  17. [3]crclist       : 0xe3c1

  18. [0]crcmatrix     : 0x0747

  19. [1]crcmatrix     : 0x0747

  20. [2]crcmatrix     : 0x0747

  21. [3]crcmatrix     : 0x0747

  22. [0]crcstate      : 0x8d84

  23. [1]crcstate      : 0x8d84

  24. [2]crcstate      : 0x8d84

  25. [3]crcstate      : 0x8d84

  26. [0]crcfinal      : 0x0956

  27. [1]crcfinal      : 0x0956

  28. [2]crcfinal      : 0x0956

  29. [3]crcfinal      : 0x0956

  30. Correct operation validated. See README.md for run and reporting rules.
复制代码

对比

https://www.eembc.org/coremark/scores.php
下搜索A55没有对应的芯片的跑分,
可以和A53对比下,
我们这里的得分28440比A53的19678还是高很多的,并且还仅是-O2优化。


计算圆周率
time echo "[scale](https://so.csdn.net/so/search?q=scale&spm=1001.2101.3001.7020)=5000; 4*a(1)" | bc -l -q
执行时间如下
  1. real    0m47.623s

  2. user    0m47.596s

  3. sys     0m0.012s
复制代码

RAM带宽

cd STREAM/
gcc -O3 stream.c -o stream
打印如下
  1. root@firefly:~/coremark/STREAM# ./stream

  2. ---

  3. STREAM version $Revision: 5.10 $

  4. ---

  5. This system uses 8 bytes per array element.

  6. ---

  7. Array size = 10000000 (elements), Offset = 0 (elements)

  8. Memory per array = 76.3 MiB (= 0.1 GiB).

  9. Total memory required = 228.9 MiB (= 0.2 GiB).

  10. Each kernel will be executed 10 times.

  11. The *best* time for each kernel (excluding the first iteration)

  12. will be used to compute the reported bandwidth.

  13. ---

  14. Your clock granularity/precision appears to be 1 microseconds.

  15. Each test below will take on the order of 43055 microseconds.

  16. (= 43055 clock ticks)

  17. Increase the size of the arrays if this shows that

  18. you are not getting at least 20 clock ticks per test.

  19. ---

  20. WARNING -- The above is only a rough guideline.

  21. For best results, please be sure you know the

  22. precision of your system timer.

  23. ---

  24. Function    Best Rate MB/s  Avg time     Min time     Max time

  25. Copy:            6306.2     0.025627     0.025372     0.025743

  26. Scale:           5647.5     0.028464     0.028331     0.028618

  27. Add:             5446.5     0.044271     0.044065     0.044582

  28. Triad:           5169.9     0.046605     0.046423     0.046989

  29. ---

  30. Solution Validates: avg error less than 1.000000e-13 on all three arrays
复制代码

压力测试

tar -xvf memtester-4.5.1.tar.gz
cd memtester-4.5.1/
gcc -O3 memtester.c tests.c -o memtester
./memtester 512M 1
512M表示测试RAM大小
1表示测试一次
打印如下
  1. root@firefly:~/memtester-4.5.1# ./memtester 512M 1

  2. memtester version 4.5.1 (64-bit)

  3. Copyright (C) 2001-2020 Charles Cazabon.

  4. Licensed under the GNU General Public License version 2 (only).

  5. pagesize is 4096

  6. pagesizemask is 0xfffffffffffff000

  7. want 512MB (536870912 bytes)

  8. got  512MB (536870912 bytes), trying mlock ...locked.

  9. Loop 1/1:

  10. Stuck Address       : ok

  11. Random Value        : ok

  12. Compare XOR         : ok

  13. Compare SUB         : ok

  14. Compare MUL         : ok

  15. Compare DIV         : ok

  16. Compare OR          : ok

  17. Compare AND         : ok

  18. Sequential Increment: ok

  19. Solid Bits          : ok

  20. Block Sequential    : ok

  21. Checkerboard        : ok

  22. Bit Spread          : ok

  23. Bit Flip            : ok

  24. Walking Ones        : ok

  25. Walking Zeroes      : ok

  26. Done.
复制代码

EMMC
dmesg | grep mmc
可以看到打印
  1. mmc3: new ultra high speed SDR104 SDIO card at address 0001

  2. [    2.312867] mmc3:mmc host rescan start!
复制代码

其中high speed SDR104表示emmc 设备支持的时钟模式:

Speed Mode
clock (MHz)
Default Speed26
Hight Speed SDR52
Hight Speed DDR52
HS200200
HS400200
SDR : 单边沿采样
DDR : 双边沿采样
所以我们这里x8-bit理论最大吞吐量应该是52MB/S。
输入df回车
我们看到EMMC的/dev/mmcblk0p7挂在了目录/userdata
我们就在该目录下读写文件测试
  1. root@firefly:~/memtester-4.5.1# df

  2. Filesystem     1K-blocks    Used Available Use% Mounted on

  3. udev             1984744       8   1984736   1% /dev

  4. tmpfs             399616    1168    398448   1% /run

  5. /dev/mmcblk0p6   2666944 2599912         0 100% /root-ro

  6. /dev/mmcblk0p7  26999224 6355668  20627172  24% /userdata

  7. overlayroot     26999224 6355668  20627172  24% /

  8. tmpfs            1998060       0   1998060   0% /dev/shm

  9. tmpfs               5120       4      5116   1% /run/lock

  10. tmpfs            1998060       0   1998060   0% /sys/fs/cgroup

  11. tmpfs             399612       0    399612   0% /run/user/0

  12. tmpfs             399612       8    399604   1% /run/user/1000

  13. root@firefly:~/memtester-4.5.1#
复制代码

dd if=/userdata/test.bin of=/dev/null bs=块大小 count=块数量
dd if=/dev/zero of=/userdata/test.bin bs=块大小 count=块数量
测试记录如下

bs/count 1GB
bs/count 1GB
指令
结果
16k/65536dd if=/userdata/test.bin of=/dev/null bs=16k count=65536 iflag=direct36.5 MB/s
4k/262144dd if=/userdata/test.bin of=/dev/null bs=4k count=262144 iflag=direct14.7 MB/s
1k/1048576dd if=/userdata/test.bin of=/dev/null bs=1k count=10485764 iflag=direct2.2 MB/s
16k/65536dd if=/dev/zero of=/userdata/test.bin bs=16k count=65536 conv=fdatasync118 MB/s
4k/262144dd if=/dev/zero of=/userdata/test.bin bs=4k count=262144 conv=fdatasync112 MB/s
1k/1048576dd if=/dev/zero of=/userdata/test.bin bs=1k count=1048576 conv=fdatasync64.6 MB/s


QT

sudo apt-get install qt5-default qtcreator
直接板上使用qtcreator开发,操作也比较流畅


GPU

sudo apt install glmark2
运行
输入glmark2回车

最终得分
  1. =======================================================

  2. glmark2 Score: 49

  3. =======================================================
复制代码

视频硬件编解码

/usr/local/test.mp4
1080P, 24Fps, H264
播放流畅


总结

综合各方面,该开发板性能都非常不错,特别适合人机交互,AI,边缘计算等高性能要求的场景。




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表