日期:2012-04-03 01:37:00  来源:本站整理

<b>nginx win32 版本静态文件测试 (Windows环境)</b>[服务器安全]

赞助商链接



  本文“<b>nginx win32 版本静态文件测试 (Windows环境)</b>[服务器安全]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:

下载了 Nginx For Win32 的官方版本 nginx 0.7.53

举行了试用以及压力测试.

安装利用方法很简单,直接贴官方的方法:
Win32 Binaries

As of 0.7.52, Nginx is now available as an official Windows binary.

Installation:

cd c:\
unzip nginx-0.7.52.zip
ren nginx-0.7.52 nginx
cd nginx
start nginx

Control:
nginx -s [ stop | quit | reopen | reload ]

For problems look in c:\nginx\logs\error.log or in EventLog.

但要阐明一下的,之前有第三方编译的 Nginx For Windows 版本,是可以加载到 Windows 服务中运行的.但在这个官方版本下该办法行不通.所以倡议暂时手动启动,大概新建一个筹划任务开机启动.

然后迫不及待举行压力测试.我们利用的工具是 Apache 的 ab , 测试的是纯静态页面.就是 Nginx 一装好后默许的 :
Welcome to nginx!

测试号令:./ab -c 100 -n 10000 http://192.168.3.50:8888/
操作系统:Windows server 2003 R2
硬件配置:Xeon 2.8G X2 1G RAM
测试后果:

Server Software: nginx/0.7.53
Server Hostname: 192.168.3.50
Server Port: 8888

Document Path: /
Document Length: 151 bytes

Concurrency Level: 100
Time taken for tests: 107.329 seconds
Complete requests: 10000 (100%处理恳求,没有丧失)
Failed requests: 0
Write errors: 0
Total transferred: 3620000 bytes
HTML transferred: 1510000 bytes
Requests per second: 93.17 [#/sec] (mean) 每秒处理恳求 93.17 个
Time per request: 1073.293 [ms] (mean)
Time per request: 10.733 [ms] (mean, across all concurrent requests)
Transfer rate: 32.94 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 13 44.3 2 550
Processing: 180 1059 350.5 1065 2665
Waiting: 178 1053 352.3 1058 2664
Total: 194 1071 351.9 1074 2668

Percentage of the requests served within a certain time (ms)
50% 1074
66% 1162
75% 1215
80% 1288
90% 1547
95% 1694
98% 1853
99% 1946
100% 2668 (longest request)
################

由测试后果所得,Nginx for windows 100 个线程每秒只能处理 93 个恳求.
假如再启动多一个 ab 来压,加起来就有200个线程,ab后果相当.各端每秒处理93个恳求.
但假如你再启动第三ab 举行 100 个线程压力,正在举行的2个ab 此中一个就会被服务端回绝.

往复尝试改正Nginx的worker_processes 参数无果,改正了 Win2003 的并发线程也无果….莫非 Nginx 在Windows下就只能有这么点本事??回头要再具体找找缘由.

别的还有一个问题,当压力测试完毕了,在 windows 中查看进程会发现 Nginx 还占着 2~30 的cpu.
在号令行下 Nginx -s stop 也无法终止.必须 完毕进程…..

################

初步尝试就这几点,但愿是我个别的问题,有机会的朋友也无妨试试.

配置 PD930 CPU,2G 内存,测试后果以下:

C:\>ab -n 10000 -c 100 http://192.168.1.8/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.8 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests

Server Software: nginx/0.7.52
Server Hostname: 192.168.1.8
Server Port: 80

Document Path: /
Document Length: 151 bytes

Concurrency Level: 100
Time taken for tests: 5.109 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 3620000 bytes
HTML transferred: 1510000 bytes
Requests per second: 1957.19 [#/sec] (mean)
Time per request: 51.094 [ms] (mean)
Time per request: 0.511 [ms] (mean, across all concurrent requests)
Transfer rate: 691.90 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 2.4 0 16
Processing: 16 50 13.3 47 78
Waiting: 0 34 14.4 31 78
Total: 16 51 13.3 47 78

Percentage of the requests served within a certain time (ms)
50% 47
66% 63
75% 63
80% 63
90% 63
95% 63
98% 63
99% 78
100% 78 (longest request)

作者:范堡
来自:http://www.oschina.net/discuss/thread/406


  以上是“<b>nginx win32 版本静态文件测试 (Windows环境)</b>[服务器安全]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
  • <b>hosts是什么 hosts文件在什么位置 若何改正hosts</b>
  • <b>在 Windows 8 中手动安装语言包</b>
  • <b>五个常见 PHP数据库问题</b>
  • Windows中Alt键的12个高效快速的利用本领介绍
  • <b>MySQL ORDER BY 的实现解析</b>
  • <b>详解MySQL存储历程参数有三种范例(in、out、inout)</b>
  • <b>Win8系统恢复出来经典的开始菜单的办法</b>
  • <b>Win8系统花屏怎么办 Win8系统花屏的办理办法</b>
  • <b>Windows 7系统下无线网卡安装</b>
  • <b>为什么 Linux不需求碎片整理</b>
  • <b>Windows 8中删除账户的几种办法(图)</b>
  • <b>教你如安在win7下配置路由器</b>
  • 本文地址: 与您的QQ/BBS好友分享!
    • 好的评价 如果您觉得此文章好,就请您
        0%(0)
    • 差的评价 如果您觉得此文章差,就请您
        0%(0)

    文章评论评论内容只代表网友观点,与本站立场无关!

       评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论
    Copyright © 2020-2022 www.xiamiku.com. All Rights Reserved .