Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Jun 18, 2010 9:07 am 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
Hi,

I'm running nginx as frontend to apache + mod_php with good results.
Apache has keepalive off and is running with few threads and with the essential modules.

i made a few tests with php-cgi -d managed with supervisord and I like it.

It seams faster and under load uses less memory than apache, I just don't know if APC is shared between child processes.

Is APC shared between php-cgi child processes?

Thanks

Nuno.


Top
   
 Post subject:
PostPosted: Fri Jun 18, 2010 9:20 am 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
If you're using the
Code:
your webserver's master
\_ one php-fcgi parent process spawned by the master
  \_ many php-fcgi subprocesses spawneed by the parent
  \_ via PHP_FCGI_CHILDREN directive

setup, then yes.


Top
   
 Post subject:
PostPosted: Fri Jun 18, 2010 11:39 am 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
Yes, supervisord is only running one parent process.

How many simultaneous requests can one parent process handle?

Is there any good article that explains the relation betwen requests/parent/child ?

Thanks


Top
   
 Post subject:
PostPosted: Fri Jun 18, 2010 2:03 pm 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
I never looked for an article.
Generally, if your fastcgi supervisor pipelines requests, that is sends them to the handler as they come, instead of waiting for result of last one, you can hang just about as many PPH_FCGI_CHILDREN off the php parent process as memory allows... tho you shouldn't need more than 20-30, I think. If supervisord is as stupid as Apache's mod_fcgid is, and assumes that one "handler" can process only one request at a time, and waits for response, it will limit you to one request at a time, tho, leaving all but one children idling.
That is because supervisord sees ONE handler, the php parent, which can't "tell" the supoervisord about its children.
Good fastcgi handlers do pipelining. Lighttpd's one do, and mod_fastcgi does too.


Top
   
 Post subject:
PostPosted: Fri Jun 18, 2010 4:58 pm 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
Thanks for you help :)
Justo looking for php-fpm -> https://launchpad.net/~brianmercer/+archive/php


Top
   
 Post subject:
PostPosted: Fri Jun 18, 2010 5:06 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
nfn wrote:
Thanks for you help :)
Justo looking for php-fpm -> https://launchpad.net/~brianmercer/+archive/php


FPM was merged into PHP 5.3 in May, so it's in PHP mainline as of 5.3.3 RC1. It'll be a while before that makes it into distros, but still, good news.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group