FreezeJ' Blog

linux性能压测unixbench

2021-02-03

官方地址:https://github.com/kdlucas/byte-unixbench
参考文档:https://www.cnblogs.com/chenshengkai/p/12761467.html
一键部署文档:https://unixbench.org

介绍

UnixBench 是一个类 Unix 系(Unix,BSD,Linux)统下的性能测试工具,一个开源工具,被广泛用与测试 Linux 系统主机的性能。UnixBench 的主要测试项目有:系统调用、读写、进程、图形化测试、2D、3D、管道、运算、C库等系统基准性能提供测试数据。

安装与使用

wget https://github.com/kdlucas/byte-unixbench/archive/v5.1.3.tar.gz
tar xf v5.1.3.tar.gz
cd byte-unixbench-5.1.3/UnixBench/ 
make all
./Run  # 开始测试

测试结果输出样例

make all
make[1]: Entering directory `/root/byte-unixbench-5.1.3/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
make[1]: Leaving directory `/root/byte-unixbench-5.1.3/UnixBench'
sh: 3dinfo: command not found

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com


1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput  1 2 3

1 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

1 x File Copy 256 bufsize 500 maxblocks  1 2 3

1 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

1 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

1 x Process Creation  1 2 3

1 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

1 x Shell Scripts (1 concurrent)  1 2 3

1 x Shell Scripts (8 concurrent)  1 2 3

4 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

4 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

4 x Execl Throughput  1 2 3

4 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

4 x File Copy 256 bufsize 500 maxblocks  1 2 3

4 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

4 x Pipe Throughput  1 2 3 4 5 6 7 8 9 10

4 x Pipe-based Context Switching  1 2 3 4 5 6 7 8 9 10

4 x Process Creation  1 2 3

4 x System Call Overhead  1 2 3 4 5 6 7 8 9 10

4 x Shell Scripts (1 concurrent)  1 2 3

4 x Shell Scripts (8 concurrent)  1 2 3

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: 10-13-60-10: GNU/Linux
   OS: GNU/Linux -- 4.19.0-9.el7.ucloud.x86_64 -- #1 SMP Mon Sep 28 10:29:09 UTC 2020
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel Xeon Processor (Cascadelake) (4988.3 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 1: Intel Xeon Processor (Cascadelake) (4988.3 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 2: Intel Xeon Processor (Cascadelake) (4988.3 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 3: Intel Xeon Processor (Cascadelake) (4988.3 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   12:24:19 up 55 min,  1 user,  load average: 0.00, 0.00, 0.00; runlevel 3

------------------------------------------------------------------------
Benchmark Run: Wed Feb 03 2021 12:24:19 - 12:52:20
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       39052471.1 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     4678.8 MWIPS (9.8 s, 7 samples)
Execl Throughput                               4180.2 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        812977.9 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          226389.1 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1797453.8 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1133692.6 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 205071.1 lps   (10.0 s, 7 samples)
Process Creation                               7756.9 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   7373.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   2377.5 lpm   (60.0 s, 2 samples)
System Call Overhead                        1002414.6 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   39052471.1   3346.4
Double-Precision Whetstone                       55.0       4678.8    850.7
Execl Throughput                                 43.0       4180.2    972.1
File Copy 1024 bufsize 2000 maxblocks          3960.0     812977.9   2053.0
File Copy 256 bufsize 500 maxblocks            1655.0     226389.1   1367.9
File Copy 4096 bufsize 8000 maxblocks          5800.0    1797453.8   3099.1
Pipe Throughput                               12440.0    1133692.6    911.3
Pipe-based Context Switching                   4000.0     205071.1    512.7
Process Creation                                126.0       7756.9    615.6
Shell Scripts (1 concurrent)                     42.4       7373.4   1739.0
Shell Scripts (8 concurrent)                      6.0       2377.5   3962.4
System Call Overhead                          15000.0    1002414.6    668.3
                                                                   ========
System Benchmarks Index Score                                        1334.5

------------------------------------------------------------------------
Benchmark Run: Wed Feb 03 2021 12:52:20 - 13:20:23
4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables      155206864.5 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    18689.9 MWIPS (9.8 s, 7 samples)
Execl Throughput                              13565.3 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        979567.6 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          268098.1 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       2636003.3 KBps  (30.0 s, 2 samples)
Pipe Throughput                             4471722.0 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 841688.0 lps   (10.0 s, 7 samples)
Process Creation                              21755.9 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  18783.7 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   2718.3 lpm   (60.0 s, 2 samples)
System Call Overhead                        3223264.3 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0  155206864.5  13299.6
Double-Precision Whetstone                       55.0      18689.9   3398.2
Execl Throughput                                 43.0      13565.3   3154.7
File Copy 1024 bufsize 2000 maxblocks          3960.0     979567.6   2473.7
File Copy 256 bufsize 500 maxblocks            1655.0     268098.1   1619.9
File Copy 4096 bufsize 8000 maxblocks          5800.0    2636003.3   4544.8
Pipe Throughput                               12440.0    4471722.0   3594.6
Pipe-based Context Switching                   4000.0     841688.0   2104.2
Process Creation                                126.0      21755.9   1726.7
Shell Scripts (1 concurrent)                     42.4      18783.7   4430.1
Shell Scripts (8 concurrent)                      6.0       2718.3   4530.4
System Call Overhead                          15000.0    3223264.3   2148.8
                                                                   ========
System Benchmarks Index Score                                        3264.1

测试记录

ucloud 4核8G快杰型

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: 10-13-75-71: GNU/Linux
   OS: GNU/Linux -- 4.19.0-9.el7.ucloud.x86_64 -- #1 SMP Mon Sep 28 10:29:09 UTC 2020
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel Xeon Processor (Cascadelake) (4988.3 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 1: Intel Xeon Processor (Cascadelake) (4988.3 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 2: Intel Xeon Processor (Cascadelake) (4988.3 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 3: Intel Xeon Processor (Cascadelake) (4988.3 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   12:24:24 up 55 min,  1 user,  load average: 0.15, 0.08, 0.03; runlevel 3

------------------------------------------------------------------------
Benchmark Run: Wed Feb 03 2021 12:24:24 - 12:52:25
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       39281877.6 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     4706.7 MWIPS (9.7 s, 7 samples)
Execl Throughput                               4436.4 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        815285.3 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          226851.6 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       2015066.4 KBps  (30.0 s, 2 samples)
Pipe Throughput                             1141632.8 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 209188.4 lps   (10.0 s, 7 samples)
Process Creation                               8153.9 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   7738.6 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   2465.8 lpm   (60.0 s, 2 samples)
System Call Overhead                        1011905.0 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   39281877.6   3366.1
Double-Precision Whetstone                       55.0       4706.7    855.8
Execl Throughput                                 43.0       4436.4   1031.7
File Copy 1024 bufsize 2000 maxblocks          3960.0     815285.3   2058.8
File Copy 256 bufsize 500 maxblocks            1655.0     226851.6   1370.7
File Copy 4096 bufsize 8000 maxblocks          5800.0    2015066.4   3474.3
Pipe Throughput                               12440.0    1141632.8    917.7
Pipe-based Context Switching                   4000.0     209188.4    523.0
Process Creation                                126.0       8153.9    647.1
Shell Scripts (1 concurrent)                     42.4       7738.6   1825.1
Shell Scripts (8 concurrent)                      6.0       2465.8   4109.6
System Call Overhead                          15000.0    1011905.0    674.6
                                                                   ========
System Benchmarks Index Score                                        1375.3

------------------------------------------------------------------------
Benchmark Run: Wed Feb 03 2021 12:52:25 - 13:20:28
4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables      155861885.7 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    18764.3 MWIPS (9.8 s, 7 samples)
Execl Throughput                              14271.7 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       1118395.6 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          309112.3 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       3273387.5 KBps  (30.0 s, 2 samples)
Pipe Throughput                             4519769.5 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 853611.8 lps   (10.0 s, 7 samples)
Process Creation                              22781.9 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  19746.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   2858.9 lpm   (60.0 s, 2 samples)
System Call Overhead                        2927537.5 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0  155861885.7  13355.8
Double-Precision Whetstone                       55.0      18764.3   3411.7
Execl Throughput                                 43.0      14271.7   3319.0
File Copy 1024 bufsize 2000 maxblocks          3960.0    1118395.6   2824.2
File Copy 256 bufsize 500 maxblocks            1655.0     309112.3   1867.7
File Copy 4096 bufsize 8000 maxblocks          5800.0    3273387.5   5643.8
Pipe Throughput                               12440.0    4519769.5   3633.3
Pipe-based Context Switching                   4000.0     853611.8   2134.0
Process Creation                                126.0      22781.9   1808.1
Shell Scripts (1 concurrent)                     42.4      19746.4   4657.2
Shell Scripts (8 concurrent)                      6.0       2858.9   4764.9
System Call Overhead                          15000.0    2927537.5   1951.7
                                                                   ========
System Benchmarks Index Score                                        3438.7

阿里云1核2G

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: freezej: GNU/Linux
   OS: GNU/Linux -- 3.10.0-1127.el7.x86_64 -- #1 SMP Tue Mar 31 23:36:51 UTC 2020
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz (5000.0 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   12:02:41 up 200 days, 21:19,  1 user,  load average: 0.38, 0.15, 0.09; runlevel 3

------------------------------------------------------------------------
Benchmark Run: Wed Feb 03 2021 12:02:41 - 12:30:56
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       28293644.7 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3533.3 MWIPS (9.8 s, 7 samples)
Execl Throughput                               1457.9 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        154235.3 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           46285.5 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        545207.9 KBps  (30.1 s, 2 samples)
Pipe Throughput                              218427.1 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  74236.5 lps   (10.0 s, 7 samples)
Process Creation                               5328.1 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   2239.7 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    303.6 lpm   (60.3 s, 2 samples)
System Call Overhead                         125176.9 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   28293644.7   2424.5
Double-Precision Whetstone                       55.0       3533.3    642.4
Execl Throughput                                 43.0       1457.9    339.1
File Copy 1024 bufsize 2000 maxblocks          3960.0     154235.3    389.5
File Copy 256 bufsize 500 maxblocks            1655.0      46285.5    279.7
File Copy 4096 bufsize 8000 maxblocks          5800.0     545207.9    940.0
Pipe Throughput                               12440.0     218427.1    175.6
Pipe-based Context Switching                   4000.0      74236.5    185.6
Process Creation                                126.0       5328.1    422.9
Shell Scripts (1 concurrent)                     42.4       2239.7    528.2
Shell Scripts (8 concurrent)                      6.0        303.6    506.0
System Call Overhead                          15000.0     125176.9     83.5
                                                                   ========
System Benchmarks Index Score                                         399.7

首都在线4核8G

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.3)

   System: localhost: GNU/Linux
   OS: GNU/Linux -- 3.10.0-1127.el7.x86_64 -- #1 SMP Tue Mar 31 23:36:51 UTC 2020
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz (4988.3 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 1: Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz (4988.3 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 2: Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz (4988.3 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   CPU 3: Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz (4988.3 bogomips)
          x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   14:26:54 up  3:45,  2 users,  load average: 0.00, 0.01, 0.05; runlevel 3

------------------------------------------------------------------------
Benchmark Run: Mon Mar 01 2021 14:26:54 - 14:54:54
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       39618622.3 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     4705.7 MWIPS (9.8 s, 7 samples)
Execl Throughput                               3169.1 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        544999.6 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          144313.1 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1734969.9 KBps  (30.0 s, 2 samples)
Pipe Throughput                              685883.2 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 162999.7 lps   (10.0 s, 7 samples)
Process Creation                               9451.4 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   7392.4 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   2445.9 lpm   (60.0 s, 2 samples)
System Call Overhead                         555569.8 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   39618622.3   3394.9
Double-Precision Whetstone                       55.0       4705.7    855.6
Execl Throughput                                 43.0       3169.1    737.0
File Copy 1024 bufsize 2000 maxblocks          3960.0     544999.6   1376.3
File Copy 256 bufsize 500 maxblocks            1655.0     144313.1    872.0
File Copy 4096 bufsize 8000 maxblocks          5800.0    1734969.9   2991.3
Pipe Throughput                               12440.0     685883.2    551.4
Pipe-based Context Switching                   4000.0     162999.7    407.5
Process Creation                                126.0       9451.4    750.1
Shell Scripts (1 concurrent)                     42.4       7392.4   1743.5
Shell Scripts (8 concurrent)                      6.0       2445.9   4076.4
System Call Overhead                          15000.0     555569.8    370.4
                                                                   ========
System Benchmarks Index Score                                        1107.6
------------------------------------------------------------------------
Benchmark Run: Mon Mar 01 2021 14:54:54 - 15:22:56
4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables      158126264.1 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                    18781.7 MWIPS (9.8 s, 7 samples)
Execl Throughput                              12148.5 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       1103979.2 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          293514.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       3550932.4 KBps  (30.0 s, 2 samples)
Pipe Throughput                             2734769.8 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 604487.8 lps   (10.0 s, 7 samples)
Process Creation                              34074.2 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                  19903.3 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   2771.8 lpm   (60.0 s, 2 samples)
System Call Overhead                        2004238.9 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0  158126264.1  13549.8
Double-Precision Whetstone                       55.0      18781.7   3414.9
Execl Throughput                                 43.0      12148.5   2825.2
File Copy 1024 bufsize 2000 maxblocks          3960.0    1103979.2   2787.8
File Copy 256 bufsize 500 maxblocks            1655.0     293514.0   1773.5
File Copy 4096 bufsize 8000 maxblocks          5800.0    3550932.4   6122.3
Pipe Throughput                               12440.0    2734769.8   2198.4
Pipe-based Context Switching                   4000.0     604487.8   1511.2
Process Creation                                126.0      34074.2   2704.3
Shell Scripts (1 concurrent)                     42.4      19903.3   4694.2
Shell Scripts (8 concurrent)                      6.0       2771.8   4619.7
System Call Overhead                          15000.0    2004238.9   1336.2
                                                                   ========
System Benchmarks Index Score                                        3170.1
Tags: Linux
使用支付宝打赏
使用微信打赏

若你觉得我的文章对你有帮助,欢迎点击上方按钮对我打赏