Google Answers Logo
View Question
 
Q: Apache Directive - TimeOut ( No Answer,   1 Comment )
Question  
Subject: Apache Directive - TimeOut
Category: Computers > Software
Asked by: whizhost-ga
List Price: $50.00
Posted: 13 Dec 2003 22:02 PST
Expires: 14 Dec 2003 15:59 PST
Question ID: 286902
I run a very busy web server, my load averages are high and I'm
looking at ways to reduce the load. Reducing the load is my primary
aim, I don't care about anything else.

I'm running Apache v1.3.x on RH 7.1. Would it be prudent to set Apache
TimeOut to a very low value (e.g. 5)? Kindly explain the pros and cons
in simple English and give examples.

Please don't preach about getting more RAM or dual server. And please don't
quote Apache docs - I've read them all.
Answer  
There is no answer at this time.

The following answer was rejected by the asker (they received a refund for the question).
Subject: Re: Apache Directive - TimeOut
Answered By: sycophant-ga on 13 Dec 2003 23:15 PST
 
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

Request for Answer Clarification by whizhost-ga on 13 Dec 2003 23:24 PST
Please don't reply with irrelevant answers that I already know. Please
only answer my questions!

I'll be asking for a full refund if you don't answers my question.

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
Reason this answer was rejected by whizhost-ga:
The answer is useless and was not specific to the question asked.

Comments  
Subject: Re: Apache Directive - TimeOut
From: endo-ga on 13 Dec 2003 23:30 PST
 
Hi,

I agree with sycophant that lowering TimeOut will most probably reduce
performance, as you will find that your server will have to go through
the overhead of closing and reopening connections very frequently.
There is no pro in lowering TimeOut to the very low value you suggest.

Please consider the other relevant propositions that sycophant has made.

Thanks.
endo

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy