Re: mod_php and Fast CGI
On 6$B7n(B14$BF|(B, $B2<8a(B6$B;~(B15$BJ,(B, "C. (http://symcbean.blogspot.com/)"
<colin.mckin...@gmail.com> wrote:
> On Jun 14, 7:31 am, setesting...@gmail.com wrote:
> 300 is not a lot of clients. Unless you mean that you normally have
> 300 active connections to the webserver.
>
ps ax | grep httpd | wc -l
>> 286
and an example of running httpd process:
>> 31594 web 15 0 142m 16m 8472 S 0 0.3 12:02.94 httpd
I believe it is currently using 16M of memory per httpd process (I am
running Apache 1.3, multi process mode)
I am thinking about using fastcgi as not all these 286 httpd process
need to use php at every instance? (E.g. create a pool of fast cgi
php , say 100 process, and let them share)
Then it may save me some memory becoz I don't have 300 CPU to server
all these php at anytime?
Thanks.
> Why do you think it will need less memory with fast CGI?
>
> Even if I could see that such a change was valid, it would be well
> down my list of things to change. While changing a lot of legacy code
> can be tricky, I'd start by looking to optimize memory usage within
> PHP, consider using autoloader, check queries (which are typically
> buffered oustide of PHP's memory limit) and look at front and back end
> caching. Making the code go faster and get off the server more quickly
> will relieve memory pressures too - so the usual process of
> performance optimization. You do have compression enabled in your
> webserver and a PHP aaccelerator running?
>
> But sometimes the only solution is to just throw more hardware at it.
> But do make sure you've exhausted the other approaches first.
>
> C.
|