VPS性能测试工具之一: UnixBench跑分测试

第一步,下载安装。登陆我们VPS SSH然后下载UnixBench

wget http://byte-unixbench.googlecode.com/files/unixbench-5.1.2.tar.gz  
tar xvfz unixbench-5.1.2.tar.gz  
cd unixbench-5.1.2  

如果不需要测试图形,注释掉Makefile文件的这一行

#GRAPHIC_TESTS = defined
./Run

第二步,通过上面的命令,UnixBench就开始运行了,运行时间比较久估计十几分钟。我们可以做点其他事情等待结果。最后会有一个综合打分。

这里可能有的机器会有一些问题 第一、如果在MAKE的时候出现GCC错误:

make: gcc: Command not found  
make: *** [pgms/arithoh] Error 127  

我们需要安装gcc

yum install gcc  

然后我们才好make下一步,如果是debian应该是apt-get.

总结,有高人说一般100分以上的是值得购买的,低于100分直接PASS。性能稍微好点的VPS 400分左右。

第二、有人博文说到会有Error: Please install /usr/bin/time提示错误,解决方法是:

#centos/fedora 下运行 
yum install time  
#ubuntu/debian 下运行 
apt-get install time  

第三、Can't locate Time/HiRes.pm错误解决

有的时候在运行./Run时候会出现这样的错误

Can't locate Time/HiRes.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./Run line 6.  
BEGIN failed--compilation aborted at ./Run line 6.  

解决方案也简单,只需要安装组件

yum install perl-Time-HiRes  

运行安装之后我们再运行./Run就可以。

第四、如果出现bash: make: command not found问题

yum -y install gcc automake autoconf libtool make  

运行安装,然后我们make之后再./Run执行。

测试结果如下:

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

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

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

2 x Execl Throughput  1 2 3

2 x File Copy 1024 bufsize 2000 maxblocks  1 2 3

2 x File Copy 256 bufsize 500 maxblocks  1 2 3

2 x File Copy 4096 bufsize 8000 maxblocks  1 2 3

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

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

2 x Process Creation  1 2 3

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

2 x Shell Scripts (1 concurrent)  1 2 3

2 x Shell Scripts (8 concurrent)  1 2 3

========================================================================
   BYTE UNIX Benchmarks (Version 5.1.2)

   System: sherlocky.localdomain: GNU/Linux
   OS: GNU/Linux -- 2.6.32-042stab106.6 -- #1 SMP Mon Apr 20 14:48:47 MSK 2015
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5320.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   CPU 1: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
   13:07:55 up 15 days, 16:23,  2 users,  load average: 0.01, 0.03, 0.00; runlevel 3

------------------------------------------------------------------------
Benchmark Run: 三 10月 28 2015 13:07:55 - 13:36:04  
2 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       25358867.6 lps   (10.0 s, 7 samples)  
Double-Precision Whetstone                     3161.5 MWIPS (10.0 s, 7 samples)  
Execl Throughput                               3247.0 lps   (30.0 s, 2 samples)  
File Copy 1024 bufsize 2000 maxblocks        674953.9 KBps  (30.0 s, 2 samples)  
File Copy 256 bufsize 500 maxblocks          185707.3 KBps  (30.0 s, 2 samples)  
File Copy 4096 bufsize 8000 maxblocks       1365677.8 KBps  (30.0 s, 2 samples)  
Pipe Throughput                             1602489.7 lps   (10.0 s, 7 samples)  
Pipe-based Context Switching                 236459.3 lps   (10.0 s, 7 samples)  
Process Creation                               9274.8 lps   (30.0 s, 2 samples)  
Shell Scripts (1 concurrent)                   4556.9 lpm   (60.0 s, 2 samples)  
Shell Scripts (8 concurrent)                   1036.5 lpm   (60.0 s, 2 samples)  
System Call Overhead                        3507444.8 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX  
Dhrystone 2 using register variables         116700.0   25358867.6   2173.0  
Double-Precision Whetstone                       55.0       3161.5    574.8  
Execl Throughput                                 43.0       3247.0    755.1  
File Copy 1024 bufsize 2000 maxblocks          3960.0     674953.9   1704.4  
File Copy 256 bufsize 500 maxblocks            1655.0     185707.3   1122.1  
File Copy 4096 bufsize 8000 maxblocks          5800.0    1365677.8   2354.6  
Pipe Throughput                               12440.0    1602489.7   1288.2  
Pipe-based Context Switching                   4000.0     236459.3    591.1  
Process Creation                                126.0       9274.8    736.1  
Shell Scripts (1 concurrent)                     42.4       4556.9   1074.7  
Shell Scripts (8 concurrent)                      6.0       1036.5   1727.5  
System Call Overhead                          15000.0    3507444.8   2338.3  
                                                                   ========
System Benchmarks Index Score                                        1214.9

------------------------------------------------------------------------
Benchmark Run: 三 10月 28 2015 13:36:04 - 14:04:14  
2 CPUs in system; running 2 parallel copies of tests

Dhrystone 2 using register variables       50148008.8 lps   (10.0 s, 7 samples)  
Double-Precision Whetstone                     6330.0 MWIPS (10.0 s, 7 samples)  
Execl Throughput                               7660.7 lps   (30.0 s, 2 samples)  
File Copy 1024 bufsize 2000 maxblocks        807288.2 KBps  (30.0 s, 2 samples)  
File Copy 256 bufsize 500 maxblocks          214963.7 KBps  (30.0 s, 2 samples)  
File Copy 4096 bufsize 8000 maxblocks       1992925.4 KBps  (30.0 s, 2 samples)  
Pipe Throughput                             3052533.3 lps   (10.0 s, 7 samples)  
Pipe-based Context Switching                 474289.4 lps   (10.0 s, 7 samples)  
Process Creation                              16603.6 lps   (30.0 s, 2 samples)  
Shell Scripts (1 concurrent)                   8165.1 lpm   (60.0 s, 2 samples)  
Shell Scripts (8 concurrent)                   1135.1 lpm   (60.0 s, 2 samples)  
System Call Overhead                        4998492.4 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX  
Dhrystone 2 using register variables         116700.0   50148008.8   4297.2  
Double-Precision Whetstone                       55.0       6330.0   1150.9  
Execl Throughput                                 43.0       7660.7   1781.6  
File Copy 1024 bufsize 2000 maxblocks          3960.0     807288.2   2038.6  
File Copy 256 bufsize 500 maxblocks            1655.0     214963.7   1298.9  
File Copy 4096 bufsize 8000 maxblocks          5800.0    1992925.4   3436.1  
Pipe Throughput                               12440.0    3052533.3   2453.8  
Pipe-based Context Switching                   4000.0     474289.4   1185.7  
Process Creation                                126.0      16603.6   1317.7  
Shell Scripts (1 concurrent)                     42.4       8165.1   1925.7  
Shell Scripts (8 concurrent)                      6.0       1135.1   1891.8  
System Call Overhead                          15000.0    4998492.4   3332.3  
                                                                   ========
System Benchmarks Index Score                                        1984.5