国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 網(wǎng)站 > Nginx > 正文

nginx win32 版本靜態(tài)文件測(cè)試 (Windows環(huán)境)

2024-08-30 12:24:11
字體:
供稿:網(wǎng)友
下載了 Nginx For Win32 的官方版本 nginx 0.7.53

進(jìn)行了試用以及壓力測(cè)試。

安裝使用方式很簡(jiǎn)單,直接貼官方的方式:
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 服務(wù)中運(yùn)行的。但在這個(gè)官方版本下該方法行不通。所以建議暫時(shí)手動(dòng)啟動(dòng),或者新建一個(gè)計(jì)劃任務(wù)開機(jī)啟動(dòng)。

然后迫不及待進(jìn)行壓力測(cè)試。我們使用的工具是 Apache 的 ab , 測(cè)試的是純靜態(tài)頁(yè)面。就是 Nginx 一裝好后默認(rèn)的 :
Welcome to nginx!

測(cè)試命令:./ab -c 100 -n 10000 http://192.168.3.50:8888/
操作系統(tǒng):Windows server 2003 R2
硬件配置:Xeon 2.8G X2 1G RAM
測(cè)試結(jié)果:

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%處理請(qǐng)求,沒有丟失)
Failed requests: 0
Write errors: 0
Total transferred: 3620000 bytes
HTML transferred: 1510000 bytes
Requests per second: 93.17 [#/sec] (mean) 每秒處理請(qǐng)求 93.17 個(gè)
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)
################

由測(cè)試結(jié)果所得,Nginx for windows 100 個(gè)線程每秒只能處理 93 個(gè)請(qǐng)求。
如果再啟動(dòng)多一個(gè) ab 來壓,加起來就有200個(gè)線程,ab結(jié)果相當(dāng)。各端每秒處理93個(gè)請(qǐng)求。
但如果你再啟動(dòng)第三ab 進(jìn)行 100 個(gè)線程壓力,正在進(jìn)行的2個(gè)ab 其中一個(gè)就會(huì)被服務(wù)端拒絕。

來回嘗試修改Nginx的worker_processes 參數(shù)無果,修改了 Win2003 的并發(fā)線程也無果….難道 Nginx 在Windows下就只能有這么點(diǎn)能耐??回頭要再詳細(xì)找找原因。

另外還有一個(gè)問題,當(dāng)壓力測(cè)試完畢了,在 windows 中查看進(jìn)程會(huì)發(fā)現(xiàn) Nginx 還占著 2~30 的cpu。
在命令行下 Nginx -s stop 也無法停止。必須 結(jié)束進(jìn)程…..

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

初步嘗試就這幾點(diǎn),希望是我個(gè)別的問題,有機(jī)會(huì)的朋友也不妨試試。
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 札达县| 永州市| 沈阳市| 桂阳县| 朝阳县| 连山| 虞城县| 石门县| 周宁县| 米脂县| 霸州市| 余庆县| 博乐市| 邢台县| 上犹县| 衡东县| 德州市| 洛阳市| 延庆县| 古田县| 柞水县| 宜兴市| 留坝县| 西华县| 凤城市| 汉川市| 博湖县| 咸宁市| 北碚区| 广西| 昂仁县| 札达县| 绥阳县| 綦江县| 星子县| 泾源县| 兴化市| 宁南县| 定日县| 阿巴嘎旗| 商城县|