Hi Whizhost,
I have run Apache for a few years now, so without preaching about RAM
or dual processors, here goes...
I will have to quote Apache docs to some extent, but I will try to
keep things simple and straight forward.
I don't know really that the TimeOut directive to a lower than default
value would be much help at all. As I understand it, this directive
only affects the timeout within a few stages of the request. Also, if
you do lower it, and it starts timing people out during requests you
may find the load actually increasing a more people start requesting
the same page more than once for example.
There are some other directives that I think may be of more help, however:
MaxClients - This will limit the number of child processes that Apache
can have running at any given time. However if it's to low, it may
become frustrating for users as some requests could time out in the
browser.
HostnameLookups - By default this is off in Apache 1.3, so might not
affect you, but this controls whether client IP addresses are resolved
to hostnames for logging purposes. This is helpful for log analysis,
but can represent quite a heavy performance hit on busy servers.
MaxRequestsPerChild - This will force child processes to die after
serving a certain number of processes. This can be quite helpful when
serving dynamic webpages which can occasionally leak memory and cause
bloated processes.
KeepAlive and KeepAliveTimeout - The Keep Alive feature of HTTP/1.1
can be very handy from a users pespective, but may lower the
performance of the server as more processes are left alive and
connected to an idle client. By either turning this feature off, or
lowering the timeout, you may see an increase performance wise and
less processes are tied up with idle connections.
MaxSpareServers - This directive provides another way of limiting the
number of idle processes. Although the default of 10 is not normally
an issue in most cases, lowering it or switching it off entirely may
help on a heavily loaded server.
Those are directives I have had reason to tweak at one time or another
in various situations.
There are a couple of other issues raised here:
http://httpd.apache.org/docs/misc/perf-tuning.html
Also, depending on the type of webpages you are using, you may find
there are better performance increases to be made elsewhere. If you
have a lot of PHP/SQL pages you could possibly see large performance
increases by tweaking your SQL server configuration.
Here is another reference I found which covers most of the same directives:
http://www.smartframeworks.com/qt-apache-perf.html
I realise you asked initially about the TimeOut directive, but as I
mentioned, I don't think it provides a very effective control on load
- so hopefully the other options I have listed are more helpful.
Regards,
Sycophant |
Clarification of Answer by
sycophant-ga
on
13 Dec 2003 23:40 PST
Hi Whizhost,
I am sorry I missed the mark with my first answer, I was simply trying
to provide you with the best options for working around your problems.
The TimeOut directive only affects how long Apache is willing to wait
for ACKS, as well as the completion of POST, PUT and GET requests.
This seems very unlikely to be any sort of factor in the load placed
on your server by Apache.
The Pros of lowering the TimeOut value to a very low value, 5 for
example, would be that Apache processes would (depending on the
specifics of your server configuration) be open for less time, and
would free up resources sooner. Also, other resource intensive
processes may not be spawned at all if the Apache process were to
terminate before they were to be called.
The Cons of this action would be that many web transactions would
probably not be allowed enough time to complete. Web pages would
possibly not load, and form submissions may not be completed. A less
direct result of this may be that visitior would be hitting reload
more often, or submitting forms multiple times, generating more
concurrent connections, and possibly raising server load.
In summary, I do not believe that the TimeOut directive is one that
would be very efficent in controling server load. Searches of the web
have not found anything that would tend to contradict my conclusion.
Regards,
Sycophant-ga
|