Click here to get back home

mod_php and Fast CGI

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
mod_php and Fast CGI setesting001 06-14-2008
Get Chitika Premium
Posted by setesting001 on June 14, 2008, 2:31 am
Please log in for more thread options
How many of you are running Fast CGI instead of the popular mod_php?

I planning to change to fast cgi since my applications need around
15MB memory to handle a single request, so consider if Apache running
in multi-process mode, serving 300 clients, then it nearly used up all
my memory in my server.

Any experience can share how to handle large concurrent clients for
PHP?


Thanks

Posted by C. (http://symcbean.blogspot.c on June 14, 2008, 6:15 am
Please log in for more thread options
On Jun 14, 7:31 am, setesting...@gmail.com wrote:
> How many of you are running Fast CGI instead of the popular mod_php?
>
> I planning to change to fast cgi since my applications need around
> 15MB memory to handle a single request, so consider if Apache running
> in multi-process mode, serving 300 clients, then it nearly used up all
> my memory in my server.
>
> Any experience can share how to handle large concurrent clients for
> PHP?
>

300 is not a lot of clients. Unless you mean that you normally have
300 active connections to the webserver.

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.

Posted by Jerry Stuckle on June 14, 2008, 7:57 am
Please log in for more thread options
setesting001@gmail.com wrote:
> How many of you are running Fast CGI instead of the popular mod_php?
>
> I planning to change to fast cgi since my applications need around
> 15MB memory to handle a single request, so consider if Apache running
> in multi-process mode, serving 300 clients, then it nearly used up all
> my memory in my server.
>
> Any experience can share how to handle large concurrent clients for
> PHP?
>
>
> Thanks
>

First of all, Fast CGI will not use any less memory the mod_php. In
fact, it may use slightly more.

Are you saying you will be handling 300 requests concurrently? That
would be a very busy web server - with typical processing, you're
talking several million hits a day. If that's the case, memory isn't
going to be your only problem. In fact, it probably won't be your main
problem.

Also, if you are regularly using that much memory, chances are you're
code is quite inefficient. It's not unusual to require that much
occasionally. But not on a regular basis.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================


Similar ThreadsPosted
Problem with modphp & Apache2 April 9, 2006, 6:54 am
How to compile php with mysql and fast-cgi? February 2, 2006, 8:38 am
MAKING MONEY FAST September 14, 2005, 12:58 pm
PEAR doesn't run with "fast-cgi" installation! June 18, 2006, 5:24 pm
I'm a C programmer and I need to learn PHP fast. Please help. July 10, 2006, 12:25 pm
is php free what is zend? you have to pay for it to be fast? hmm January 8, 2007, 10:30 am
Tips for a very fast PHP webmail June 19, 2007, 10:45 pm
Session time out too fast July 23, 2007, 2:47 pm
Do you think my site is fast enought? October 17, 2007, 10:55 am
How fast is a server to a Desktop February 21, 2008, 1:29 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap