Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th April 2011, 15:40
lewis_saint lewis_saint is offline
Member
 
Join Date: Mar 2007
Posts: 69
Thanks: 0
Thanked 3 Times in 2 Posts
Default Unneeded Apache 2 Modules

I am running Apache 2.2.16 on Debian Squeeze with ISPConfig 3.0.3 and am looking to reduce my apache2 process memory footpint. Currently, running 'ps -ylC apache2 --sort:rss' gives me:
Code:
S    33 13100 24996  0  80   0 10452 65841 -      ?        00:00:00 apache2
S    33 13089 24996  0  80   0 10724 65963 -      ?        00:00:00 apache2
S    33 13088 24996  0  80   0 10728 65963 -      ?        00:00:00 apache2
S    33 13087 24996  0  80   0 10740 65963 -      ?        00:00:00 apache2
S    33 13090 24996  0  80   0 10824 65965 -      ?        00:00:00 apache2
S    33 13096 24996  0  80   0 12212 65920 -      ?        00:00:00 apache2
S    33 13065 24996  0  80   0 14848 66758 -      ?        00:00:00 apache2
S     0 24996     1  0  80   0 17704 65808 -      ?        00:00:01 apache2
S    33 13061 24996  0  80   0 21816 68390 -      ?        00:00:00 apache2
S    33 13085 24996  1  80   0 29464 69924 -      ?        00:00:00 apache2
S    33 12776 24996  0  80   0 30200 70431 -      ?        00:00:00 apache2
S    33 12775 24996  0  80   0 30544 69999 -      ?        00:00:00 apache2
S    33 12271 24996  0  80   0 39424 72353 -      ?        00:00:00 apache2
S    33 13084 24996  1  80   0 43220 73327 -      ?        00:00:00 apache2
S    33 13063 24996  1  80   0 43400 73343 -      ?        00:00:01 apache2
S    33 13095 24996  2  80   0 43936 73552 -      ?        00:00:00 apache2
S    33 12774 24996  0  80   0 44200 73539 -      ?        00:00:00 apache2
S    33 13101 24996  3  80   0 45212 73882 -      ?        00:00:00 apache2
S    33 13059 24996  1  80   0 45712 74024 -      ?        00:00:00 apache2
S    33 13099 24996  3  80   0 45872 74077 -      ?        00:00:00 apache2
S    33 13094 24996  4  80   0 46148 74140 -      ?        00:00:00 apache2
S    33 12781 24996  1  80   0 50676 75153 -      ?        00:00:01 apache2
My enabled modules are currently:
Code:
actions.conf          authz_user.load  include.load      proxy.load
actions.load          autoindex.conf   mime.conf         reqtimeout.conf
alias.conf            autoindex.load   mime.load         reqtimeout.load
alias.load            cgi.load         negotiation.conf  rewrite.load
auth_basic.load       deflate.conf     negotiation.load  setenvif.conf
authn_file.load       deflate.load     php5.conf         setenvif.load
authz_default.load    dir.conf         php5.load         status.conf
authz_groupfile.load  dir.load         proxy.conf        status.load
authz_host.load       env.load         proxy_http.load   suexec.load
Apache2.conf has Timeout 30, KeepAliveTimeout 15, MaxKeepAliveRequests 100 and prefork with:
Code:
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          75
    MaxRequestsPerChild 1000
Why are my apache processes running at 50Mb each?

Regards,

Lewis
Reply With Quote
Sponsored Links
  #2  
Old 8th April 2011, 14:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Have you tried this guide? http://www.howtoforge.com/configurin...um_performance

Also, do you use some sort of PHP opcode cacher, e.g. eAccelerator, Xcache, or APC?
__________________
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 8th April 2011, 15:02
lewis_saint lewis_saint is offline
Member
 
Join Date: Mar 2007
Posts: 69
Thanks: 0
Thanked 3 Times in 2 Posts
Default

Hey falko,

Thank you for getting back to me. I don't use any sort of PHP opcode cacher, and have seen the article you mentioned.

I already have HostnameLookups Off, and configured MaxClients and whatnot, as specified earlier. Out of the modules that I currently have enabled, are there any known 'offenders' who use a large amount of RAM? What's the primary reason that my apache2 processes would be using 50Mb of RAM so quickly after starting?

Regards,

Lewis
Reply With Quote
  #4  
Old 9th April 2011, 12:49
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

I'm using
Code:
Timeout 300
MaxKeepAliveRequests 1000000
KeepAliveTimeout 2
StartServers          5
MinSpareServers       5
MaxSpareServers      10
MaxRequestsPerChild   0
Can you try these?
__________________
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
  #5  
Old 9th April 2011, 16:30
lewis_saint lewis_saint is offline
Member
 
Join Date: Mar 2007
Posts: 69
Thanks: 0
Thanked 3 Times in 2 Posts
Default

By setting 'MaxRequestsPerChild' to 0, the apache documentation says: 'the process will never expire' - is that really what one wants?

Additionally, will any of those settings have any immediate effect on the memory footprint?
Reply With Quote
  #6  
Old 11th April 2011, 10:42
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,754
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

The momory footprint is ok for apache and should be no problem. What you can try is to uninstall php modules that you dont need and that you disable apache mod_proxy and mod_proxy httpd
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 11th April 2011, 15:54
lewis_saint lewis_saint is offline
Member
 
Join Date: Mar 2007
Posts: 69
Thanks: 0
Thanked 3 Times in 2 Posts
Default

Quote:
Originally Posted by till View Post
The momory footprint is ok for apache and should be no problem. What you can try is to uninstall php modules that you dont need and that you disable apache mod_proxy and mod_proxy httpd
Your guide says that the memory should be 2-3Mb, or 15Mb if using PHP, but then you tell me that it is normal that I have 50Mb processes?

Also, I have already gotten rid of all the modules I believe I am not using. The rest I am unsure about. I am definitely using the proxy stuff, but is it a known memory hog?
Reply With Quote
  #8  
Old 12th April 2011, 10:30
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,754
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

Quote:
Your guide says that the memory should be 2-3Mb, or 15Mb
To which guide do you refer, please post the exact sentence. Apache never uses only 2-3 MB RAM.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 12th April 2011, 12:43
lewis_saint lewis_saint is offline
Member
 
Join Date: Mar 2007
Posts: 69
Thanks: 0
Thanked 3 Times in 2 Posts
Default

http://www.howtoforge.com/configurin...um_performance

"Child process size for serving static file is about 2-3M. For dynamic content such as PHP, it may be around 15M."
Reply With Quote
  #10  
Old 12th April 2011, 13:08
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,754
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
 
Default

Thats not a guide that I have written, please see author information.

Also this refers to a separate server for static contents and not a server that serves dynamic content like your server. A server for dynamic content loads modules like PHP inside the server process.

And the guide is from 2006, so it most likely for apache 1 (which uses less RAM) or a old apache 2 version and not the current apache 2.2.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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
trying to install roundcubemail ressel Installation/Configuration 13 24th December 2009 20:13
problems with suexec gobokster Installation/Configuration 7 7th May 2009 13:33
CENTOS 5 Ping Problem gAnDo Server Operation 11 28th March 2008 20:58
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 00:45


All times are GMT +2. The time now is 19:32.


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