설정 변경전
httpd.conf
Timeout 300 KeepAlive Off MaxKeepAliveRequests 200 KeepAliveTimeout 15 HostnameLookups On EnableMMAP off EnableSendfile off StartServers 10 MinSpareServers 5 MaxSpareServers 10 (ServerLimit 항목없음 ) MaxClients 150
<IfModule prefork.c> StartServers 10 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule>
<IfModule worker.c> StartServers 2 MaxClients 200 MinSpareThreads 50 MaxSpareThreads 100 ThreadsPerChild 50 MaxRequestsPerChild 0 </IfModule> |
[root@www2 bin]# ab -c 1000 -n 1000 -t 10 http://indischool.com/ This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.1 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking indischool.com (be patient) Finished 871 requests
Server Software: Apache Server Hostname: indischool.com Server Port: 80
Document Path: / Document Length: 485 bytes
Concurrency Level: 1000 Time taken for tests: 21.223863 seconds Complete requests: 871 Failed requests: 0 Write errors: 0 Total transferred: 640185 bytes HTML transferred: 422435 bytes Requests per second: 41.04 [#/sec] (mean) Time per request: 24367.237 [ms] (mean) Time per request: 24.367 [ms] (mean, across all concurrent requests) Transfer rate: 29.45 [Kbytes/sec] received
Connection Times (ms) min mean[+/-sd] median max Connect: 0 10 175.7 0 2999 Processing: 9113 11581 1150.0 12118 12128 Waiting: 18 5088 3045.6 6061 9105 Total: 9113 11592 1141.3 12118 12128
Percentage of the requests served within a certain time (ms) 50% 12118 66% 12120 75% 12121 80% 12122 90% 12122 95% 12127 98% 12128 99% 12128 100% 12128 (longest request)
설정변경 후
Timeout 300 KeepAlive On MaxKeepAliveRequests 1024 KeepAliveTimeout 25 HostnameLookups Off EnableMMAP off EnableSendfile off
<IfModule prefork.c> MaxClients 150 StartServers 5 MinSpareServers 5 MaxSpareServers 10 </IfModule>
<IfModule worker.c> StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule> |
[root@www2 conf]# ../bin/ab -c 1000 -n 1000 -t 10 http://indischool.com/ This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking indischool.com (be patient) Completed 5000 requests Completed 10000 requests Completed 15000 requests Completed 20000 requests Completed 25000 requests Completed 30000 requests Completed 35000 requests Completed 40000 requests Finished 40805 requests
Server Software: Apache Server Hostname: indischool.com Server Port: 80
Document Path: / Document Length: 485 bytes
Concurrency Level: 1000 Time taken for tests: 10.6029 seconds Complete requests: 40805 Failed requests: 0 Write errors: 0 Total transferred: 30059295 bytes HTML transferred: 19835045 bytes Requests per second: 4078.04 [#/sec] (mean) Time per request: 245.216 [ms] (mean) Time per request: 0.245 [ms] (mean, across all concurrent requests) Transfer rate: 2933.63 [Kbytes/sec] received
Connection Times (ms) min mean[+/-sd] median max Connect: 3 35 249.4 20 9021 Processing: 17 42 182.7 37 6067 Waiting: 7 31 182.3 26 6049 Total: 36 78 358.5 59 9095
Percentage of the requests served within a certain time (ms) 50% 59 66% 63 75% 65 80% 67 90% 69 95% 71 98% 92 99% 108 100% 9095 (longest request) |
MinSpareServers 15
MaxSpareServers 45
ServerLimit 512
MaxClients 512
이것은
<IfModule prefork.c>
StartServers 10
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
이부분을 보고 하신 건가요?
쓰레드 방식은
<IfModule worker.c>
StartServers 2
MaxClients 200
MinSpareThreads 50
MaxSpareThreads 100
ThreadsPerChild 50
MaxRequestsPerChild 0
</IfModule>
이 부분을 수정하는 것으로 아는데....
아닌가요?