Re: Apache tuning and memory footprints
| From: | Michael Kimsal | Date: | Thu, 12 Oct 2000 14:44:47 +0000 |
| Subject: | Re: Apache tuning and memory footprints | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-19812@lists.php.net to get a copy of this message | ||
I see there's been no response, and I wanted to toss my hat in here
to say that if you find out anything on this, please email me about it
(if not the whole list too) as I'm interested in this sort of info as well.
re: RSS - I'm not sure I ever found out why those numbers you mentioned
don't add up right - I've seen it myself too. I normally just look at
the shared amount, tho, and x by # of children to get a good estimate.
at 1600 x 150 children, you should be using up close to your 256 megs,
I'd think.
I'm sure there's a lot more to it than this, but we're also in need of
optimal performance tuning as well.
BTW, if you (or anyone else on this list!) has had good experience
setting up php4 and aolserver, contact me - we're also interested
in potentially switching, if the performance boost is what people
claim it is.
Phil Glatz wrote:
> I'd appreciate hearing the experience of others or any definitive links to
> information about optimum Apache config settings for the best performance
> on a specific host configuration (memory, CPU, etc.).
>
> I'm consulting on a site that seems to have everything going for it yet is
> getting bogged down. It runs Apache 1.3.12, PHP 4.02, Red Hat Linux 6.2,
> has 256MB of Ram, and a 600mHz CPU.
>
> The site has bursts of activity where hundreds of users are going to try to
> connect in a short time window. It is sluggish on a few pages that make
> some mySQL queries, but the database (on a remote host) is running well,
> and the queries and PHP calls are all well-written and the database is
> appropriately indexed. I've worked on similar configurations in the past
> with no trouble.
>
> My first thought was the tcp/ip input queues were getting filled up too
> fast, so I bumped SOMAXCONN up to 32, no help there.
>
> My next thought was that the filesystem was going into swap, because during
> the brief periods of intense activity, the server will eventually have a
> high load average and users will start to time out.
>
> I figured keeping MinSpareServers, MaxSpareServers, and StartServers all at
> the same number, with the thought that the expense of starting them up
> after times of low activity might be a factor.
>
> My main question, which I've never seen hard figures on, is how to estimate
> the right mix of start servers and MaxClients, based on available
> memory. Looking at the output of top (which I'm not sure how much I
> trust), I see a SIZE for httpd to be around 4500, RSS around 3200, and
> SHARE around 1600. Isn't RSS the amount of physical (non-shared) memory
> per client? If it is 3.2MB per, then 100 users would want 320MB, which is
> more than the physical memory I have. The default MaxClients is 150, which
> doesn't seem right. But it has been this number for a long time, and I
> doubt most users would have the physical memory for it, if the way I'm
> interpreting things is correct.
>
> Would it be better to drop MaxClients down to keep closer to the amount of
> physical memory available? If so, what would the downside be?
>
> And what about having a high number for StartServers and spare
> servers? This host is used only for Apache, no mail or other non-essential
> services are running.
>
> I'm sure there are more details on tuning to match physical memory, but
> I've exhausted all the sources I can think of.
>
> thanks, Phil
>
--
==========================
Michael Kimsal
http://www.tapinternet.com
734-480-9961