华为云计算 云知识 Httperf是什么
Httperf是什么

简介

Httperf是用于衡量Web服务器性能的工具。 它提供了一种灵活的工具来生成各种HTTP工作负载并评估服务器性能。 Httperf的重点不是实现一个特定的基准,而是提供一个强大的,高性能的工具,该工具有助于构建微观和宏观水平的基准。 Httperf的三个  显着特征是其鲁棒性,包括生成和维持服务器过载的能力,对HTTP / 1.1和SSL协议的支持以及对新工作负载生成器和性能度量的可扩展性。

配置流程

1.配置编译环境

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)进入iotop的安装目录。

cd httperf-0.9.0/

3)修改配置文件

vi config.sub

查找“x86”内容的位置,在其位置后面增加“aarch64”类型。

在“case $basic_machine in”区域的两个位置修改。

a.修改下述内容。

| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \

修改后为:

| x86  | aarch64 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \

b.修改下述内容。

| 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. 运行和验证

执行如下命令,查看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
上一篇:CSE | 服务治理微服务常见故障模式 下一篇:如何加入严选商品转售计划