当前位置: 首页 > news >正文

深圳vi设计有哪些鄞州seo整站优化服务

深圳vi设计有哪些,鄞州seo整站优化服务,各行各业网站建设,四川省建设厅官方网站首页linux命令之ab 1.ab介绍 linux命令ab(E.g:apachebench)是apache自带的压力测试工具。ab命令会创建多个并发访问线程,模拟多个访问者同时对某一URL进行访问。由于ab命令测试是基于URL的,因此,它既可以用来测试apache httpd的负载压力&#x…

linux命令之ab

1.ab介绍

linux命令ab(E.g:apachebench)是apache自带的压力测试工具。ab命令会创建多个并发访问线程,模拟多个访问者同时对某一URL进行访问。由于ab命令测试是基于URL的,因此,它既可以用来测试apache httpd的负载压力,也可以对nginx/tomcat/iis等web服务器进行压力测试。

ab命令是基于httpd-tools,因此使用ab命令,需要先安装httpd-tools。

命令:

yum install httpd-tools

[root@centos79 ~]# yum install httpd-tools
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
CentOS79                                                                                                        | 3.6 kB  00:00:00     
软件包 httpd-tools-2.4.6-99.el7.centos.1.x86_64 已安装并且是最新版本
无须任何处理
[root@centos79 ~]# ab -V
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/[root@centos79 ~]# 

2.ab用法

ab [参数] [http[s]://]hostname[:port]/path

ab参数
参数说明
-n所执行的请求个数,默认为一次一个
-c每次产生的请求个数,默认为一次一个
-t指定每个请求的超时时间,默认为30s

3.实例

3.1.查看ab的帮助信息

命令:

ab -h

[root@centos79 ~]# ab -h
Usage: ab [options] [http[s]://]hostname[:port]/path
Options are:-n requests     Number of requests to perform-c concurrency  Number of multiple requests to make at a time-t timelimit    Seconds to max. to spend on benchmarkingThis implies -n 50000-s timeout      Seconds to max. wait for each responseDefault is 30 seconds-b windowsize   Size of TCP send/receive buffer, in bytes-B address      Address to bind to when making outgoing connections-p postfile     File containing data to POST. Remember also to set -T-u putfile      File containing data to PUT. Remember also to set -T-T content-type Content-type header to use for POST/PUT data, eg.'application/x-www-form-urlencoded'Default is 'text/plain'-v verbosity    How much troubleshooting info to print-w              Print out results in HTML tables-i              Use HEAD instead of GET-x attributes   String to insert as table attributes-y attributes   String to insert as tr attributes-z attributes   String to insert as td or th attributes-C attribute    Add cookie, eg. 'Apache=1234'. (repeatable)-H attribute    Add Arbitrary header line, eg. 'Accept-Encoding: gzip'Inserted after all normal header lines. (repeatable)-A attribute    Add Basic WWW Authentication, the attributesare a colon separated username and password.-P attribute    Add Basic Proxy Authentication, the attributesare a colon separated username and password.-X proxy:port   Proxyserver and port number to use-V              Print version number and exit-k              Use HTTP KeepAlive feature-d              Do not show percentiles served table.-S              Do not show confidence estimators and warnings.-q              Do not show progress when doing more than 150 requests-g filename     Output collected data to gnuplot format file.-e filename     Output CSV file with percentages served-r              Don't exit on socket receive errors.-h              Display usage information (this message)-Z ciphersuite  Specify SSL/TLS cipher suite (See openssl ciphers)-f protocol     Specify SSL/TLS protocol(SSL3, TLS1, TLS1.1, TLS1.2 or ALL)
[root@centos79 ~]# 

3.2.使用ab命令进行压力测试(基于nginx)

命令:

ab -n1000 -c100 http://172.20.10.12/
 

[root@centos79 ~]# ab -n1000 -c100 http://172.20.10.12/
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking 172.20.10.12 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requestsServer Software:        nginx/1.24.0
Server Hostname:        172.20.10.12
Server Port:            80Document Path:          /
Document Length:        615 bytesConcurrency Level:      100
Time taken for tests:   0.038 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      848000 bytes
HTML transferred:       615000 bytes
Requests per second:    26250.16 [#/sec] (mean)
Time per request:       3.809 [ms] (mean)
Time per request:       0.038 [ms] (mean, across all concurrent requests)
Transfer rate:          21738.42 [Kbytes/sec] receivedConnection Times (ms)min  mean[+/-sd] median   max
Connect:        0    1   0.6      1       4
Processing:     1    3   0.9      3       9
Waiting:        0    2   0.9      2       8
Total:          2    3   1.1      3       9Percentage of the requests served within a certain time (ms)50%      366%      475%      480%      490%      495%      698%      899%      8100%      9 (longest request)
[root@centos79 ~]# 

其中,

字段说明
Server Software表示被测试的web服务器软件名称
Server Hostname表示请求的url主机名或ip地址
Server Port表示被测试的web服务器软件的监听端口
Document Path表示请求的URL中的根绝对路径
Document Length表示HTTP响应数据的正文长度
Concurrency Level表示并发用户数
Time taken for tests表示所有这些请求被处理完成所花费的总时间
Complete requests表示请求总数
Failed requests表示失败的请求数量,这里的失败是指请求在连接服务器、发送数据等环节发生异常,以及无响应后超时的情况
Write errors表示请求的写错误
Total transferred表示所有请求的响应数据长度总和,包括每个 HTTP 响应数据的头信息和正文数据的长度。注意这里不包括 HTTP 请求数据的长度,仅仅为 web 服务器流向用户 PC 的应用层数据总长度。
HTML transferred表示所有请求的响应数据中正文数据的总和,也就是减去了 Total transferred 中 HTTP 响应数据中的头信息的长度。
Requests per second吞吐量,计算公式:Complete requests/Time taken for tests
Time per request(mean)用户平均请求等待时间,计算公式:Time token for tests/(Complete requests/Concurrency Level)
Time per request(mean, across all concurrent requests)服务器完成一个请求的时间,计算公式:Time per request/Concurrency Level
Transfer rate表示网络传输速度,计算公式:Total transferred/Time taken for tests
Connection Times

本参数是对Time per request(mean)进行细分和统计。

请求的响应时间可以分成网络链接Connect,系统处理Processing和等待Waiting三个部分。表中 min 表示最小值; mean 表示平均值;[+/-sd]表示标准差(Standard Deviation),也称均方差(mean square error),数值越大表示数据越分散,系统响应时间越不稳定。 median 表示中位数; max表示最大值。
total 并不等于前三行数据相加,因为前三行的数据并不是在同一个请求中采集到的,可能某个请求的网络延迟最短,但是系统处理时间又是最长的呢。所以Total 是从整个请求所需要的时间的角度来统计的。

Percentage of requests served within a certain time(ms)表示每个请求处理时间的分布情况,基于上述测试,90%的请求处理时间都不超过4ms

http://www.hrbkazy.com/news/1343.html

相关文章:

  • 一个人做网站难吗今日足球赛事数据
  • 网站关键字个数建网站软件工具
  • 深圳图派做的网站后台加什么网站优化关键词价格
  • 网站的三大标签网站关键词
  • 网站微信收款二维码怎么做江苏seo哪家好
  • 小程序开发平台哪家比较被大家认可如何提高网站seo排名
  • 网站的百度词条怎么做seo网站优化方案案例
  • wordpress的配置文件windows优化大师收费
  • 好听好记的网站域名不付费免费网站
  • 删除百度收录的网站网页自助建站
  • 唐山 建设工程信息网站外链网盘系统
  • 网站返回首页怎么做的好看沈阳优化推广哪家好
  • dw建设的网站上传2023最新15件重大新闻
  • 宁波网站建设找哪家好青岛网络seo公司
  • 英雄联盟韩国站内优化主要从哪些方面进行
  • wordpress支付配置天津百度seo代理
  • 免费动态网站建设seo免费诊断
  • 婺源做网站描述优化方法
  • 购物网站设计会员管理模块市场调研报告万能模板
  • 建网站流程短视频代运营合作方案
  • 曰本免费一级a做爰视频网站朋友圈推广平台
  • 网站建设?首选百川互动重庆seo推广服务
  • 最优网络做网站怎么样深圳百度网站排名优化
  • 珠海网站建设的公司免费企业网站建设
  • Dw制作个人网站有没有购买链接
  • 简述网站建设的一般步骤seo优化排名技术百度教程
  • 做网站要学一些什么最新的新闻 最新消息
  • 天津市城市建设档案馆网站南昌seo排名收费
  • 兰州网站建设网站建设今日小说搜索风云榜
  • 哪里可以做公司网站千万别手贱在百度上搜这些词