In article <(E-Mail Removed) >,
(E-Mail Removed) (Trevor) wrote:
> Hi,
>
> In the past couple of days our webserver has been quite slow loading
> up websites. The weird thing is that nothing has been done to the
> apache (v1.3.12 running on linux redhat 6.2) configuration and it
> usually happens in the highest traffic time of day being early to late
> morning. I figured it would be apache running out of client processes
> but the httpd error logs reports no errors. What I have been doing is
> restart apache almost every 10 minutes. It's not a bandwidth
> situation as I've tested speed using ftp transferring files to and
> from the web server. Also figured it could be a switch problem as we
> are on 10Mb full duplex to the co-location provider's router. Last
> time we had this problem was because our switch would not negotiate to
> the router's 10Mb (It would only go 100Mb) so had to force it to 10Mb.
> If the problem was the switch then it should affect FTP as well, or
> any other protocol.
> I've played around with apache modifying maxservers and startservers,
> but to no avail!! Any help greatly appreciated.
>
> - Trevor
First, I'd advise updating to the latest on both ends, system and Apache-
but that's what most would say. You also might look into faster, more macho
hardware.

As to the particulars- some very general things to look into.
High traffic sluggishness is usually due to the system hitting its limits as
it parcels out cpu to the processes and the files start flying. Running more
of the things is just going to add to the overhead. Allowing Apache to start
more servers isn't always going to fix that. There's a fine tradeoff in
responsiveness to the client's requests and keeping the machine chugging along
at top speed when things start getting busy.
Running something like 'top' when things go all slowed up will let you see
what's eating resources, and might give you a clue as to what's necessary to
give the server breathing space. Also, if your RAM is limited, swapping will
eat a good deal of time when things get busy. Having a huge number of files
being channeled through the machine simultaneously does tend to make things
hectic.
Bandwidth is not usually the problem here (well, except in extreme cases
where you've got the entirety of North America supping at your server). It's
usually the server going overloaded as it tries to deal with everything going
on at the same time. It'll handle things under those conditions, but at its
own pace. As for measuring bandwidth; keep in mind that a ftp transfer is
(essentially) a single process and a single port being used. However, in your
case, cutting the pipe back to 10M from 100M might have had an impact.
As to specifics: visit the Apache site. I recall seeing a number of articles
there, with links to others, dealing with similar cases of high-load
sluggishness and advice upon how to handle it. Oh yes, just in case: I could
be entirely wrong about this.
- Doug