Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Aug 27, 2003 8:32 pm 
Offline
Senior Newbie

Joined: Thu Aug 14, 2003 2:55 am
Posts: 15
I'm sure that everyone here uses their servers for some minimal web-serving. Apache also has multi-threading, and multi-process abilities (of which I'm not very knowledgeable in).
When I start apache and visit my site a few times, there's about 12 httpd processes running, and using a tool to tell me how much memory is free, 0% and a nice sum of my swap space is being used.
When apache is shut down, I have about 50-60% memory free, and most of the swap is free.
For those who aren't hosting many websites with many hits, there must be an easy way to lower the amount of memory that apache uses, and as we all know, on a shared platform, free memory is pertinent.
Anyone with some suggestions?
- Eric


Top
   
 Post subject: Apache and Memory
PostPosted: Wed Aug 27, 2003 8:51 pm 
Offline
Senior Newbie

Joined: Sat Aug 16, 2003 6:43 pm
Posts: 8
If you are not expecting a bunch of visitor's you can reduce the nbr of threads that start -- and the nbr of spare servers that start. This should help out -- however would slow your site down if you had a windfall of visitors.

You can do this by editing the httpd.conf file. Not sure what distro you are using but it is most likely in /etc/apache or maybe /etc/httpd .

Just search for the line(s) as follows:

StartServers 3 # 3 is the initial nbr to start

MinSpareServers 1
MaxSpareServers 20

Make sure you read the comments in the config file about the "risks" associated with making these numbers 2 low. However the lower the numbers -- the less memory.

P.S. --- Apache's memory effect is nowhere as bad as it's usage of file descriptors. (If you are spooling out error logs, usage logs, etc... for multiple virtual clients -- your available file descriptors will get sucked up quick.)

Another option to save memory in a small memory environment is to use a different web server. thttpd is a good option:

http://www.acme.com/software/thttpd/

HOWEVER --- And I hate to say this because I don't think it is open source (and that worries me)... It is however totally free and VERY easy to use -- the website is very professional and the documentation looks very complete:

Abyss web server located here:

http://www.aprelium.com/index.html

totally ROCKS as a small footprint/memory webserver....Even with using PHP as a CGI. (When I say small footprint I mean no more than 2 processes using about 800K each....1 process is for the web based Admin console that runs by default on port 9999 on the localhost and lets you easily configure your server.)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group