httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laurie Harper" <l.har...@dealerimpact.com>
Subject [users@httpd] Memory Usage, CPU Usage, Server Load and KeepAlive
Date Thu, 01 Apr 2004 16:39:13 GMT
Greetings!

We have a high-traffic web server that has outgrown its resources. We
are in the process of migrating to a new system, but due to some
programming issues it will be a few more weeks before this can be
accomplished. In the meantime, it is my job to keep the web server from
buckling under the load.

I've done everything possible to reduce the load on the machine, and
have spent quite some time researching and tweaking Apache to keep it as
stable as possible. Our situation is that the system is running out of
memory, causing serious disk swapping and eventually freezing the
machine altogether. By narrowing my MaxClients to 80 I am now able to
maintain control of the machine during peak traffic in order to restart
Apache as necessary.

Yesterday I was doing some further reading on the KeepAlive parameter
and decided to try shutting it off. I was fairly amazed to note that
memory usage dropped to as much as HALF as it was previously. However I
should have known it couldn't be that easy. Though memory usage dropped,
load average increased significantly. In addition, I noticed that with
KeepAlive enabled we were consistently hitting our MaxClient limit, with
KeepAlive off, the number of connections never got higher than 40, and
typically stayed in the 15-20 range.

Hoping for some sort of middle ground, I experimented with enabling
KeepAlive with several different settings. I reduced the KeepAlive
timeout as low as 5 seconds, with as few as only 3 KeepAlive connections
enabled, and still the server would be right back to maxing out the
connection limit and memory. Shut it off, and memory usage would drop
along with the average number of concurrent connections, and it would
soon have a server load of 15-20 or higher (Dual Processors both 0%
idle) with only 70% memory usage.

Obviously it appears I'm in a catch-22 here, and our impending server
upgrades really make this a moot point, but I would still like to expand
my knowledge regarding what is causing such extreme differences in the
way the server is working under these two scenarios. Also, your opinions
would be helpful as well regarding which of the two less than ideal
choices I should stick with until the new server is ready.

Thanks in advance for your comments!

Laurie Harper
 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message