ARM平台常⽤性能测试⽅法
测试磁盘读写速度:测试磁盘读写速度:
通过安装hdparm,可以测试EMMC的读写速度:
dolphin@localhost:~$ sudo apt-get install hdparm
dolphin@localhost:/dev$ sudo hdparm -Tt /dev/mmcblk1
/dev/mmcblk1:
Timing cached reads: 1202 MB in 2.00 seconds = 601.20 MB/sec Timing buffered disk reads: 340 MB in 3.01 seconds = 113.01 MB/sec dolphin@localhost
sysbench是⼀款开源的多线程性能测试⼯具,可以执⾏CPU/内存/线程/IO/数据库等⽅⾯的性能测试。可以通过apt install sysbench来安
装。
CPU 测试时,会计算素数(对这个数字除以 2 到这个数字平⽅根之间的所有数字来验证素数)直到某个指定值所需要的时间。
sysbench --num-threads=4 --test=cpu --cpu-max-prime=20000 run
可以看到RK3399在该测试下的结果是9.9957s:
Threads started!
CPU speed:
events per second: 1927.70
General statistics:
total time: 10.0027s
total number of events: 19301 Latency (ms): min: 1.42 avg: 2.07 max: 22.63 95th percentile: 3.62 sum: 39982.94 Threads fairness: events (avg/stddev):
另⼀个性能测试跑分软件是nbench,可以对单个核进⾏内存、整型运算和浮点运算性能测试,具体包括以下10个测试项,可以通过进⼀步
了解。
1. Numeric sort - Sorts an array of long integers.
2. String sort - Sorts an array of strings of arbitrary length.
3. Bitfield - Executes a variety of bit manipulation functions.
4. Emulated floating-point - A small .
5. Fourier coefficients - A numerical analysis routine for calculating series approximations of waveforms.
6. Assignment algorithm - A well-known task allocation algorithm.
7. Huffman compression - A well-known text and graphics compression algorithm.
8. IDEA encryption - A relatively new block cipher algorithm.
9. Neural Net - A small but functional back-propagation network simulator.
10. LU Decomposition - A robust algorithm for solving linear equations.
wget http://www.math.utah.edu/~mayer/linux/nbench-byte-2.2.3.tar.gz
tar -xvzf nbench-byte-2.2.3.tar.gz
cd nbench-byte-2.2.3 make ./nbench
评论0
最新资源