Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-25-2010, 11:59 AM
|
#1
|
Member
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518
Rep:
|
Apache Server maxclient/serverlimit perf Tuning
Hi All,
Wondering if i can find a definitive answer from the great people here.
I've been trying to set-up/tweek these param's in Apache to a setting suitable to the server for the amount of memory. When i look around some people say, hey.. just look at the memory used per process and then divide that by the amount of memory available and you get the number of processes that can be handled by Apache in one go before it starts swapping.
Well, for this i'd done this calculation and for me it turned out to be 200 approx concurrent connections.
Well funny thing is, out MySQL server had a slow down so the Apache servers were running at approx 450 concurrent connections and weren't swapping in memory etc (still had 600MB free not including what was available in Buffers/Cache - 'free -m')...
Thus if i had have set the limits to 200 then people would have been not getting to the site, so i'm kind of pleased that i happened to not have the time to set this yet.
so the question is, although the answer seems obvious, is this calculation correct?
Cheers All,
M
|
|
|
03-25-2010, 01:51 PM
|
#2
|
Member
Registered: Feb 2007
Location: Caracas, Venezuela
Distribution: Debian x64
Posts: 156
Rep:
|
I don't have atm any apache in production env., meaning that the only apache i'm running is for the developers.
But a few weeks ago i found this article Staying Out of Deep Water: Performance Testing Using HTTPD-Test's Flood
Perhaps you can run some stress tests to your apache with this tool and post a feedback.
Hope this help.
|
|
|
03-29-2010, 03:41 AM
|
#3
|
Member
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518
Original Poster
Rep:
|
That is an interesting idea, I probably will do just that.
Is there anyone here that is able to once and for all say if this calculation is correct? In my mind it isn't, and i'm trying to work out to a very close proximity just how much each of out web servers can cope with, so i can work out scalability requirements.
Regards,
M
|
|
|
04-01-2010, 08:54 AM
|
#4
|
Member
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518
Original Poster
Rep:
|
Another strange thing with this is that i have my apache servers monitored on all my boxes. So i could see during this slow down in mysql there were circa 400 simultaneous requests in each server (normally hovering ~150). The thing is using 'ps -ylC httpd --sort:rss' i can see the variance of each apache process memory usage, and in prefork mode this would mean approx 400 simultaneous child processes?? I'm pretty sure thats dead on correct...
Thus with each apache process generally taking up 15-24MB according to the output of the command above and looking at the RSS column (FYI top shows similar as expected!), then simple calculation 15MB x 400 = 6000MB memory usage supposedly???
AND yet no swapping was occuring at the time and still had 600 odd MB free mem on a box with only 4GB which a bit of would obviously have been in use on for the OS etc.
In which case, is anyone able to explain the theory that seem touted all over the place of this calculation? It must clearly be incorrect?
Thanks all,
M
PS - What about if i just set startservers at to some ridiculous high number like 700, and see if thats enough to make apache have too much memory and require swapping? And doing this whilst the server isn't even live? Same amount of memory is taken by each new process anyway right? Regardless of if its idle, so surely instead of running a set of load tests.... this method would surely work as well??
Last edited by helptonewbie; 04-01-2010 at 10:15 AM.
|
|
|
All times are GMT -5. The time now is 06:01 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|