Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 22nd November 2005, 14:23
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,269
Thanks: 84
Thanked 25 Times in 21 Posts
Default looking for howto tweaking apache2

Hi guys,

can anyone point me to a good documentation of tweaking apache and analyzing its behavior?
I want to know more about the settings in /et/apache2/apache like about threads, children etc. I just want to know/find out if my server is running at its best. For example I moved a high traffic site (mostly caused by a huge image gallery) to my server and sometimes the number of apache2 processes is at 20, which seems to be the maximum, now I want to know if there are users to which the site is unavailable or not? Analyze my graphical output, etc.
Reply With Quote
Sponsored Links
  #2  
Old 22nd November 2005, 16:15
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

I googled a bit:

http://www.webhostgear.com/49.html
http://httpd.apache.org/docs/1.3/misc/perf-tuning.html
http://www.serverwatch.com/tutorials...le.php/3436911
http://www.thescripts.com/serveradmi...ver/page3.html
http://forum.ev1servers.net/showthread.php?t=9895
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 23rd November 2005, 00:24
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,269
Thanks: 84
Thanked 25 Times in 21 Posts
 
Default

thx a lot,

there were some useful links there.

the main thing I learned is that its all about the ram

first of all:

these are my own conclusions after reading some articles about apache2 so treat them carefully, read on your own and don't hold me responsible for any errors but please do correct me if I stated something wrong here.

here are my main settings, maybe someone wants to experiment with that too:

Quote:
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 35
MaxRequestsPerChild 150
</IfModule>
Timeout 150
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
This is on a Celeron 2400MHZ with 512MB RAM

One simple thing to do is to use top, have a look at the average size of your apache2 processes then multiply the number of MaxClients with that number, i.e. my average apache2 process is 12MB*35=420MB of RAM which sounds like a lot, but it is working, as webserving is the main role of this system.

The next thing you should tweak is the MaxRequestsPerChild - my system was initially set to 0 which meant the process nerver dies, setting it to 150 means after 150 of requests that child proces dies and thus prevents for example memory leaks which might let the process grow too fat by killing and then respawning accordingly to the number of spareservers and maxclients you have set.

####edit:####
Could someone else maybe post his setting, together with the machine specs?
I just want to get the most out of my machine and after looking at the stats: h**p://www.web-designerz.de/serverstats especially at the apache2 stats I can see that I am stuck with 40 processes of apache2 for a while... does this mean there are clients I can't serve at that moment or does it mean that maybe 10 of those procs are idle (spare servers) ? ...

btw. is there a way to limit the number of mysql children ? I always have a minimum of 12 loaded and they each use 36MB...

Last edited by Ovidiu; 24th November 2005 at 14:17.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP on Apache2 no longer works after ISPconfig azorman Installation/Configuration 6 23rd July 2006 23:06
Apache2 On Suse 9.3 Optimizing? Brenton Server Operation 10 28th November 2005 10:45
question about access.log from apache2 Ovidiu General 7 13th November 2005 14:56
Unistalled but can't run apache2 on Ubuntu 5.0.4 chloe Installation/Configuration 6 23rd October 2005 15:35
Where to Start with Apache2? Vorlon Server Operation 2 20th October 2005 02:12


All times are GMT +2. The time now is 03:43.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.