logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache Tuning
Author
r00t4u



Joined: 13 Aug 2009
Posts: 1
Location: India

PostPosted: Thu 13 Aug '09 13:11    Post subject: Apache Tuning Reply with quote

Hi Friends, This regarding tuning apache. I am running 100+ LAMP on VPS. But few of them are crashing becoz it reaches to the MaxClient Limit. I thought of Tuning. Here are the specs:

OS: OpenSuse 10
Apache: Apche/2.2.8
PHP: PHP 5.x
RAM: 1GB
Assuming 80% of it has been occupied by webserver (apache)


Apache Settings: These are pretty old settings. I have doubt that these needs to be recompile.

# prefork MPM
StartServers 50
MinSpareServers 5
MaxSpareServers 100
ServerLimit 50
MaxClients 50
# worker MPM
StartServers 50
MinSpareThreads 5
MaxSpareThreads 100
ThreadLimit 128
MaxClients 50
ThreadsPerChild 75
MaxRequestsPerChild 10000

whenever i run
ps -eLf|grep httpd |wc -l
It alwasys give me = 52 and in the peak hours something apache crashes saying reached the Maximun Client size.

No as per the thumb rule.

MaxClients ≈ (RAM - size_all_other_processes)/(size_apache_process)
which is like
MaxClients ≈ (RAM dedicated to Apache)/(Average of apache process)
Numbers:

MaxClients ≈ Total Ram 1GB - 20% for other process/ Average of RSS (1226304) in KB offcource.

(Note: For RSS i an doing ps -ulC httpd --sort:rss, and calculating the average of all 52 process)

Now, Here is the problem when i do all this calculation, i end up with a result that i am using less RAM, which is quite a numb because these servers are running for last few years with no problem.

So, i was wondering if you guys can give me some direction for the tunning..thasn that would be help.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 13 Aug '09 19:59    Post subject: Reply with quote

It depends if you use prefork or worker or event mpm
Back to top


Reply to topic   Topic: Apache Tuning View previous topic :: View next topic
Post new topic   Forum Index -> Apache