Die Befehlszeile:
ab -n 100 -c 100 http://blog.mobbing-gegner.de/index.php
führt zur folgenden Ausgabe:
mobbing-gegner:/etc/apache2#
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking blog.mobbing-gegner.de (be patient).....done
Server Software: Apache
Server Hostname: blog.mobbing-gegner.de
Server Port: 80
Document Path: /index.php
Document Length: 908 bytes
Concurrency Level: 100
Time taken for tests: 19.216085 seconds
Complete requests: 100
Failed requests: 51
(Connect: 0, Length: 51, Exceptions: 0)
Write errors: 0
Total transferred: 1457199 bytes
HTML transferred: 1418159 bytes
Requests per second: 5.20 [#/sec] (mean)
Time per request: 19216.085 [ms] (mean)
Time per request: 192.161 [ms] (mean, across all concurrent requests)
Transfer rate: 74.05 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 36 564 89.8 585 589
Processing: 965 10314 4755.4 10614 19028
Waiting: 896 10167 4726.7 10277 18886
Total: 1343 10878 4743.2 11199 19214
Percentage of the requests served within a certain time (ms)
50% 11199
66% 13695
75% 15141
80% 15586
90% 15995
95% 18285
98% 19124
99% 19214
100% 19214 (longest request)
mobbing-gegner:/etc/apache2#
mobbing-gegner:/etc/apache2# free -m
total used free shared buffers cached
Mem: 242 170 71 0 3 34
-/+ buffers/cache: 132 109
Swap: 127 19 108
mobbing-gegner:/etc/apache2# ps_find apa
Mit diesen Werten kann ich vorerst gut leben. Auch fühlt es sich nun "besser" an!
Einige Seiten waren hilfreich. Diese gebe ich gerne preis:
Apache parameter to be considered:
Timeout, this timeout is the amount of time apache will wait between successful writes of data before closing the connection.
Quote Timeout Apache Default 1200 Recommend 15
KeepAlive, this option if set to on will use the same apache child to fetch data for a website such as images, therefore there is no need to call upon another apache child for each image thus increasing site loading speed.
Quote KeepAlive Apache Default On Recommend On
maxKeepAliveRequests, this is the number of items that may be requested by an apache child on KeepAlive, if you have a page with many images then setting this too low will case problems.
Quote maxKeepAliveRequests Apache Default 100 Recommend 64 KeepAliveTimeout, this is the amount of time an Apache child doing a KeepAlive request will sit doing nothing, if set low you will notice allot more spare Apache children available for requests.
Quote KeepAliveTimeout Apache Default 15 Recommend 1 MinSpareServers, this is the min amount of idle Apache child processes, if all your children are doing something then Apache will continue to spawn children until there are the amount you set in MinSpareServers free for requests.
Quote MinSpareServers Apache Default 5 Recommend 10 MaxSpareServers, this is the max amount of idle Apache child processes allowed, if there is more than this amount of apache children idle they will be killed off.
Quote MaxSpareServers Apache Default 10 Recommend 15
StartServers, the number of Apache child processes to be started when the Apache server is restarted.
Quote StartServers Apache Default 5 Recommend 15 MaxClients, this is the number of Apache child processes that will be allowed, if your apache constantly causes the server to start using swap then lower this number, I recommend for most servers to set this at 8 divided by amount of memory in MB. Quote
MaxClients Apache Default 256 Recommend 8/Ram in MB (e.g... 8/1024 = 128Max Clients for 1GB ram)
MaxRequestsPerChild, I find this to be one of the most sensitive Apache settings, to low and you will kill your server with load, to high and you can get memory errors... Unlike some people I recommend never setting this to 0, or a number above 1000, some servers with low amounts of ram may benefit from this being set low while others who have got high load but lots of ram may benefit from having this high. This option is the number of requests an Apache child will be allowed before it is killed off and another one takes its place. Quote MaxRequestsPerChild Apache Default 0 Recommend 64
Ref: http://httpd.apache.org/docs/1.3/mod/core.html Ref: WebhostignTalk.com
Quote HostNameLookups Off
Turning HostNameLookups off provides better performance, as this ensures Apache will not try to resolve any IP addresses. It also slightly decreases the possibility of spoofing attacks.
Quote ServerTokens Prod ServerSignature Off
By default Apache will give out information about its version and configuration. Using ServerTokens Prod will only give out the string "Apache"; the less information someone can get about your server, the more secure it is likely to be. In versions of Apache prior to 2.0.44, ServerSignature could leak the version of your server, so we turn that off. In more recent versions this is controlled by the ServerTokens directive.
Weitere Infos fand ich hier im Netz:
-- DetlevLengsfeld 2006-12-20 22:47:43
| /DebianPakete /Logfile /Module /SSL /Sicherheit /VirtualHost /VirtuelleHosts /build /htaccess /tracback /tuning |
Tags: apache | php | mysql | performance | optimizing
Linux/Apache/tuning (last edited 2008-11-17 16:22:42 by )