- 論壇徽章:
- 0
|
http://blog.sina.com.cn/s/blog_4a082e2f0100dvi9.html
利用Apache自帶的測試工具ab對Server進(jìn)行測試的情況(設(shè)定請求的index頁面為6bytes),cpu%為cpu占用率,mem為內(nèi)存使用量(M為單位),RequestsPerSecond為每秒處理的請求數(shù)。 1、Prefor方式 (ServerLimit,StartServer,MinSpareServers,MaxSpareServers,MaxClients,MaxRequestPerChild)
-n/-c(ab參數(shù)) |
Cpu% |
Mem |
Requestspersecond |
(-,5,5,10,150,0) |
100000/100 |
28.8 |
285 |
8434 |
100000/200 |
29.2 |
304 |
8032 |
100000/500 |
25.3 |
323 |
7348 |
100000/1000 |
24.4 |
330 |
5886 |
(10000,5,5,10,500,0) |
100000/100 |
28.7 |
371 |
8345 |
100000/200 |
27.4 |
389 |
7929 |
100000/500 |
24.9 |
417 |
7229 |
100000/1000 |
23.4 |
437 |
6676 |
(10000,5,5,10,1000,0) |
100000/100 |
28.8 |
408 |
8517 |
100000/200 |
27.0 |
422 |
8045 |
100000/500 |
24.2 |
455 |
7236 |
100000/1000 |
22.5 |
470 |
6570 |
(10000,5,5,10,1500,0) |
100000/100 |
29.6 |
330 |
8407 |
100000/200 |
28.1 |
349 |
8014 |
100000/500 |
26.4 |
380 |
7290 |
100000/1000 |
24.0 |
400 |
6686 | |
2、Worker方式 (ServerLimt,Threadlimt,Startservers,MaxClients,MinspareThread,MaxspareThread,ThreadperChild,MaxRequestPerChild)
-n/-c(ab參數(shù)) |
cpu% |
mem |
RequestsperSecond |
(50,500,5,10000,50,200,200,0) |
100000/100 |
18.6 |
188 |
6020 |
100000/200 |
20.1 |
195 |
5892 |
100000/500 |
19.8 |
209 |
5708 |
100000/1000 |
22.2 |
218 |
6081 |
(100,500,5,10000,50,200,100,0) |
100000/100 |
24.5 |
240 |
6919 |
100000/200 |
23.6 |
247 |
6798 |
100000/500 |
24.6 |
254 |
6827 |
100000/1000 |
22.3 |
271 |
6114 |
(200,500,5,10000,50,200,50,0) |
100000/100 |
27.3 |
301 |
7781 |
100000/200 |
27.4 |
307 |
7789 |
100000/500 |
26.0 |
320 |
7141 |
100000/1000 |
21.8 |
344 |
6110 |
相對來說,prefork方式速度要稍高于worker,然而它需要的cpu和memory資源也稍多于woker。 |
|