日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

ARM嵌入式平台性能测试

發(fā)布時間:2025/3/21 编程问答 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ARM嵌入式平台性能测试 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

在新項目需要選擇一個全新的基于ARM嵌入式處理器平臺的時候,難免會需要對新平臺的性能進行評估,這時候有幾種思路可以進行參考,一是ARM芯片廠家發(fā)布的性能指標(biāo),不過大多數(shù)是基于理論情況;二是購買同樣平臺的開發(fā)板移植應(yīng)用進行實測,效果最直接但是可能需要花費較大精力和時間;那么這個時候也可以考慮使用針對性的benchmark軟件在目標(biāo)平臺上面進行性能測試,算是一個折衷的方法,其結(jié)果有一定參考意義但由于影響benchmark軟件結(jié)果的因素不僅僅是硬件本身,還有不同的BSP以及軟件設(shè)定等,因此在這些設(shè)定一致性越大的前提下其結(jié)果的參考意義才越大,否則很可能結(jié)果不是預(yù)期想要的甚至南轅北轍.

?

基于上面思路,本文統(tǒng)一采用Toradex工業(yè)產(chǎn)品等級?ARM計算機模塊以及其官方發(fā)布的最新版Linux BSPV2.5Beta3最為測試基準(zhǔn)平臺,同時將對結(jié)果影響比較大的CPU主頻和顯示輸出分辨率盡可能保持一致來進行測試,測試樣本分別是基于NVIDIA Tegra2的Colibri T20 512M,?基于NXP i.MX6DL?的Colibri i.MX6DL 512M以及基于NXP Vybrid的Colibri VF61 256M;其中前兩個均為雙核Cortex-A9 ARM核心,第三個為Cortex-A5和M4異構(gòu)雙核核心,不過這里只測試A5.

?

1).?本文涉及的硬件平臺測試項目及工具如下

a).?硬件平臺

上述三種接口兼容的Colibri ARM?計算機模塊以及一塊Colibri Eva Board

b).?測試項目及對應(yīng)工具

- CPU測試: nbench

- Memory測試: stream

- Storage測試: dd, hdparm

- Ethernet測試: iperf

- CPU壓力測試: stress

- GPU壓力測試: glmark2

注:所涉及工具除glmark2均已經(jīng)在BSP中預(yù)裝.

?

2).?測試進程以及結(jié)果

a).?預(yù)設(shè)

參考這里為兩個A9平臺關(guān)閉DVFS(dynamic voltage and frequency switching), Colibri T20 CPU主頻設(shè)定為1GHz, Colibri i.MX6DL CPU主頻設(shè)定為800MHz, Colibri VF61不支持DVFS則無需設(shè)定;

顯示分辨率所有平臺均統(tǒng)一設(shè)置為默認(rèn)值640x480.

b). CPU測試

進入/usr/bin運行下面命令

# nbench

?

- Colibri T20結(jié)果如下

=============LINUX DATA BELOW=============?

CPU???????????????? : Dual?????????????????? ???????????????????????????????????

L2 Cache??????????? :??????????????????????????????????????????????????????????

OS????????????????? : Linux 3.1.10-V2.5b3+gc8ead50?????????????????????????????

C compiler????????? : arm-angstrom-linux-gnueabi-gcc????? ??????????????????????

libc??????????????? : static???????????????????????????????????????????????????

MEMORY INDEX??????? : 5.042????????????????????????????????????????????????????

INTEGER INDEX?????? : 5.245??????????????????????????????????????????? ?????????

FLOATING-POINT INDEX: 6.401????????????????????????????????????????????????????

Baseline (LINUX)??? : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38

--------------------------------------------------------------------------

?

- Colibri i.MX6DL?結(jié)果如下

==============LINUX DATA BELOW=========

CPU???????????????? : Dual ARMv7 Processor rev 10 (v7l)????????????????????????

L2 Cache??????????? :??????????????????????????????????????????????????????????

OS????????????????? : Linux 3.14.28-V2.5b3+g0632def????????????????????????????

C compiler????????? : arm-angstrom-linux-gnueabi-gcc???????????????????????????

libc??????????????? : static???????????????????????????????????????????????????

MEMORY INDEX ???????: 4.028????????????????????????????????????????????????????

INTEGER INDEX?????? : 4.177????????????????????????????????????????????????????

FLOATING-POINT INDEX: 5.137????????????????????????????????????????????????????

Baseline (LINUX)??? : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38

----------------------------------------------------------------------------

?

Colibri VF61?結(jié)果如下

==============LINUX DATA BELOW=========

CPU???????????????? : ARMv7 Processor rev 1 (v7l)??????????????????? ???????????

L2 Cache??????????? :??????????????????????????????????????????????????????????

OS????????????????? : Linux 4.1.15-v2.5b3+ge6d111c?????????????????????????????

C compiler????????? : arm-angstrom-linux-gnueabi-gcc???????????????????????????

libc??????????????? : static???????????????????????????????????????????????????

MEMORY INDEX??????? : 1.896????????????????????????????????????????????????????

INTEGER INDEX?????? : 2.337????????????????????????????????????????????????????

FLOATING-POINT INDEX: 2.139????????????????????????????????????????????????????

Baseline (LINUX)??? : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38

---------------------------------------------------------------------

nbench結(jié)果為單個CPU性能,可以看出T20和i.MX6同為A9核心基本處于統(tǒng)一水平,T20因為主頻略高要有一定優(yōu)勢,而VF61因為是A5核心同時主頻低則相對要差一些.另外系統(tǒng)還內(nèi)置了另一個CPU測試工具lmbench,這里就不詳述了.

?

c). Memory測試

運行下面命令

# stream

?

- Colibri T20結(jié)果如下

==================================

STREAM copy latency: 33.38 nanoseconds?????????????????????????????????????????

STREAM copy bandwidth: 479.33 MB/sec???????????????????????????????????????????

STREAM scale latency: 35.58 nanoseconds????????????????????????????????????????

STREAM scale bandwidth: 449.65 MB/sec??????????????????????????????????????????

STREAM add latency: 41.73 nanoseconds??????????????????????????????????????????

STREAM add bandwidth: 575.10 MB/sec????????????????????????????????????????????

STREAM triad latency: 42.90 nanoseconds????????????????????????????????????????

STREAM triad bandwidth: 559.44 MB/sec

---------------------------------------------------------

?

- Colibri i.MX6DL?結(jié)果如下

=================================

STREAM copy latency: 18.33 nanoseconds?????????????????????????????????????????

STREAM copy bandwidth: 873.08 MB/sec?????????? ?????????????????????????????????

STREAM scale latency: 23.45 nanoseconds????????????????????????????????????????

STREAM scale bandwidth: 682.30 MB/sec??????????????????????????????????????????

STREAM add latency: 26.90 nanoseconds?????????????????????? ????????????????????

STREAM add bandwidth: 892.26 MB/sec????????????????????????????????????????????

STREAM triad latency: 25.58 nanoseconds????????????????????????????????????????

STREAM triad bandwidth: 938.16 MB/sec?

------------------------------------------------------

- Colibri VF61?結(jié)果如下

=================================

STREAM copy latency: 30.53 nanoseconds?????????????????????????????????????????

STREAM copy bandwidth: 524.09 MB/sec???????????????????????????????????????????

STREAM scale latency: 30.78 nanoseconds????????????????????????????????????????

STREAM scale bandwidth: 519.82 MB/sec??????????????????????????????????????????

STREAM add latency: 134.66 nanoseconds?????????????????????????????????????????

STREAM add bandwidth: 178.23 MB/sec????????????????????????????????????????????

STREAM triad latency: 149.24 nanoseconds???????????????????????????????????????

STREAM triad bandwidth: 160.81 MB/sec

-----------------------------------------------------------

?

d). Storage測試

./?由于T20和VF61直接使用了Nand Flash,無法使用hdparm測試,所以我們統(tǒng)一采用我們采用dd來測試模塊自帶flash存儲.

運行下面命令

sync;time -p bash -c "(dd if=/dev/zero bs=1024 count=100000 of=/test.file;sync)"?? //測試寫速度

echo 3 > /proc/sys/vm/drop_caches ;time dd if=/test.file of=/dev/null bs=1024????????????? //測試讀速度

?

- Colibri T20結(jié)果如下

讀取測試,約為14.7MB/sec

=======================

100000+0 records in????????????????????????????????????????????????????????????

100000+0 records out???????????????????????????????????????????????????????????

real??? 0m6.795s???????????????????????????????????????????????????????????????

user??? 0m0.030s???????????????????????????????????????????????????????????????

sys???? 0m1.830s

-----------------------------------------

寫入測試,約為9MB/sec

========================

100000+0 records in????????????????????????????????????????????????????????????

100000+0 records out???????????????????????????????????????????????????????????

real 11.08?????????????????????????????????????????????????????????? ???????????

user 0.01??????????????????????????????????????????????????????????????????????

sys 2.19?????????

-----------------------------------------

?

- Colibri i.MX6DL結(jié)果如下

讀取測試,約為43.5MB/sec

========================

100000+0 records in????????????????????????????????????????????????????????????

100000+0 records out???????????????????????????????????????????????????????????

real??? 0m2.306s???????????????????????????????????????????????????????????????

user??? 0m0.020s???????????????????????????????????????????????????????????????

sys???? 0m0.680s

--------------------------------------------

寫入測試,約為10MB/sec

=========================

100000+0 records in????????????????????????????????????????????????????????????

100000+0 records out???????????????????????????????????????????????????????????

real 10.07?????????????????????????????????????????????????????????????????????

user 0.09??????????????????????????????????????????????????????????????????????

sys 3.64

-------------------------------------------

?

- Colibri VF61?結(jié)果如下

讀取測試,約為24MB/sec

========================

[ 1178.378483] sh (407): drop_caches: 3????????????????????????????????????????

100000+0 records in???????????????????????????????????????????????????????? ????

100000+0 records out???????????????????????????????????????????????????????????

real??? 0m4.161s???????????????????????????????????????????????????????????????

user??? 0m0.100s???????????????????????????????????????????????????????????????

sys???? 0m3.180s

------------------------------------------

寫入測試,約為12.8MB/sec

========================

100000+0 records in????????????????????????????????????????????????????????????

100000+0 records out?????????????????????????????????????????????????????? ?????

real 7.78??????????????????????????????????????????????????????????????????????

user 0.13??????????????????????????????????????????????????????????????????????

sys 3.85

-----------------------------------

?

./?使用hdparm測試外部8G SD卡讀取速度

運行下面命令

hdparm -t /dev/mmcblk1p1

?

- Colibri T20結(jié)果如下

====================

/dev/mmcblk0p1:????????????????????????????????????????????????????????????????

?Timing buffered disk reads:? 52 MB in? 3.02 seconds =? 17.22 MB/sec

------------------------------------

?

- Colibri i.MX6DL?結(jié)果如下

====================

/dev/mmcblk1p1:????????????????????????????????????????????????????????????????

?Timing buffered disk reads:? 56 MB in? 3.09 seconds =? 18.13 MB/sec

------------------------------------

?

- Colibri VF61?結(jié)果如下

=====================

/dev/mmcblk0p1:????????????????????????????????????????????????????????????????

?Timing buffered disk reads:? 54 MB in? 3.07 seconds =? 17.60 MB/sec

-------------------------------------

?

e). Ethernet測試

將測試目標(biāo)板和Linux主機連接到同一局域網(wǎng),目標(biāo)板為100M網(wǎng)口.

在Linux主機端運行下面命令(以TCP測試為例,也可以更改參數(shù)進行其他測試)

iperf -s

在目標(biāo)板上面運行下面命令

iperf -c $hostip -t 60 -P 8

?

- Colibri T20結(jié)果如下

=========================

[SUM]? 0.0-60.1 sec?? 676 MBytes? 94.3 Mbits/sec

------------------------------------------

?

- Colibri i.MX6DL?結(jié)果如下

=======================

[SUM]? 0.0-60.2 sec?? 677 MBytes? 94.4 Mbits/sec

---------------------------------------

?

- Colibri VF61?結(jié)果如下

=======================

[SUM]? 0.0-60.1 sec?? 674 MBytes? 94.2 Mbits/sec

---------------------------------------

?

f). CPU壓力測試

在三個平臺上面分別運行下面命令

# stress -c 2

在另一終端中使用”top”命令查看CPU使用狀態(tài),兩個CPU均已經(jīng)滿負(fù)荷

?

g). GPU壓力測試

首先需要安裝glmark2工具,這里通過Toradex openembedded環(huán)境編譯出了相關(guān)的ipk安裝包,具體環(huán)境配置可以參考這里,?這里以Colibri i.MX6平臺為例.

安裝流程

opkg install libpng12_1.2.51-r0_armv7at2hf-vfp-neon.ipk

opkg install glmark2_2014.03-r0_armv7at2hf-vfp-neon-mx6qdl.ipk

運行

glmark2-es2

=======================================================????????????????????????

??? glmark2 2014.03????????????????????????????????????????????????????????????

=======================================================????????????????????????

??? OpenGL Information?????????????????????????????????????????????????????????

??? GL_VENDOR:???? Vivante Corporation?????????????????????????????????????????

??? GL_RENDERER:?? Vivante GC880 ???????????????????????????????????????????????

??? GL_VERSION:??? OpenGL ES 3.0 V5.0.11.p4.25762??????????????????????????????

=======================================================????????????????????????

[build] use-vbo=false: FPS: 495 FrameTime: 2.020 ms????????????????????????????

[build] use-vbo=true: FPS: 908 FrameTime: 1.101 ms?????????????????????????????

[texture] texture-filter=nearest: FPS: 702 FrameTime: 1.425 ms?????????????????

[texture] texture-filter=linear: FPS: 664 FrameTime: 1.506 ms??????????????????

[texture] texture-filter=mipmap: FPS: 704 FrameTime: 1.420 ms??????????????????

[shading] shading=gouraud: FPS: 485 FrameTime: 2.062 ms????????????????????????

[shading] shading=blinn-phong-inf: FPS: 248 FrameTime: 4.032 ms???????? ????????

[shading] shading=phong: FPS: 151 FrameTime: 6.623 ms??????????????????????????

[shading] shading=cel: FPS: 114 FrameTime: 8.772 ms????????????????????????????

[bump] bump-render=high-poly: FPS: 159 FrameTime: 6.289 ms?????????????????????

[bump] bump-render=normals: FPS: 426 FrameTime: 2.347 ms???????????????????????

[bump] bump-render=height: FPS: 340 FrameTime: 2.941 ms????????????????????????

[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 104 FrameTime: 9.615 ms????????????

[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 37 FrameTime: 27.027 ms?

[pulsar] light=false:quads=5:texture=false: FPS: 601 FrameTime: 1.664 ms???????

[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 52 F

rameTime: 19.231 ms??????? ?????????????????????????????????????????????????????

[desktop] effect=shadow:windows=4: FPS: 212 FrameTime: 4.717 ms????????????????

[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:

update-method=map: FPS: 52 FrameTime: 19.231 ms????????????????????????????????

[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:

update-method=subdata: FPS: 51 FrameTime: 19.608 ms????????????????????????????

[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:u

pdate-method=map: FPS: 62 FrameTime: 16.129 ms?????????????????????????????????

[ideas] speed=duration: FPS: 46 FrameTime: 21.739 ms???????????????????????????

[jellyfish] <default>: FPS: 89 FrameTime: 11.236 ms?????????????? ??????????????

[terrain] <default>: FPS: 4 FrameTime: 250.000 ms??????????????????????????????

[shadow] <default>: FPS: 175 FrameTime: 5.714 ms???????????????????????????????

[refract] <default>: FPS: 27 FrameTime: 37.037 ms????????????????????????????? ?

[conditionals] fragment-steps=0:vertex-steps=0: FPS: 427 FrameTime: 2.342 ms???

[conditionals] fragment-steps=5:vertex-steps=0: FPS: 93 FrameTime: 10.753 ms???

[conditionals] fragment-steps=0:vertex-steps=5: FPS: 383 FrameTime: 2.611 ms???

[function] fragment-complexity=low:fragment-steps=5: FPS: 173 FrameTime: 5.780 m

s??????????????????????????????????????????????????????????????????????????????

[function] fragment-complexity=medium:fragment-steps=5: FPS: 51 FrameTime: 19.60

8 ms??????????????????? ????????????????????????????????????????????????????????

[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 156 FrameTime:

6.410 ms???????????????????????????????????????????????????????????????????????

[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 156 FrameTim

e: 6.410 ms????????????????????????????????????????????????????????????????????

[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 82 FrameTime:

?12.195 ms????????? ????????????????????????????????????????????????????????????

=======================================================????????????????????????

????????????????????????????????? glmark2 Score: 255???????????????????????????

=======================================================

總結(jié)

以上是生活随笔為你收集整理的ARM嵌入式平台性能测试的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。