Test disk access speed:
By installing hdparm, EMMC read and write speed of the test:
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:~/data$ dd count=50 bs=1M if=/dev/zero of=~/data/test.img 50+0 records in 50+0 records out 52428800 bytes (52 MB, 50 MiB) copied, 0.620573 s, 84.5 MB/s
CPU performance test
sysbench is an open source multi-threaded performance testing tool, performance testing can be performed on the CPU / memory / thread / IO / databases. It can apt install sysbench
be installed.
When the CPU test, calculates prime number (divided by total number between 2 and the square root of this number to this number to verify the prime) time until a specified desired value.
sysbench --num-threads=4 --test=cpu --cpu-max-prime=20000 run
RK3399 can see the result in this test is 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): 4825.2500/2066.85 execution time (avg/stddev): 9.9957/0.00
Another performance test run points software nbench, memory may be, integer arithmetic and floating point arithmetic performance testing mononuclear specifically includes the following 10 test items, by wiki reference links to learn more about.
- Numeric sort - Sorts an array of long integers.
- String sort - Sorts an array of strings of arbitrary length.
- Bitfield - Executes a variety of bit manipulation functions.
- Emulated floating-point - A small software floating-point package.
- Fourier coefficients - A numerical analysis routine for calculating series approximations of waveforms.
- Assignment algorithm - A well-known task allocation algorithm.
- Huffman compression - A well-known text and graphics compression algorithm.
- IDEA encryption - A relatively new block cipher algorithm.
- Neural Net - A small but functional back-propagation network simulator.
- LU Decomposition - A robust algorithm for solving linear equations.
Get the source code and compile and run.
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
6 can be seen in the nuclei RK3399 nbench run in integer and floating point division and fractional 79.409 44.893
pi@NanoPi-NEO4:~/nbench-byte-2.2.3$ ./nbench
BYTEmark* Native Mode Benchmark ver. 2 (10/95) Index-split by Andrew D. Balsa (11/97) Linux/Unix* port by Uwe F. Mayer (12/96,11/97) TEST : Iterations/sec. : Old Index : New Index : : Pentium 90* : AMD K6/233* --------------------:------------------:-------------:------------ NUMERIC SORT : 1242.3 : 31.86 : 10.46 STRING SORT : 389.92 : 174.23 : 26.97 BITFIELD : 2.2521e+08 : 38.63 : 8.07 FP EMULATION : 369.93 : 177.51 : 40.96 FOURIER : 23017 : 26.18 : 14.70 ASSIGNMENT : 21.776 : 82.86 : 21.49 IDEA : 6673.9 : 102.07 : 30.31 HUFFMAN : 2230.3 : 61.85 : 19.75 NEURAL NET : 39.53 : 63.50 : 26.71 LU DECOMPOSITION : 1050.7 : 54.43 : 39.31 ==========================ORIGINAL BYTEMARK RESULTS========================== INTEGER INDEX : 79.409 FLOATING-POINT INDEX: 44.893 Baseline (MSDOS*) : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0 ==============================LINUX DATA BELOW=============================== CPU : 6 CPU L2 Cache : OS : Linux 4.4.143 C compiler : gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) libc : static MEMORY INDEX : 16.723 INTEGER INDEX : 22.505 FLOATING-POINT INDEX: 24.899 Baseline (LINUX) : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38 * Trademarks are property of their respective holder.
The following are the S5P6818 use 32bit system performance:
pi@NanoPi-Fire3:~/work/nbench-byte-2.2.3$ ./nbench
BYTEmark* Native Mode Benchmark ver. 2 (10/95) Index-split by Andrew D. Balsa (11/97) Linux/Unix* port by Uwe F. Mayer (12/96,11/97) TEST : Iterations/sec. : Old Index : New Index : : Pentium 90* : AMD K6/233* --------------------:------------------:-------------:------------ NUMERIC SORT : 660.92 : 16.95 : 5.57 STRING SORT : 88.288 : 39.45 : 6.11 BITFIELD : 1.9179e+08 : 32.90 : 6.87 FP EMULATION : 102.92 : 49.38 : 11.40 FOURIER : 10112 : 11.50 : 6.46 ASSIGNMENT : 12.921 : 49.17 : 12.75 IDEA : 3181.4 : 48.66 : 14.45 HUFFMAN : 1202.3 : 33.34 : 10.65 NEURAL NET : 13.628 : 21.89 : 9.21 LU DECOMPOSITION : 459.08 : 23.78 : 17.17 ==========================ORIGINAL BYTEMARK RESULTS========================== INTEGER INDEX : 36.521 FLOATING-POINT INDEX: 18.158 Baseline (MSDOS*) : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0 ==============================LINUX DATA BELOW=============================== CPU : 8 CPU L2 Cache : OS : Linux 4.4.49-s5p6818 C compiler : gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.11) libc : libc-2.23.so MEMORY INDEX : 8.119 INTEGER INDEX : 9.939 FLOATING-POINT INDEX: 10.071 Baseline (LINUX) : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38 * Trademarks are property of their respective holder.
The results of the test run on the same platform 64bit system corresponding to:
BYTEmark* Native Mode Benchmark ver. 2 (10/95)
Index-split by Andrew D. Balsa (11/97) Linux/Unix* port by Uwe F. Mayer (12/96,11/97) TEST : Iterations/sec. : Old Index : New Index : : Pentium 90* : AMD K6/233* --------------------:------------------:-------------:------------ NUMERIC SORT : 800.68 : 20.53 : 6.74 STRING SORT : 159.48 : 71.26 : 11.03 BITFIELD : 2.22e+08 : 38.08 : 7.95 FP EMULATION : 219.6 : 105.37 : 24.32 FOURIER : 11728 : 13.34 : 7.49 ASSIGNMENT : 11.77 : 44.79 : 11.62 IDEA : 3420.5 : 52.32 : 15.53 HUFFMAN : 1133.7 : 31.44 : 10.04 NEURAL NET : 15.737 : 25.28 : 10.63 LU DECOMPOSITION : 532.56 : 27.59 : 19.92 ==========================ORIGINAL BYTEMARK RESULTS========================== INTEGER INDEX : 45.950 FLOATING-POINT INDEX: 21.031 Baseline (MSDOS*) : Pentium* 90, 256 KB L2-cache, Watcom* compiler 10.0 ==============================LINUX DATA BELOW=============================== CPU : 8 CPU L2 Cache : OS : Linux 4.4.49-s5p6818 C compiler : gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) libc : libc-2.27.so MEMORY INDEX : 10.064 INTEGER INDEX : 12.645 FLOATING-POINT INDEX: 11.664 Baseline (LINUX) : AMD K6/233*, 512 KB L2-cache, gcc 2.7.2.3, libc-5.4.38 * Trademarks are property of their respective holder.
Comparing the test results below, the computing performance, increased by 26% integer, floating point increased by 16%:
Test items | 32bit | 64bit | Poor performance |
---|---|---|---|
NUMERIC SORT | 660.92 | 800.68 | 21% |
STRING SORT | 88.288 | 159.48 | 81% |
BITFIELD | 1.92E + 08 | 2.22E + 08 | 16% |
FP EMULATION | 102.92 | 219.6 | 113% |
FOURIER | 10112 | 11728 | 16% |
ASSIGNMENT | 12.921 | 11.77 | -9% |
IDEA | 3181.4 | 3420.5 | 8% |
HUFFMAN | 1202.3 | 1133.7 | -6% |
NEURAL NET | 13.628 | 15.737 | 15% |
LU DECOMPOSITION | 459.08 | 532.56 | 16% |
INTEGER | 36.521 | 45.95 | 26% |
FLOATING-POINT | 18.158 | 21.031 | 16% |
DDR Performance Test
Created on the small machine memory disk, cache frequently read and write and have the required speed small files into memory, of course, it can also be used to test the read and write speed:
dolphin@localhost:/$ sudo mkdir /ram
dolphin@localhost:/$ sudo mount -t tmpfs -o size=100m,mode=0777 tmpfs /ram
dolphin@localhost:/$ cd ram dolphin@localhost:/ram$ dd count=80 bs=1M if=/dev/zero of=/ram/test.img 50+0 records in 50+0 records out 52428800 bytes (52 MB, 50 MiB) copied, 0.134943 s, 389 MB/s
Sysbench can also be used to test, for example, specify four threads, buffer size is 64KB, transmitting the test data in memory 10G:
sysbench --threads=4 --memory-block-size=64k --memory-total-size=10G memory run
10240.00 MiB transferred (3538.21 MiB/sec) General statistics: total time: 2.8907s total number of events: 163840 Latency (ms): min: 0.01 avg: 0.07 max: 11.02 95th percentile: 0.10 sum: 11207.68 Threads fairness: events (avg/stddev): 40960.0000/0.00 execution time (avg/stddev): 2.8019/0.02
Small gifts around and Jane book to my attention
Author: shaniadolphin
link: https: //www.jianshu.com/p/7a0dc79ced11
Source: Jane book
Jane book copyright reserved by the authors, are reproduced in any form, please contact the author to obtain authorization and indicate the source.