unixbrench 測試linux服務器性能

###1. 安裝unixbrench前端

下載unixbrench,連接https://codeload.github.com/kdlucas/byte-unixbench/tar.gz/v5.1.3git

安裝gcc,perl,cpan等軟件後編譯github

解壓後進入UnixBrench目錄後執行make命令編譯,編譯後的可執行文件爲該目錄下的Runshell

須要正常運行的話須要cpan安裝其餘一些perl模塊編程

###2.運行unixbrench數組

# ./Run緩存

make all
make[1]: Entering directory `/data/packages/byte-unixbench-5.1.3/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory `/data/packages/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

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

   System: localhost.localdomain: GNU/Linux
   OS: GNU/Linux -- 2.6.32-431.el6.x86_64 -- #1 SMP Fri Nov 22 03:15:09 UTC 2013
   Machine: x86_64 (x86_64)
   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
   CPU 0: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz (5200.1 bogomips)
          Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
   18:44:50 up 5 days,  2:50,  3 users,  load average: 0.79, 0.65, 0.36; runlevel 3

------------------------------------------------------------------------
Benchmark Run: Sun Jun 05 2016 18:44:50 - 19:12:10
1 CPU in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       33092148.4 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3660.8 MWIPS (6.6 s, 7 samples)
Execl Throughput                               1532.8 lps   (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        247093.7 KBps  (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks           63618.3 KBps  (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks        770743.9 KBps  (30.0 s, 2 samples)
Pipe Throughput                              357787.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                  67189.2 lps   (10.0 s, 7 samples)
Process Creation                               3151.6 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   2685.3 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                    366.1 lpm   (60.1 s, 2 samples)
System Call Overhead                         367540.4 lps   (10.0 s, 7 samples)

System Benchmarks Index Values               BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   33092148.4   2835.7
Double-Precision Whetstone                       55.0       3660.8    665.6
Execl Throughput                                 43.0       1532.8    356.5
File Copy 1024 bufsize 2000 maxblocks          3960.0     247093.7    624.0
File Copy 256 bufsize 500 maxblocks            1655.0      63618.3    384.4
File Copy 4096 bufsize 8000 maxblocks          5800.0     770743.9   1328.9
Pipe Throughput                               12440.0     357787.4    287.6
Pipe-based Context Switching                   4000.0      67189.2    168.0
Process Creation                                126.0       3151.6    250.1
Shell Scripts (1 concurrent)                     42.4       2685.3    633.3
Shell Scripts (8 concurrent)                      6.0        366.1    610.2
System Call Overhead                          15000.0     367540.4    245.0
                                                                   ========
System Benchmarks Index Score                                         500.2

測試由如下幾個項目組成dom

Dhrystone測試函數

測試聚焦在字符串處理,沒有浮點運算操做。這個測試用於測試連接器編譯、代碼優化、內存緩存、等待狀態、整數數據類型等,硬件和軟件設計都會很是大的影響測試結果。性能

Whetstone 測試

這項測試項目用於測試浮點運算效率和速度。這項測試項目包含若干個科學計算的典型性能模塊,包含大量的C語言函數,sin cos sqrt exp和日誌以及使用整數和浮點的數學操做。包含數組訪問、條件分支和過程調用。

Execl Throughput(execl 吞吐,這裏的execl是類unix系統很是重要的函數,非辦公軟件的execl)測試

這項測試測試每秒execl函數調用次數。execl是 exec函數家族的一部分,使用新的圖形處理代替當前的圖形處理。有許多命令和前端的execve()函數命令很是類似。

File Copy測試

這項測試衡量文件數據從一個文件被傳輸到另一個,使用大量的緩存。包括文件的讀、寫、複製測試,測試指標是必定時間內被重寫、讀、複製的字符數量。

Pipe Throughput(管道吞吐)測試

pipe是簡單的進程之間的通信。管道吞吐測試是測試在一秒鐘一個進程寫512比特到一個管道中而且讀回來的次

數。管道吞吐測試和實際編程有差距。

Pipe-based Context Switching (基於管道的上下文交互)測試

這項測試衡量兩個進程經過管道交換和整數倍的增長吞吐的次數。基於管道的上下文切換和真實程序很相似。測試程序產生一個雙向管道通信的子線程。

Process Creation(進程建立)測試

這項測試衡量一個進程能產生子線程而且當即退出的次數。新進程真的建立進程阻塞和內存佔用,因此測試程序直接使用內存帶寬。這項測試用於典型的比較大量的操做系統進程建立操做。

Shell Scripts測試

shell腳本測試用於衡量在一分鐘內,一個進程能夠啓動並中止shell腳本的次數,一般會測試1,2, 3, 4, 8 個shell腳本的共同拷貝,shell腳本是一套轉化數據文件的腳本。

System Call Overhead (系統調用消耗)測試

這項測試衡量進入和離開系統內核的消耗,例如,系統調用的消耗。程序簡單重複的執行getpid調用(返回調用的進程id)。消耗的指標是調用進入和離開內核的執行時間。

相關文章
相關標籤/搜索