Re: mod_php vs fastcgi/php speed [BENCHMARK]

2004-03-20 Thread Joris
Arkadiusz Miskiewicz wrote:
Dnia Friday 19 of March 2004 20:48, Mirco 'meebey' Bauer napisa:

migrating from mod to cgi is good as in security, but performance and
also problems with some scripts.
Could you also test fastcgi? cgi and fastcgi are different beasts.
I assume turckcache is turcksoft mmcache? (turck-mmcache.sourceforge.net)
The almost-zero improvement is odd, in my experience it generally brings 
a spectacular improvement. Perhaps you need to load the webserver a 
little more?

Or even better yet, post the apache config files online, and I'll run 
the benchmarks on some older hardware.

--
  Greetings
   Joris
   [EMAIL PROTECTED]



Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Arkadiusz Miskiewicz
Dnia Friday 19 of March 2004 06:42, Joris napisa:
 So far a google search has yielded nothing but unbacked statements (I'll
 clean up the language a bit): mod_php is a lot fast er than php-cgi,
 and fastcgi/php is a lot faster than mod_php. Not very usefull.
For me it was 0.7 req/s on one machine with mod_suphp (almost the same thing 
as php-cgi) and 70 req/s with php-fastcgi version.

The interesting thing is that no one works on fixing perchild MPM in apache2 
that would allow to use standard mod_php in secure way :/

It would be great if someone get paid to fix that once for all.

 --
Greetings
 Joris
 [EMAIL PROTECTED]

-- 
Arkadiusz Mikiewicz CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux



Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Adam ENDRODI
On Fri, Mar 19, 2004 at 06:42:08AM +0100, Joris wrote:
 
 Also, experiences migrating from mod_php to (fast)cgi/php would be 
 welcome :)

You'll need to recompile the interpreter.  That's a lot of fun.

Privilege separation and fastcgi is not trivial to solve.  You must 
specify a different interpreter for each user.

Authorization and fastcgi is also an interesting question
(just as with interpreted scripts in general).

bit,
adam

-- 
   Seven deadly sins | 1024D/37B8D989   | Seven signs
 Seven gates to hell | 954B 998A E5F5 BA2A 3622 | Seven lies
 Seven world wonders | 82DD 54C2 843D 37B8 D989 | Seven days
Seven years bad luck | http://sks.dnsalias.net  | Seven dreams


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Arkadiusz Miskiewicz
Dnia Friday 19 of March 2004 11:24, Adam ENDRODI napisa:
 Privilege separation and fastcgi is not trivial to solve.  You must
 specify a different interpreter for each user.
Huh? Why different interpreter?
http://www.t17.ds.pwr.wroc.pl/~misiek/index.php/ApacheModFastcgiPHP

 Authorization and fastcgi is also an interesting question
 (just as with interpreted scripts in general).
I did not yet hit that problem

 bit,
 adam

-- 
Arkadiusz Mikiewicz CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux



Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Joris
Arkadiusz Miskiewicz wrote:
Dnia Friday 19 of March 2004 06:42, Joris napisa:

So far a google search has yielded nothing but unbacked statements (I'll
clean up the language a bit): mod_php is a lot fast er than php-cgi,
and fastcgi/php is a lot faster than mod_php. Not very usefull.
For me it was 0.7 req/s on one machine with mod_suphp (almost the same thing 
as php-cgi) and 70 req/s with php-fastcgi version.
Interesting and promising. Of course I wonder how fast plain mod_php (or 
with a php accelerator on top of it) would be.

The interesting thing is that no one works on fixing perchild MPM in apache2 
that would allow to use standard mod_php in secure way :/
Is that the mode where the clients run with a different uid for each 
virtual host?


It would be great if someone get paid to fix that once for all.
Maybe someone should setup a donations box and put a price on the 
perchild MPM feature.

--
  Greetings
   Joris
   [EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]


Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Russell Coker
On Fri, 19 Mar 2004 22:05, Joris [EMAIL PROTECTED] wrote:
  The interesting thing is that no one works on fixing perchild MPM in
  apache2 that would allow to use standard mod_php in secure way :/

 Is that the mode where the clients run with a different uid for each
 virtual host?

Yes.

One thing that we have idly talked about is getting perchild MPM to re-exec 
apache for each child (instead of just fork and setuid()).  This would permit 
a SE Linux aware version of the module to have each instance in a different 
security context.

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Shri Shrikumar
On Fri, 2004-03-19 at 08:11, Arkadiusz Miskiewicz wrote:
 The interesting thing is that no one works on fixing perchild MPM in apache2 
 that would allow to use standard mod_php in secure way :/
 
 It would be great if someone get paid to fix that once for all.

Hi,

I wonder if you could fill me in on the details or point me to the right
web pages. I am interested in two issues

* How difficult is it to do? (est Man hours would be useful too)
* What are the benefits?

Thanks and best wishes,

Shri

-- 

Shri Shrikumar   U R Byte Solutions   Tel:   0845 644 4745
I.T. Consultant  Edinburgh, Scotland  Mob:   0773 980 3499
 Web: www.urbyte.com  Email: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Joris
Shri Shrikumar wrote:
On Fri, 2004-03-19 at 08:11, Arkadiusz Miskiewicz wrote:

The interesting thing is that no one works on fixing perchild MPM in apache2 
that would allow to use standard mod_php in secure way :/

It would be great if someone get paid to fix that once for all.
I wonder if you could fill me in on the details or point me to the right
web pages. I am interested in two issues
I assume you're talking about fixing perchild MPM here.

* How difficult is it to do? (est Man hours would be useful too)
I have no idea, but it could involve changing the apache source code. 
It's not just a matter of configuration files.

* What are the benefits?
It would mean that the proces reading, serving and executing the 
webpages has the same userid than the creator (the user) of those pages. 
It eliminates quite a few security issues in a fundamental way.

Also, it would mean that for instance mod_php and (fast)cgi/php can 
compare directly in terms of security, so the administrator has more 
freedom to weight speed and design philosophy against one another.

--
  Greetings
   Joris
   [EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]


Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Arkadiusz Miskiewicz
Dnia Friday 19 of March 2004 14:32, Shri Shrikumar napisa:

 * How difficult is it to do? (est Man hours would be useful too)
I'm not familiar with apache internals, so I can't say but MPM's are written 
in modular way so it does not need to rewrite whole apache. You would have to 
fix/rewrite only one MPM module.

 * What are the benefits?
Joris replied about that, so I only add few things...

- from what I know no one from apache team is working on fixing perchild (no 
idea why)
- some guy started writting new MPM working in similar way as perchild - it's 
called metux MPM ( http://www.metux.de/mpm/en/?patpage=index,
http://www.sannes.org/metuxmpm/). Unfortunately this project seems to be dead 
(or almost dead), too.
- with perchild you will have each virtual host running under UID/GID 
specified in config file so you will have secure php, cgi, mod_perl, 
mod_python, mod_whatever (currently there are ways to get php and cgi (and 
only these) working under specified UID/GID).

Docs about perchild http://httpd.apache.org/docs-2.0/mod/perchild.html

Right now running apache and having multiple virtual hosts for multiple 
clients is not secure. Each client can look into others *.php, *.inc files, 
read for example database passwords from these files etc.

 Thanks and best wishes,
 Shri

-- 
Arkadiusz Mikiewicz CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux



Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Adam ENDRODI
On Fri, Mar 19, 2004 at 04:22:27PM +0100, Arkadiusz Miskiewicz wrote:
 
 Right now running apache and having multiple virtual hosts for multiple 
 clients is not secure. Each client can look into others *.php, *.inc files, 
 read for example database passwords from these files etc.

suexec is meant to improve the situation, though it has proven
quote inflexible for my purposes.  I have written a suexec
compatible wrapper called csux that allows for, for example,
specifying a different execution uid than the program's owner.
(suexec runs everything with the uid of owner, unless you're
using virtual hosts which you can't if you're communicating over
https...).  I think it's an important security gain, because this
way a cy PHP script won't be able to read/write arbitrary
files in its web repository.

bit,
adam

-- 
   Seven deadly sins | 1024D/37B8D989   | Seven signs
 Seven gates to hell | 954B 998A E5F5 BA2A 3622 | Seven lies
 Seven world wonders | 82DD 54C2 843D 37B8 D989 | Seven days
Seven years bad luck | http://sks.dnsalias.net  | Seven dreams


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mod_php vs fastcgi/php speed [BENCHMARK]

2004-03-19 Thread Mirco 'meebey' Bauer
Hi,

On Fri, 2004-03-19 at 06:42, Joris wrote:
 Hi,
 
 
 I'm looking for some in-depth information on the speed difference 
 between mod_php and using php-cgi with fastcgi.
 
 So far a google search has yielded nothing but unbacked statements (I'll 
 clean up the language a bit): mod_php is a lot fast er than php-cgi, 
 and fastcgi/php is a lot faster than mod_php. Not very usefull.
 
 
 Anyone care to shed some light/benchmarks here?
hhmm you made me curious, and I started a benchmark, here the results:
http://www.meebey.net/temp/php4-mod-vs-cgi/

(btw the server is a P3 1ghz, 512MB RAM, Debian Woody)

Summary of the benchmark


PHP4 module, very simple script (phpinfo.php):  requests/s
plain   130.04
+turckcache 129.42
+turckcache+zend-optimizer  125.50

PHP4 module, very complex script (insurance application):   
requests/s
plain   1.84
+turckcache 6.23
+turckcache+zend-optimizer  5.58
+optimizer  1.58

PHP4 CGI, very simple script (phpinfo.php): requests/s
plain   22.69
+turckcache n/a*
+turckcache+zend-optimizer  n/a*
+optimizer  21.23

PHP4 CGI, very complex script (insurance application):  requests/s
plain   2.00
+turckcache n/a*
+turckcache+zend-optimizer  n/a*
+optimizer  1.72

* = turkcache doesn't support caching of the PHP scripts in CGI mode

 
 Also, experiences migrating from mod_php to (fast)cgi/php would be 
 welcome :)
migrating from mod to cgi is good as in security, but performance and
also problems with some scripts.

Those problems with scripts come from .htaccess files which try to
change things with php_flag (which is not possible with cgi).
Also sometimes script use variables like $_SERVER['SCRIPT_NAME'], they
get changed by cgi-handler apache things. They usually still work, but
its still different than before (with php_mod). E.g. with mod_php
SCRIPT_NAME is foo.php, with cgi its something like cgi-bin/php/foo.bar

If you use suPHP though (www.suphp.org), it will correct those $_SERVER
info...

I hope this answered your questions

-- 
Mirco 'meebey' Bauer

PGP-Key:
http://search.keyserver.net:11371/pks/lookup?op=getsearch=0x5051C9B9

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GIT d s-: a--- C++ UL++ P L++$+++$ E W+++$ N o? K- w++! O- M- V? PS
PE+ Y- PGP++ t 5+ X++ R tv+ b+ DI? D+ G++ e h! r++ y?
--END GEEK CODE BLOCK--


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: mod_php vs fastcgi/php speed [BENCHMARK]

2004-03-19 Thread Arkadiusz Miskiewicz
Dnia Friday 19 of March 2004 20:48, Mirco 'meebey' Bauer napisa:

 migrating from mod to cgi is good as in security, but performance and
 also problems with some scripts.
Could you also test fastcgi? cgi and fastcgi are different beasts.

 Mirco 'meebey' Bauer

-- 
Arkadiusz Mikiewicz CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux



Re: mod_php vs fastcgi/php speed [BENCHMARK]

2004-03-19 Thread Joris
Arkadiusz Miskiewicz wrote:
Dnia Friday 19 of March 2004 20:48, Mirco 'meebey' Bauer napisa:


migrating from mod to cgi is good as in security, but performance and
also problems with some scripts.
Could you also test fastcgi? cgi and fastcgi are different beasts.
I assume turckcache is turcksoft mmcache? (turck-mmcache.sourceforge.net)

The almost-zero improvement is odd, in my experience it generally brings 
a spectacular improvement. Perhaps you need to load the webserver a 
little more?

Or even better yet, post the apache config files online, and I'll run 
the benchmarks on some older hardware.

--
  Greetings
   Joris
   [EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]


mod_php vs fastcgi/php speed

2004-03-19 Thread Joris
Hi,
I'm looking for some in-depth information on the speed difference 
between mod_php and using php-cgi with fastcgi.

So far a google search has yielded nothing but unbacked statements (I'll 
clean up the language a bit): mod_php is a lot fast er than php-cgi, 
and fastcgi/php is a lot faster than mod_php. Not very usefull.

Anyone care to shed some light/benchmarks here?
Also, experiences migrating from mod_php to (fast)cgi/php would be 
welcome :)

--
  Greetings
   Joris
   [EMAIL PROTECTED]



Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Arkadiusz Miskiewicz
Dnia Friday 19 of March 2004 06:42, Joris napisa:
 So far a google search has yielded nothing but unbacked statements (I'll
 clean up the language a bit): mod_php is a lot fast er than php-cgi,
 and fastcgi/php is a lot faster than mod_php. Not very usefull.
For me it was 0.7 req/s on one machine with mod_suphp (almost the same thing 
as php-cgi) and 70 req/s with php-fastcgi version.

The interesting thing is that no one works on fixing perchild MPM in apache2 
that would allow to use standard mod_php in secure way :/

It would be great if someone get paid to fix that once for all.

 --
Greetings
 Joris
 [EMAIL PROTECTED]

-- 
Arkadiusz Mikiewicz CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux




Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Adam ENDRODI
On Fri, Mar 19, 2004 at 06:42:08AM +0100, Joris wrote:
 
 Also, experiences migrating from mod_php to (fast)cgi/php would be 
 welcome :)

You'll need to recompile the interpreter.  That's a lot of fun.

Privilege separation and fastcgi is not trivial to solve.  You must 
specify a different interpreter for each user.

Authorization and fastcgi is also an interesting question
(just as with interpreted scripts in general).

bit,
adam

-- 
   Seven deadly sins | 1024D/37B8D989   | Seven signs
 Seven gates to hell | 954B 998A E5F5 BA2A 3622 | Seven lies
 Seven world wonders | 82DD 54C2 843D 37B8 D989 | Seven days
Seven years bad luck | http://sks.dnsalias.net  | Seven dreams




Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Arkadiusz Miskiewicz
Dnia Friday 19 of March 2004 11:24, Adam ENDRODI napisa:
 Privilege separation and fastcgi is not trivial to solve.  You must
 specify a different interpreter for each user.
Huh? Why different interpreter?
http://www.t17.ds.pwr.wroc.pl/~misiek/index.php/ApacheModFastcgiPHP

 Authorization and fastcgi is also an interesting question
 (just as with interpreted scripts in general).
I did not yet hit that problem

 bit,
 adam

-- 
Arkadiusz Mikiewicz CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux




Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Joris
Arkadiusz Miskiewicz wrote:
Dnia Friday 19 of March 2004 06:42, Joris napisa:
So far a google search has yielded nothing but unbacked statements (I'll
clean up the language a bit): mod_php is a lot fast er than php-cgi,
and fastcgi/php is a lot faster than mod_php. Not very usefull.
For me it was 0.7 req/s on one machine with mod_suphp (almost the same thing 
as php-cgi) and 70 req/s with php-fastcgi version.
Interesting and promising. Of course I wonder how fast plain mod_php (or 
with a php accelerator on top of it) would be.

The interesting thing is that no one works on fixing perchild MPM in apache2 
that would allow to use standard mod_php in secure way :/
Is that the mode where the clients run with a different uid for each 
virtual host?


It would be great if someone get paid to fix that once for all.
Maybe someone should setup a donations box and put a price on the 
perchild MPM feature.

--
  Greetings
   Joris
   [EMAIL PROTECTED]



Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Russell Coker
On Fri, 19 Mar 2004 22:05, Joris [EMAIL PROTECTED] wrote:
  The interesting thing is that no one works on fixing perchild MPM in
  apache2 that would allow to use standard mod_php in secure way :/

 Is that the mode where the clients run with a different uid for each
 virtual host?

Yes.

One thing that we have idly talked about is getting perchild MPM to re-exec 
apache for each child (instead of just fork and setuid()).  This would permit 
a SE Linux aware version of the module to have each instance in a different 
security context.

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page




Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Shri Shrikumar
On Fri, 2004-03-19 at 08:11, Arkadiusz Miskiewicz wrote:
 The interesting thing is that no one works on fixing perchild MPM in apache2 
 that would allow to use standard mod_php in secure way :/
 
 It would be great if someone get paid to fix that once for all.

Hi,

I wonder if you could fill me in on the details or point me to the right
web pages. I am interested in two issues

* How difficult is it to do? (est Man hours would be useful too)
* What are the benefits?

Thanks and best wishes,

Shri

-- 

Shri Shrikumar   U R Byte Solutions   Tel:   0845 644 4745
I.T. Consultant  Edinburgh, Scotland  Mob:   0773 980 3499
 Web: www.urbyte.com  Email: [EMAIL PROTECTED]




Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Joris
Shri Shrikumar wrote:
On Fri, 2004-03-19 at 08:11, Arkadiusz Miskiewicz wrote:
The interesting thing is that no one works on fixing perchild MPM in apache2 
that would allow to use standard mod_php in secure way :/

It would be great if someone get paid to fix that once for all.
I wonder if you could fill me in on the details or point me to the right
web pages. I am interested in two issues
I assume you're talking about fixing perchild MPM here.
* How difficult is it to do? (est Man hours would be useful too)
I have no idea, but it could involve changing the apache source code. 
It's not just a matter of configuration files.

* What are the benefits?
It would mean that the proces reading, serving and executing the 
webpages has the same userid than the creator (the user) of those pages. 
It eliminates quite a few security issues in a fundamental way.

Also, it would mean that for instance mod_php and (fast)cgi/php can 
compare directly in terms of security, so the administrator has more 
freedom to weight speed and design philosophy against one another.

--
  Greetings
   Joris
   [EMAIL PROTECTED]



Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Arkadiusz Miskiewicz
Dnia Friday 19 of March 2004 14:32, Shri Shrikumar napisa:

 * How difficult is it to do? (est Man hours would be useful too)
I'm not familiar with apache internals, so I can't say but MPM's are written 
in modular way so it does not need to rewrite whole apache. You would have to 
fix/rewrite only one MPM module.

 * What are the benefits?
Joris replied about that, so I only add few things...

- from what I know no one from apache team is working on fixing perchild (no 
idea why)
- some guy started writting new MPM working in similar way as perchild - it's 
called metux MPM ( http://www.metux.de/mpm/en/?patpage=index,
http://www.sannes.org/metuxmpm/). Unfortunately this project seems to be dead 
(or almost dead), too.
- with perchild you will have each virtual host running under UID/GID 
specified in config file so you will have secure php, cgi, mod_perl, 
mod_python, mod_whatever (currently there are ways to get php and cgi (and 
only these) working under specified UID/GID).

Docs about perchild http://httpd.apache.org/docs-2.0/mod/perchild.html

Right now running apache and having multiple virtual hosts for multiple 
clients is not secure. Each client can look into others *.php, *.inc files, 
read for example database passwords from these files etc.

 Thanks and best wishes,
 Shri

-- 
Arkadiusz Mikiewicz CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux




Re: mod_php vs fastcgi/php speed

2004-03-19 Thread Adam ENDRODI
On Fri, Mar 19, 2004 at 04:22:27PM +0100, Arkadiusz Miskiewicz wrote:
 
 Right now running apache and having multiple virtual hosts for multiple 
 clients is not secure. Each client can look into others *.php, *.inc files, 
 read for example database passwords from these files etc.

suexec is meant to improve the situation, though it has proven
quote inflexible for my purposes.  I have written a suexec
compatible wrapper called csux that allows for, for example,
specifying a different execution uid than the program's owner.
(suexec runs everything with the uid of owner, unless you're
using virtual hosts which you can't if you're communicating over
https...).  I think it's an important security gain, because this
way a cy PHP script won't be able to read/write arbitrary
files in its web repository.

bit,
adam

-- 
   Seven deadly sins | 1024D/37B8D989   | Seven signs
 Seven gates to hell | 954B 998A E5F5 BA2A 3622 | Seven lies
 Seven world wonders | 82DD 54C2 843D 37B8 D989 | Seven days
Seven years bad luck | http://sks.dnsalias.net  | Seven dreams




Re: mod_php vs fastcgi/php speed [BENCHMARK]

2004-03-19 Thread Mirco 'meebey' Bauer
Hi,

On Fri, 2004-03-19 at 06:42, Joris wrote:
 Hi,
 
 
 I'm looking for some in-depth information on the speed difference 
 between mod_php and using php-cgi with fastcgi.
 
 So far a google search has yielded nothing but unbacked statements (I'll 
 clean up the language a bit): mod_php is a lot fast er than php-cgi, 
 and fastcgi/php is a lot faster than mod_php. Not very usefull.
 
 
 Anyone care to shed some light/benchmarks here?
hhmm you made me curious, and I started a benchmark, here the results:
http://www.meebey.net/temp/php4-mod-vs-cgi/

(btw the server is a P3 1ghz, 512MB RAM, Debian Woody)

Summary of the benchmark


PHP4 module, very simple script (phpinfo.php):  requests/s
plain   130.04
+turckcache 129.42
+turckcache+zend-optimizer  125.50

PHP4 module, very complex script (insurance application):   
requests/s
plain   1.84
+turckcache 6.23
+turckcache+zend-optimizer  5.58
+optimizer  1.58

PHP4 CGI, very simple script (phpinfo.php): requests/s
plain   22.69
+turckcache n/a*
+turckcache+zend-optimizer  n/a*
+optimizer  21.23

PHP4 CGI, very complex script (insurance application):  
requests/s
plain   2.00
+turckcache n/a*
+turckcache+zend-optimizer  n/a*
+optimizer  1.72

* = turkcache doesn't support caching of the PHP scripts in CGI mode

 
 Also, experiences migrating from mod_php to (fast)cgi/php would be 
 welcome :)
migrating from mod to cgi is good as in security, but performance and
also problems with some scripts.

Those problems with scripts come from .htaccess files which try to
change things with php_flag (which is not possible with cgi).
Also sometimes script use variables like $_SERVER['SCRIPT_NAME'], they
get changed by cgi-handler apache things. They usually still work, but
its still different than before (with php_mod). E.g. with mod_php
SCRIPT_NAME is foo.php, with cgi its something like cgi-bin/php/foo.bar

If you use suPHP though (www.suphp.org), it will correct those $_SERVER
info...

I hope this answered your questions

-- 
Mirco 'meebey' Bauer

PGP-Key:
http://search.keyserver.net:11371/pks/lookup?op=getsearch=0x5051C9B9

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GIT d s-: a--- C++ UL++ P L++$+++$ E W+++$ N o? K- w++! O- M- V? PS
PE+ Y- PGP++ t 5+ X++ R tv+ b+ DI? D+ G++ e h! r++ y?
--END GEEK CODE BLOCK--




Re: mod_php vs fastcgi/php speed [BENCHMARK]

2004-03-19 Thread Arkadiusz Miskiewicz
Dnia Friday 19 of March 2004 20:48, Mirco 'meebey' Bauer napisa:

 migrating from mod to cgi is good as in security, but performance and
 also problems with some scripts.
Could you also test fastcgi? cgi and fastcgi are different beasts.

 Mirco 'meebey' Bauer

-- 
Arkadiusz Mikiewicz CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux




mod_php vs fastcgi/php speed

2004-03-18 Thread Joris
Hi,

I'm looking for some in-depth information on the speed difference 
between mod_php and using php-cgi with fastcgi.

So far a google search has yielded nothing but unbacked statements (I'll 
clean up the language a bit): mod_php is a lot fast er than php-cgi, 
and fastcgi/php is a lot faster than mod_php. Not very usefull.

Anyone care to shed some light/benchmarks here?

Also, experiences migrating from mod_php to (fast)cgi/php would be 
welcome :)

--
  Greetings
   Joris
   [EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]