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

无锡网络建站旅游主题网站怎么做

无锡网络建站,旅游主题网站怎么做,旅游网站设计总结,关键词自然排名优化目标 通过对网站的压测,让大家了解Apache与Nginx的性能差距。 实施 1、安装服务 dnf -y install httpd httpd-tools nginx 2、针对Apache进行压测 2.1、启动Apache systemctl start httpd 2.2、压测 [rootlocalhost ~]# # 使用ab测试(10万请求&a…

目标

        通过对网站的压测,让大家了解Apache与Nginx的性能差距。

实施

1、安装服务

dnf -y install httpd httpd-tools nginx

2、针对Apache进行压测

2.1、启动Apache

systemctl start httpd

2.2、压测

[root@localhost ~]# # 使用ab测试(10万请求,并发100)
[root@localhost ~]# ab -n 100000 -c 100 http://localhost:80/
This is ApacheBench, Version 2.3 <$Revision: 1903618 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requestsServer Software:        Apache/2.4.58
Server Hostname:        localhost
Server Port:            80Document Path:          /
Document Length:        3929 bytesConcurrency Level:      100
Time taken for tests:   8.632 seconds
Complete requests:      100000
Failed requests:        0
Non-2xx responses:      100000
Total transferred:      419800000 bytes
HTML transferred:       392900000 bytes
Requests per second:    11584.60 [#/sec] (mean)
Time per request:       8.632 [ms] (mean)
Time per request:       0.086 [ms] (mean, across all concurrent requests)
Transfer rate:          47492.34 [Kbytes/sec] receivedConnection Times (ms)min  mean[+/-sd] median   max
Connect:        0    1   1.5      1      35
Processing:     0    7   4.2      7     101
Waiting:        0    6   3.7      6     100
Total:          1    9   4.3      8     114Percentage of the requests served within a certain time (ms)50%      866%      975%     1080%     1190%     1395%     1598%     1999%     25100%    114 (longest request)

2.3、压测结果分析

# 测试基本信息
This is ApacheBench, Version 2.3 <$Revision: 1903618 $>  # ab工具版本信息
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking localhost (be patient)          # 开始对localhost进行压测
Completed 10000 requests                     # 每完成1万请求输出一次进度
[...省略中间进度...]
Finished 100000 requests                     # 总10万请求完成# 服务器信息
Server Software:        Apache/2.4.58       # 被测试的Web服务器软件及版本
Server Hostname:        localhost           # 测试目标主机名
Server Port:            80                  # 测试目标端口# 请求内容信息
Document Path:          /                   # 测试的URL路径(根目录)
Document Length:        3929 bytes          # 返回的HTML内容长度(约3.9KB)# 压测参数
Concurrency Level:      100                 # 并发连接数(-c参数)
Time taken for tests:   8.632 seconds       # 总测试耗时(从开始到结束)
Complete requests:      100000              # 完成的请求总数(-n参数)
Failed requests:        0                   # 失败的请求数(超时/连接错误)
Non-2xx responses:      100000              # 非HTTP 2xx状态码的响应数(需排查)
Total transferred:      419800000 bytes     # 总传输数据量(含HTTP头)
HTML transferred:       392900000 bytes     # 总HTML内容传输量(3929B × 10万)# 性能核心指标
Requests per second:    11584.60 [#/sec] (mean)  # 每秒请求数(QPS/RPS)
Time per request:       8.632 [ms] (mean)        # 单个请求平均耗时(服务端视角)
Time per request:       0.086 [ms] (mean, across all concurrent requests)  # 客户端视角单个请求耗时
Transfer rate:          47492.34 [Kbytes/sec] received  # 数据传输速率(47.49MB/s)# 连接时间分布(单位:毫秒)
Connection Times (ms)min  mean[+/-sd] median   max
Connect:        0    1   1.5      1      35  # TCP连接建立时间(从SYN到ACK)
Processing:     0    7   4.2      7     101  # 服务器处理请求时间(从收到请求到返回)
Waiting:        0    6   3.7      6     100  # 请求排队等待时间(Processing的子集)
Total:          1    9   4.3      8     114  # 总耗时(Connect + Processing)# 延迟百分位数(重要性能指标)
Percentage of the requests served within a certain time (ms)50%      8    # 50%的请求在8ms内完成(中位数)66%      9    # 66%的请求≤9ms75%     10    # 75%的请求≤10ms80%     11    # 80%的请求≤11ms90%     13    # 90%的请求≤13ms95%     15    # 95%的请求≤15ms98%     19    # 98%的请求≤19ms99%     25    # 99%的请求≤25ms(P99延迟)100%    114 (longest request)  # 最慢请求耗时114ms

3、针对Nginx进行压测

3.1、启动Nginx

systemctl start httpd

3.2、压测

[root@localhost ~]# # 使用ab测试(10万请求,并发100)
[root@localhost ~]# ab -n 100000 -c 100 http://localhost:80/
This is ApacheBench, Version 2.3 <$Revision: 1903618 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requestsServer Software:        nginx/1.24.0
Server Hostname:        localhost
Server Port:            80Document Path:          /
Document Length:        3510 bytesConcurrency Level:      100
Time taken for tests:   3.535 seconds
Complete requests:      100000
Failed requests:        0
Total transferred:      374400000 bytes
HTML transferred:       351000000 bytes
Requests per second:    28289.92 [#/sec] (mean)
Time per request:       3.535 [ms] (mean)
Time per request:       0.035 [ms] (mean, across all concurrent requests)
Transfer rate:          103435.02 [Kbytes/sec] receivedConnection Times (ms)min  mean[+/-sd] median   max
Connect:        0    1   0.7      1       8
Processing:     0    2   0.9      2       8
Waiting:        0    2   0.8      2       8
Total:          1    4   1.0      3      11
WARNING: The median and mean for the total time are not within a normal deviationThese results are probably not that reliable.Percentage of the requests served within a certain time (ms)50%      366%      475%      480%      490%      595%      698%      799%      7100%     11 (longest request)

3.3、压测结果分析

[root@localhost ~]# ab -n 100000 -c 100 http://localhost:80/  # 运行ApacheBench命令,参数说明:-n 100000(总请求数)-c 100(并发数)测试目标URL  
This is ApacheBench, Version 2.3 <$Revision: 1903618 $>       # ApacheBench版本信息  
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/  # 版权信息及原始开发者  
Licensed to The Apache Software Foundation, http://www.apache.org/        # 授权信息及当前维护组织  Benchmarking localhost (be patient)  # 开始测试目标服务器(localhost),提示需要耐心等待  
Completed 10000 requests  # 已完成10000个请求的进度提示  
Completed 20000 requests  # 已完成20000个请求的进度提示  
Completed 30000 requests  # 已完成30000个请求的进度提示  
Completed 40000 requests  # 已完成40000个请求的进度提示  
Completed 50000 requests  # 已完成50000个请求的进度提示  
Completed 60000 requests  # 已完成60000个请求的进度提示  
Completed 70000 requests  # 已完成70000个请求的进度提示  
Completed 80000 requests  # 已完成80000个请求的进度提示  
Completed 90000 requests  # 已完成90000个请求的进度提示  
Completed 100000 requests  # 所有100000个请求完成  
Finished 100000 requests  # 测试完全结束  Server Software:        nginx/1.24.0  # 服务器使用的软件及版本(此处为Nginx 1.24.0)  
Server Hostname:        localhost  # 服务器主机名(测试目标地址)  
Server Port:            80  # 服务器监听的端口号(HTTP默认端口80)  Document Path:          /  # 请求的URL路径(根路径/)  
Document Length:        3510 bytes  # 测试页面的实际响应内容长度(单位字节)  Concurrency Level:      100  # 并发请求数设置(同时发起100个请求)  
Time taken for tests:   3.535 seconds  # 整个测试耗时总时间(从第一个请求开始到最后一个请求完成)  
Complete requests:      100000  # 成功完成的请求数(无失败时等于总请求数)  
Failed requests:        0  # 失败的请求数(0表示所有请求均成功)  
Total transferred:      374400000 bytes  # 所有请求接收的总字节数(包括HTTP头和内容)  
HTML transferred:       351000000 bytes  # 所有请求实际HTML内容的总字节数(不包括HTTP头)  
Requests per second:    28289.92 [#/sec] (mean)  # 每秒处理请求数(Requests per Second, RPS),平均值  
Time per request:       3.535 [ms] (mean)  # 每个请求的平均处理时间(单个请求从发送到接收完成的时间)  
Time per request:       0.035 [ms] (mean, across all concurrent requests)  # 并发场景下每个请求的平均时间(总耗时除以并发数,反映服务器吞吐能力)  
Transfer rate:          103435.02 [Kbytes/sec] received  # 每秒接收的数据量(单位KB/s,反映网络传输效率)  Connection Times (ms)  # 连接和处理时间统计表的标题  min  mean[+/-sd] median   max  # 列标题:最小值、平均值(±标准差)、中位数、最大值  
Connect:        0    1   0.7      1       8  # 建立连接的时间统计(最小/平均/标准差/中位数/最大值)  
Processing:     0    2   0.9      2       8  # 服务器处理请求的时间(不包含网络传输时间)  
Waiting:        0    2   0.8      2       8  # 服务器等待处理的时间(通常等于Processing,表示后端处理延迟)  
Total:          1    4   1.0      3      11  # 总耗时(Connect + Processing)  WARNING: The median and mean for the total time are not within a normal deviation  # 警告提示  These results are probably not that reliable.  # 结果可靠性提示(因数据波动大可能不可靠)  Percentage of the requests served within a certain time (ms)  # 请求响应时间百分比分布表的标题  50%      3  # 50%的请求在3ms内完成  66%      4  # 66%的请求在4ms内完成(常用于系统可靠性评估)  75%      4  # 75%的请求在4ms内完成  80%      4  # 80%的请求在4ms内完成  90%      5  # 90%的请求在5ms内完成(关键性能指标)  95%      6  # 95%的请求在6ms内完成  98%      7  # 98%的请求在7ms内完成  99%      7  # 99%的请求在7ms内完成  100%     11 (longest request)  # 最长单个请求耗时11ms  

http://www.dtcms.com/wzjs/597307.html

相关文章:

  • 让别人做一个网站需要多少钱网络优化需要哪些知识
  • 成品网站 子目录打不开网上做翻译兼职网站
  • wordpress制作网站教程湛江网站营销
  • 东莞 网站建设收费建设网站注意哪几点
  • 更合公司网站建设个人网站下载
  • 专门做名片的网站机场建设集团网站
  • vue做的项目网站百度app平台
  • 帮别人做违法网站会判刑吗三亚做网站公司
  • 信丰县建设局网站网站与系统对接图文方案
  • 网站开发工具可视化昆明网站的优化
  • 聊城营销网站建设价格东莞三网合一网站制作
  • 网站开发怎么让别人看到做p2p网站费用
  • jsp网站建设模板烟台网站制作公司在线咨询
  • 新学校网站建设成果房产网站cms
  • 奉化建设局网站广州最新通告
  • 重庆市网上房地产官网电脑优化大师有用吗
  • 支付单页网站模板商业设计说明
  • 呼和浩特电子商务网站建设站内优化包括哪些
  • 做盗版视频网站成本多少电子商务的发展现状和前景趋势
  • 做包装找灵感看什么网站友情链接中有个网站域名过期了会影响
  • 自助建设视频网站codepen wordpress
  • 局门户网站的建设方案宣传册样式
  • 有免费做理化试验的网站吗hao123网站难做吗
  • 制作公司网站用阿里云本人找做钢筋笼的活网站
  • 网站服务器租用价格多少钱一年wordpress架站教程
  • 济源做网站的好公司施工企业qc小组
  • 网站开发需求文档prd模板WordPress快速发布文章
  • wordpress站长之家贵阳58同城做网站公司
  • 网站微商城的建设运营实践和思考网站增加流量
  • 虚拟网站怎么做的搭建电商平台网站