使用unixbench进行Linux服务器性能基准测试

安装相关依赖

  • CentOS
	yum -y install gcc gcc-c++ make libXext-devel perl perl-Time-HiRes
	yum -y groupinstall "Development Tools"
	yum -y install libX11-devel mesa-libGL-devel perl-Time-HiRes
  • Debian, Ubuntu
	apt-get install libx11-dev libgl1-mesa-dev libxext-dev perl perl-modules make

下载源码

	yum install zip unzip -y
	wget https://github.com/kdlucas/byte-unixbench/archive/master.zip
	unzip master.zip
	cd ./master/byte-unixbench-master/UnixBench
	./Run

运行输出(部分)


.......

make distr
make[2]: Entering directory `/root/downloads/byte-unixbench-master/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[2]: Leaving directory `/root/downloads/byte-unixbench-master/UnixBench'
make programs
make[2]: Entering directory `/root/downloads/byte-unixbench-master/UnixBench'
make[2]: Nothing to be done for `programs'.
make[2]: Leaving directory `/root/downloads/byte-unixbench-master/UnixBench'
make[1]: Leaving directory `/root/downloads/byte-unixbench-master/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

------------------------------------------------------------------------------
   Use directories for:
      * File I/O tests (named fs***) = /root/downloads/byte-unixbench-master/UnixBench/tmp
      * Results                      = /root/downloads/byte-unixbench-master/UnixBench/results
------------------------------------------------------------------------------


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核 2G , 测试结果

   BYTE UNIX Benchmarks (Version 5.1.3)

   System: aliyun: GNU/Linux
   OS: GNU/Linux -- 3.10.0-1062.9.1.el7.x86_64 -- #1 SMP Fri Dec 6 15:49:49 UTC 2019
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz (4988.4 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   11:49:11 up 50 days, 14:41,  3 users,  load average: 0.13, 0.04, 0.05; runlevel 2020-06-10

------------------------------------------------------------------------
Benchmark Run: Thu Jun 25 2020 11:49:11 - 12:17:13
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       34977200.0 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     4914.2 MWIPS (9.6 s, 7 samples)
Execl Throughput                               2872.2 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        563565.1 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          156993.7 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       1226379.4 KBps  (30.0 s, 2 samples)
Pipe Throughput                              871106.6 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 171613.2 lps   (10.0 s, 7 samples)
Process Creation                              11152.2 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   4584.2 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    657.8 lpm   (60.1 s, 2 samples)
System Call Overhead                         789999.6 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   34977200.0   2997.2
Double-Precision Whetstone                       55.0       4914.2    893.5
Execl Throughput                                 43.0       2872.2    668.0
File Copy 1024 bufsize 2000 maxblocks          3960.0     563565.1   1423.1
File Copy 256 bufsize 500 maxblocks            1655.0     156993.7    948.6
File Copy 4096 bufsize 8000 maxblocks          5800.0    1226379.4   2114.4
Pipe Throughput                               12440.0     871106.6    700.2
Pipe-based Context Switching                   4000.0     171613.2    429.0
Process Creation                                126.0      11152.2    885.1
Shell Scripts (1 concurrent)                     42.4       4584.2   1081.2
Shell Scripts (8 concurrent)                      6.0        657.8   1096.4
System Call Overhead                          15000.0     789999.6    526.7
                                                                   ========
System Benchmarks Index Score                                         986.3

[root@aliyun UnixBench]# 

腾讯云 1核2G 测试结果

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

   System: VM_0_4_centos: GNU/Linux
   OS: GNU/Linux -- 3.10.0-1127.13.1.el7.x86_64 -- #1 SMP Tue Jun 23 15:46:38 UTC 2020
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: AMD EPYC 7K62 48-Core Processor (5190.2 bogomips)
          x86-64, MMX, AMD MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   11:35:17 up 14:05,  2 users,  load average: 0.00, 0.06, 0.10; runlevel 2020-06-24

------------------------------------------------------------------------
Benchmark Run: Thu Jun 25 2020 11:35:17 - 12:03:17
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       38855152.6 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     5718.8 MWIPS (9.8 s, 7 samples)
Execl Throughput                               4178.5 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks       1202848.7 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks          330326.0 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks       3292058.8 KBps  (30.0 s, 2 samples)
Pipe Throughput                             2004431.6 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 296849.7 lps   (10.0 s, 7 samples)
Process Creation                              20349.7 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   7339.8 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    995.7 lpm   (60.0 s, 2 samples)
System Call Overhead                        2800500.5 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   38855152.6   3329.5
Double-Precision Whetstone                       55.0       5718.8   1039.8
Execl Throughput                                 43.0       4178.5    971.7
File Copy 1024 bufsize 2000 maxblocks          3960.0    1202848.7   3037.5
File Copy 256 bufsize 500 maxblocks            1655.0     330326.0   1995.9
File Copy 4096 bufsize 8000 maxblocks          5800.0    3292058.8   5676.0
Pipe Throughput                               12440.0    2004431.6   1611.3
Pipe-based Context Switching                   4000.0     296849.7    742.1
Process Creation                                126.0      20349.7   1615.1
Shell Scripts (1 concurrent)                     42.4       7339.8   1731.1
Shell Scripts (8 concurrent)                      6.0        995.7   1659.5
System Call Overhead                          15000.0    2800500.5   1867.0
                                                                   ========
System Benchmarks Index Score                                        1805.4

[root@VM_0_4_centos UnixBench]# 

阿里云的1核2G机子综合分数为986.3 , 腾讯云1核2G机子综合分数为 1805.4

原文: https://www.copahost.com/blog/benchmark-linux-unixbench/

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值