簡(jiǎn)介
Httperf是用于衡量Web服務(wù)器性能的工具。 它提供了一種靈活的工具來(lái)生成各種HTTP工作負(fù)載并評(píng)估服務(wù)器性能。 Httperf的重點(diǎn)不是實(shí)現(xiàn)一個(gè)特定的基準(zhǔn),而是提供一個(gè)強(qiáng)大的,高性能的工具,該工具有助于構(gòu)建微觀和宏觀水平的基準(zhǔn)。 Httperf的三個(gè) 顯著特征是其魯棒性,包括生成和維持服務(wù)器過(guò)載的能力,對(duì)HTTP / 1.1和SSL協(xié)議的支持以及對(duì)新工作負(fù)載生成器和性能度量的可擴(kuò)展性。
配置流程
1.配置編譯環(huán)境
1)安裝wget包
yum install wget -y
2)獲取源碼
獲取“httperf-0.9.0”源碼包。
cd /usr/local/src
wget https://fossies.org/linux/www/old/httperf-0.9.0.tar.gz
2.編譯和安裝
1)解壓軟件包。
tar -zxvf httperf-0.9.0.tar.gz
2)進(jìn)入iotop的安裝目錄。
cd httperf-0.9.0/
3)修改配置文件
vi config.sub
查找“x86”內(nèi)容的位置,在其位置后面增加“aarch64”類(lèi)型。
在“case $basic_machine in”區(qū)域的兩個(gè)位置修改。
a.修改下述內(nèi)容。
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
修改后為:
| x86 | aarch64 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
b.修改下述內(nèi)容。
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
修改后為:
| x86-* | aarch64-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
4)配置生成Makefile文件。
./configure --host=aarch64 --build=aarch64
5)編譯和安裝httperf。
make && make install
3. 運(yùn)行和驗(yàn)證
執(zhí)行如下命令,查看httperf版本。
httperf --version
回顯信息如下,則表示httperf安裝成功。
httperf: httperf-0.9.0 compiled Feb 17 2020 without DEBUG without TIME_SYSCALLS. httperf --client=0/1 --server=localhost --port=80 --uri=/ --send-buffer=4096 --recv-buffer=16384 --num-conns=1 --num-calls=1 httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE Maximum connect burst length: 0 Total: connections 1 requests 0 replies 0 test-duration 0.000 s Connection rate: 18477.1 conn/s (0.1 ms/conn, <=1 concurrent connections) Connection time [ms]: min 0.0 avg 0.0 max 0.0 median 0.0 stddev 0.0 Connection time [ms]: connect 0.1
Connection length [replies/conn]: 0.000 Request rate: 0.0 req/s (0.0 ms/req)
Request size [B]: 0.0 Reply rate [replies/s]: min 0.0 avg 0.0 max 0.0 stddev 0.0 (0 samples) Reply time [ms]: response 0.0 transfer 0.0 Reply size [B]: header 0.0 content 0.0 footer 0.0 (total 0.0) Reply status: 1xx=0 2xx=0 3xx=0 4xx=0 5xx=0 CPU time [s]: user 0.00 system 0.00 (user 59.1% system 0.0% total 59.1%) Net I/O: 0.0 KB/s (0.0*10^6 bps) Errors: total 1 client-timo 0 socket-timo 0 connrefused 1 connreset 0 Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0