Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: My MPM-Worker Calculator
PostPosted: Wed Aug 24, 2011 9:29 am 
Offline
Senior Member

Joined: Tue Feb 01, 2011 4:14 pm
Posts: 53
Hi all,

Here is a calculator I made to determine the effects of changing the different settings form MPM-Worker based on what is written on apache.org and my own testing..

Feel free to make any comments but it has worked for me..

.ods version
https://www.sugarsync.com/pf/D6185870_9890038_61604

.xls version
https://www.sugarsync.com/pf/D6185870_9890038_61602


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 9:48 am 
Offline
Senior Newbie

Joined: Sat Aug 07, 2010 12:57 pm
Posts: 16
Have people seen a significant difference with MPM worker on Linode? Since one advantage is purportedly memory usage, I'd think the worker MPM would be popular on Linode.

Since I don't have any PHP requirements, I'm currently running MPM worked, but that may have to change if I deploy blog/forums software, as it seems everything is written in PHP these days...


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 11:26 am 
Offline
Senior Member

Joined: Tue Feb 01, 2011 4:14 pm
Posts: 53
MaxVicari wrote:
Since I don't have any PHP requirements, I'm currently running MPM worked, but that may have to change if I deploy blog/forums software, as it seems everything is written in PHP these days...


You only have an issue using MPM-Worker if you want to use mod_php because apparently its not thread safe..

You can stay with MPM-Worker and run php-cgi or fcgid.. I have used both..


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 11:32 am 
Offline
Senior Newbie

Joined: Sun Aug 22, 2010 12:57 pm
Posts: 19
Isn't MPM event supposed to be better/newer/uberer than MPM worker?


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 11:37 am 
Offline
Senior Member

Joined: Tue Feb 01, 2011 4:14 pm
Posts: 53
swaj wrote:
Isn't MPM event supposed to be better/newer/uberer than MPM worker?


As I understand it MPM-event is the evolution of MPM-worker but its not production ready..


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 11:41 am 
Offline
Senior Member

Joined: Fri Feb 18, 2005 3:09 pm
Posts: 594
MaxVicari wrote:
...it seems everything is written in PHP these days.


What a disgusting thought.

James


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 12:51 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
MaxVicari wrote:
but that may have to change if I deploy blog/forums software, as it seems everything is written in PHP these days...


I'd just up and say "that's because PHP is the only language where correctly implementing a blog isn't trivial", but my blog is a PHP-based one. Turns out I use it because I like the theme and can't be arsed to use something different. (Same with Gallery2, oh how you vex me.)

I will go ahead and link to some Django-based blog projects, though. Forums may require a little more kicking, but not that much.

(Private to bjl: If I ever get around to building a Django-based photo gallery, it will support other storages e.g. S3, and it will have a way to migrate Gallery2 stuff to it. I'll let you know.)

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 4:25 pm 
Offline
Senior Newbie

Joined: Sat Aug 07, 2010 12:57 pm
Posts: 16
I appreciate bashing PHP as much as the next guy, but I was also looking for advice on MPM worker :)

Also, in another thread somebody said to "use mod_fastcgi, not mod_fcgid" for PHP, which confused me because I thought it was the other way around.


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 4:50 pm 
Offline
Senior Member

Joined: Tue Feb 01, 2011 4:14 pm
Posts: 53
MaxVicari wrote:
Also, in another thread somebody said to "use mod_fastcgi, not mod_fcgid" for PHP, which confused me because I thought it was the other way around.


I was also under the impression it was the other way around.. :)

For most of my sites I use php-cgi.. I only use fcgid on the busier sites or more complicated sites where I want a little faster response time..

As I understand it the "new" best solution will be php-FPM.. I have not played with it yet..


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 5:10 pm 
Offline
Senior Newbie

Joined: Sun Aug 22, 2010 12:57 pm
Posts: 19
PHP sucks, yadda yadda yadda (bandwagon bandwagon bandwagon)... but if you must use it you should be using php-fpm. Forget mod_php, php-cgi, or any other crap.


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 6:17 pm 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 12:59 pm
Posts: 362
swaj wrote:
PHP sucks, yadda yadda yadda (bandwagon bandwagon bandwagon)...

Not as much as Java does.
swaj wrote:
but if you must use it you should be using php-fpm.

So you say I should use Debian testing or thirdparty repositories? Doesn't make any sense for me.
swaj wrote:
Forget mod_php, php-cgi, or any other crap.

I don't think you understand the difference between CGI and FastCGI...
And I can serve a crazy lot of parallel requests with mod_fastcgi.

Also, this is why you shouldn't use mod_fcgid with php-fastcgi.

_________________
rsk, providing useless advice on the Internet since 2005.


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 6:29 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
rsk wrote:
swaj wrote:
but if you must use it you should be using php-fpm.

So you say I should use Debian testing or thirdparty repositories? Doesn't make any sense for me.


Maybe I'm missing something, but php-fpm should be available in debian stable, since that's got PHP 5.3.3, which was the version of PHP in which php-fpm was merged into PHP as core functionality. Unless debian disables fpm in their package builds?


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 6:31 pm 
Offline
Senior Newbie

Joined: Sat Aug 07, 2010 12:57 pm
Posts: 16
Guspaz wrote:
Maybe I'm missing something, but php-fpm should be available in debian stable, since that's got PHP 5.3.3, which was the version of PHP in which php-fpm was merged into PHP as core functionality. Unless debian disables fpm in their package builds?


I'd be interested in a Linode library guide that sets up Debian with this new "FPM" thing, as PHP has always confused me :)

http://library.linode.com/search?query=%22php-fpm%22


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 6:46 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
So PHP-FPM is easy enough, but how does one get mod_fastcgi and/or mod_fcgid and/or whatever going with Apache? I'm looking to do this (believe it or not) but I haven't found a good solid howto for Ubuntu 10.04. My constraints:

1) No compiling
2) Minimal PPA usage
3) FastCGI discourse must occur over TCP (the web server shall not expect to launch the application, nor shall it expect it to be on the same machine)

I haven't looked around for awhile and it's somewhat on the back burner, but this kinda jogged my memory so I thought I'd ask.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Thu Oct 20, 2011 9:13 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1141
hoopycat wrote:
1) No compiling
2) Minimal PPA usage
3) FastCGI discourse must occur over TCP (the web server shall not expect to launch the application, nor shall it expect it to be on the same machine)

1) This can be solved by using a good PPA (for Ubuntu) or Dotdeb (for Debian). The latter is very reliable, whereas it's more difficult to find good PHP PPAs for Ubuntu. There are several of them, but as far as I can tell, none are updated properly.
2) You can't really avoid this if you want to stick to Ubuntu 10.04. More recent versions of Ubuntu have official php5-fpm packages.
3) IIRC, mod_fastcgi can do this, but mod_fcgid can't.

Another way to run PHP without all the FastCGI baggage is to run two instances of Apache, one with worker, and the other with mod_php. Make the first instance listen to the public port, and proxy all PHP requests to the second instance. This is more or less the same as setting up nginx in front of Apache, except you now have two Apaches eating up more of your precious RAM.


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


Who is online

Users browsing this forum: No registered users and 1 guest


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