centos系統
phoronix-test-suite是目前Linux下比較常用的性能測試軟件。
使用phoronix-test-suite條件前提:需要安裝php5,需要PHP都DOM擴展
因為是雲服務器,首先建立實例,然后使用secureCRT連接IP地址,進入終端
1.下載壓縮包
# wget http://www.phoronix.net/downloads/phoronix-test-suite/releases/phoronix-test-suite-7.4.0.tar.gz
2.解壓
# tar -xzvf phoronix-test-suite-7.4.0.tar.gz
3.安裝
3.1進入phoronix-test-suite的目錄
# cd phoronix-test-suite/
3.2 執行install.sh
# ./install-sh
4.cpu壓力測試
# yum install -y screen
在linux的環境中,我們想要在后台持續運行一些腳本,但是又因為關閉這個tty的話,腳本就會中斷,這個時候我們就需要screen這個工具的幫助啦!已有就不用安裝了
# screen 進入另一個頁面(也可以不進)screen -ls -r 自己搜
# phoronix-test-suite benchmark smallpt
這條命令表示下載、安裝、執行並報告一個簡單的CPU測試smallpt。
這個benchmark命令把整套測試工作(下載、安裝、執行並報告)給執行完畢了。


php安裝完成后再次執行 # phoronix-test-suite benchmark smallpt(在后面是否上傳到官網我選的是n)
輸出如下:
Phoronix Test Suite v7.2.1
To Install: pts/smallpt-1.0.2
Determining File Requirements ..........................................
Searching Download Caches ..............................................
1 Test To Install
1 File To Download [0.01MB]
1MB Of Disk Space Is Needed
pts/smallpt-1.0.2:
Test Installation 1 of 1
1 File Needed [0.01 MB]
Downloading: smallpt-1.tar.gz [0.01MB]
Downloading ........................................................
Installation Size: 0.1 MB
Installing Test @ 23:27:18
System Information
.......
.....
.......
Would you like to save these test results (Y/n):/*該測試命令先下載安裝smalltp測試套件,並識別系統信息。 最后一條顯示是否保存測試結果,選擇Y,提示輸入一個保存文件的結果名字和描述附后,如下段文字顯示,完畢后開始啟 動測試:*/ Enter a name to save these results under: ptstestnmae Enter a unique name to describe this test run / configuration: smalltpIf desired, enter a new description below to better describe this result set / system configuration under test.
Press ENTER to proceed without changes.
Current Description: 2 x Intel Xeon xxxx via the Phoronix Test Suite.
New Description: no description
Smallpt 1.0:
pts/smallpt-1.0.2
Test 1 of 1
Estimated Trial Run Count: 3
Estimated Time To Completion: 4 Minutes [23:33 CDT]
Started Run 1 @ 23:29:57
Started Run 2 @ 23:30:31
Started Run 3 @ 23:31:04
Global Illumination Renderer; 100 Samples:
32
32
32
Average: 32 Seconds
Deviation: 0.00%
Do you want to view the text results of the testing (Y/n): ptstestnmae
no description
smalltp:
……./可以選擇是否上傳到官網,這樣可以和其他測試人員數據進行對比/
Would you like to upload the results to OpenBenchmarking.org (Y/n): Would you like to attach the system logs (lspci, dmesg, lsusb, etc) to the test result (Y/n):Results Uploaded To: http://openbenchmarking.org/result/[testid]
ps:本地的測試結果保存在 /var/lib/phoronix-test-suite/test-results/ptstestnmae文件夾中。是否上傳在測試結束時候可以進行人工選擇。 如果上傳了,可以通過登陸http://openbenchmarking.org/result/[testid]
本次測試結果中顯示了CPU、主板、內存、硬盤、操作系統、顯卡、網絡、文件系統、編譯器等系統信息。5. 自己的結果圖(雲主機是8核16G)
單位:Seconds (數值越小越好)
5.Apache 業務環境測試
單位:Requests Per Second(每秒請求)(數值越大越好)
# phoronix-test-suite benchmark apache
6.內存測試
測試套件:pts/ramspee
# phoronix-test-suite benchmark ramspeed
![]()
結果:
7.磁盤測試
測試套件:pts/tiobench
# phoronix-test-suite benchmark tiobench













