鯤鵬服務器上phoronix-test-suite移植和使用
Phoronix Test Suite是一款性能測試軟件,其實就是一款集中測試軟件,可以在Linux, Solaris, OS X, 和 BSD操作系統上進行benchmark測試。該軟件集成了各式各樣的測試軟件,但是每個測試項都要聯網下載。默認自帶60多個測試套件和200多個獨立的測試profile。每個profile都可以在phoronix-test-suite中單獨進行測試。測試套件則由一組測試profile組成。一個profile由Bash/shell腳本和xml文件組成。
1?????? 安裝準備
華為云購買一臺鯤鵬服務器
本文以云服務器KC1實例搭建,云服務器配置如表1-1所示。
表1-1?云服務器配置
項目
說明
規格
kc1.large.2 | 2vCPUs | 4GB
磁盤
系統盤:高IO(40GB)
表1-2?Ubuntu操作系統要求
項目
說明
-
Ubuntu
18.04
在公共鏡像中已提供。
Kernel
4.15.0
在公共鏡像中已提供。
2?????? 配置編譯環境
安裝依賴。
apt-get?install?php-cli?php-xml?-y
3?????? 獲取源碼
cd?/usr/local/src wget?https://github.com/phoronix-test-suite/phoronix-test-suite/archive/v9.8.0.tar.gz?-O?phoronix-test-suite-9.8.0.tar.gz
4?????? 編譯和安裝
tar?-zxvf?phoronix-test-suite-9.8.0.tar.gz cd?phoronix-test-suite-9.8.0 ./install-sh
5?????? 運行和驗證
1)???????? 常用命令驗證。
phoronix-test-suite list-available-tests 查看所有支持的測試項
phoronix-test-suite list-available-suite 查看所有支持的測試套件
phoronix-test-suite list-save-results 查看所有保存的測試結果
phoronix-test-suite list-install-tests 查看所有已安裝的測試
phoronix-test-suite show-result result-file查看測試結果
phoronix-test-suite result-file-to-pdf result-file 將結果文件轉化為pdf格式
phoronix-test-suite result-file-to-json result-file 將結果文件轉化為json格式
phoronix-test-suite result-file-to-text result-file 將結果文件轉化為text格式
phoronix-test-suite run pts/cpu 運行pts/cpu測試套件
2)???????? 測試redis。
本人已在鯤鵬云服務器上驗證過下述軟件,其他軟件暫未進行測試,請根據實際需要選擇軟件進行測試。
l? pts/git
l? pts/openssl
l? pts/redis
l? pts/iozone
l? pts/sysbench
l? pts/leveldb
l? pts/php
本例以“pts/redis-1.2.0”為例進行說明。
phoronix-test-suite?benchmark?pts/redis-1.2.0
如下顯示測試步驟:
... Redis?5.0.5 ????pts/redis-1.2.0 ????System?Test?Configuration ????????1:?SET ????????2:?GET ????????3:?LPUSH ????????4:?LPOP ????????5:?SADD ????????6:?Test?All?Options ????????**?Multiple?items?can?be?selected,?delimit?by?a?comma.?** ????????Test:?1??#選擇測試的項 ... ????Would?you?like?to?save?these?test?results?(Y/n):Y?//是否保存測試結果 ????Enter?a?name?for?the?result?file:?redis-result?//輸入結果文件的名稱 ????Enter?a?unique?name?to?describe?this?test?run?/?configuration:?redis-config??//輸入唯一名稱來描述此測試運行/配置 If?desired,?enter?a?new?description?below?to?better?describe?this?result?set?/?system?configuration?under?test.Press?ENTER?to?proceed?without?changes. Current?Description:?VMware?testing?on?CentOS?Linux?7?via?the?Phoronix?Test?Suite. New?Description:??//描述信息,可以不填,直接回車 ... ????Do?you?want?to?view?the?text?results?of?the?testing?(Y/n):n?//是否瀏覽測試結果 ??? ????Would?you?like?to?upload?the?results?to?OpenBenchmarking.org?(y/n):y?/可以選擇是否上傳到官網,這樣可以和其他測試人員數據進行對比 ????Would?you?like?to?attach?the?system?logs?(lspci,?dmesg,?lsusb,?etc)?to?the?test?result?(Y/n):y ??? ????Results?Uploaded?To:?http://openbenchmarking.org/result/[testid]
本地的測試結果保存在 /var/lib/phoronix-test-suite/test-results/redis-result文件夾中。是否上傳在測試結束時候可以進行人工選擇。如果上傳了,可以通過登陸http://openbenchmarking.org/result/[testid]本次測試結果中顯示了CPU、主板、內存、硬盤、操作系統、顯卡、網絡、文件系統、編譯器等系統信息。
鯤鵬 Redis
版權聲明:本文內容由網絡用戶投稿,版權歸原作者所有,本站不擁有其著作權,亦不承擔相應法律責任。如果您發現本站中有涉嫌抄襲或描述失實的內容,請聯系我們jiasou666@gmail.com 處理,核實后本網站將在24小時內刪除侵權內容。