[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-29 Thread Stanislav Malyshev
Maybe you need to configure FastCGI for more processes - 500 could be result of getting more requests than there are processes to handle them. How would I do that? The easiest way would be to open WINDOWS/system32/inetsrv/fcgiext.ini and edit the MaxInstances parameter for PHP binary there/

Re: [PHP] slow performance

2007-04-27 Thread Richard Lynch
On Thu, April 26, 2007 5:53 am, Robin Vickery wrote: On 25/04/07, Richard Lynch [EMAIL PROTECTED] wrote: On Wed, April 25, 2007 5:09 am, Zoltán Németh wrote: 2007. 04. 25, szerda keltezÃ(c)ssel 11.53-kor Henning Eiben ezt írta: Zoltán NÃ(c)meth schrieb: not exactly. it pre-compiles

Re: [PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-26 Thread Henning Eiben
Richard Lynch wrote: Are there multiple threads spawned? Depends on server API. ISAPI does, fastCGi doesn't. OK; so for serving multiple concurrent clients ISAPI would sound to me like the better choice, since it can use threads, or what would be the advantage of using fastcgi? I believe

Re: [PHP] slow performance

2007-04-26 Thread Henning Eiben
Richard Lynch wrote: On Wed, April 25, 2007 5:48 am, Henning Eiben wrote: But as far as I understand, java kinda does the same thing, doesn't it? Sort of, but not really... Java has a single central one giant process architecture. PHP has a shared-nothing architecture. They're at

[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-26 Thread Stanislav Malyshev
OK, I installed FCGI and ran my testsuite. I did get more requests in a timeperiod of 5 minutes, but unfortunatly I also got a lot of errors (HTTP 500). But the performance of successful pages was increased by almost 15%. Maybe you need to configure FastCGI for more processes - 500 could be

Re: [PHP] slow performance

2007-04-26 Thread Robin Vickery
On 25/04/07, Richard Lynch [EMAIL PROTECTED] wrote: On Wed, April 25, 2007 5:09 am, Zoltán Németh wrote: 2007. 04. 25, szerda keltezÃ(c)ssel 11.53-kor Henning Eiben ezt írta: Zoltán NÃ(c)meth schrieb: not exactly. it pre-compiles them to opcodes and stores the opcode blocks. the

[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-26 Thread Henning Eiben
Stanislav Malyshev wrote: OK, I installed FCGI and ran my testsuite. I did get more requests in a timeperiod of 5 minutes, but unfortunatly I also got a lot of errors (HTTP 500). But the performance of successful pages was increased by almost 15%. Maybe you need to configure FastCGI for

Re: [PHP] slow performance

2007-04-26 Thread Henning Eiben
Richard Lynch wrote: At 31:3 ratio, it's almost for sure NOT the fault of 3-tier architecture nor the OR-mapper. Or, if it is, it's because you've chosen a HORRIBLE 3-tier architecture or a RIDICULOUS OR-mapper. My *first* *first* *first* SWAG is that you've got something very very very

[PHP] slow performance

2007-04-25 Thread Henning Eiben
Hi, I wrote a small sample-application once using PHP (with propel and smarty) and once using Java (JBoss, EJB3, JSP Servlets). Both apps are being served from a windows server (2x Xeon 1,3GHz, 2 GB RAM), but the performance of the PHP version is much slower than the Java version. I already

Re: [PHP] slow performance

2007-04-25 Thread Zoltán Németh
2007. 04. 25, szerda keltezéssel 11.33-kor Henning Eiben ezt írta: Hi, I wrote a small sample-application once using PHP (with propel and smarty) and once using Java (JBoss, EJB3, JSP Servlets). Both apps are being served from a windows server (2x Xeon 1,3GHz, 2 GB RAM), but the

Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Zoltán Németh schrieb: I wrote a small sample-application once using PHP (with propel and smarty) and once using Java (JBoss, EJB3, JSP Servlets). Both apps are being served from a windows server (2x Xeon 1,3GHz, 2 GB RAM), but the performance of the PHP version is much slower than the Java

Re: [PHP] slow performance

2007-04-25 Thread Zoltán Németh
2007. 04. 25, szerda keltezéssel 11.53-kor Henning Eiben ezt írta: Zoltán Németh schrieb: I wrote a small sample-application once using PHP (with propel and smarty) and once using Java (JBoss, EJB3, JSP Servlets). Both apps are being served from a windows server (2x Xeon 1,3GHz, 2 GB

Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Zoltán Németh wrote: I already installed an php-accelerator (eAccelator) which increased the overall performance, but still the performance is quite poor. I would not say php performace is poor, I think it is quite fast (at least on my linux boxes, I know nothing about php on windows...)

Re: [PHP] slow performance

2007-04-25 Thread Richard Davey
Henning Eiben wrote: Running my test for about 5 minutes, I get about 31.000 request for the java application, but only about 3.000 for the php. No offence, but the problem is almost 100% certainly in your PHP code then. I'd look very carefully at what is going on there before trying to

Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Richard Davey wrote: Running my test for about 5 minutes, I get about 31.000 request for the java application, but only about 3.000 for the php. No offence, but the problem is almost 100% certainly in your PHP code then. I'd look very carefully at what is going on there before trying to

Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Zoltán Németh wrote: I wrote a small sample-application once using PHP (with propel and smarty) and once using Java (JBoss, EJB3, JSP Servlets). Both apps are being served from a windows server (2x Xeon 1,3GHz, 2 GB RAM), but the performance of the PHP version is much slower than the Java

[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-25 Thread Stanislav Malyshev
But as far as I understand, java kinda does the same thing, doesn't it? Java programs are being compiled into some intermediate language, and this is being interpreted at runtime. So using an accelerator should mimic the same setup for php. Java is much less dynamic language than PHP (try doing

Re: [PHP] slow performance

2007-04-25 Thread clive
Do you know any resource, describing how php works (like the thing about compiling opcode, and stuff)? How does php handle simultaneous requests? Are there multiple threads spawned? PHP doesn't do threading, apache does however every request it receives spawns a new thread ( there is however

Re: [PHP] slow performance

2007-04-25 Thread Tijnema !
On 4/25/07, clive [EMAIL PROTECTED] wrote: Do you know any resource, describing how php works (like the thing about compiling opcode, and stuff)? How does php handle simultaneous requests? Are there multiple threads spawned? PHP doesn't do threading, apache does however every request it

[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Stanislav Malyshev wrote: But as far as I understand, java kinda does the same thing, doesn't it? Java programs are being compiled into some intermediate language, and this is being interpreted at runtime. So using an accelerator should mimic the same setup for php. Java is much less

[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-25 Thread Stanislav Malyshev
OK; so for serving multiple concurrent clients ISAPI would sound to me like the better choice, since it can use threads, or what would be the advantage of using fastcgi? Non-threaded PHP is faster than threaded PHP, because it doesn't need to do locks between threads and keep the thread

[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Stanislav Malyshev wrote: OK; so for serving multiple concurrent clients ISAPI would sound to me like the better choice, since it can use threads, or what would be the advantage of using fastcgi? Non-threaded PHP is faster than threaded PHP, because it doesn't need to do locks between

[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-25 Thread Stanislav Malyshev
OK, so I will give that a try. As far as I understand, I basically just have to replace the association of .php to php5isapi.dll with php-cgi.exe; and then set the global path to include my php-folder, right? No, that probably would make it CGI, which is slow. For FastCGI, you need FastCGI

[PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-25 Thread Henning Eiben
Stanislav Malyshev wrote: OK, so I will give that a try. As far as I understand, I basically just have to replace the association of .php to php5isapi.dll with php-cgi.exe; and then set the global path to include my php-folder, right? No, that probably would make it CGI, which is slow. For

Re: [PHP] slow performance

2007-04-25 Thread Richard Lynch
On Wed, April 25, 2007 4:33 am, Henning Eiben wrote: I wrote a small sample-application once using PHP (with propel and smarty) and once using Java (JBoss, EJB3, JSP Servlets). Both apps are being served from a windows server (2x Xeon 1,3GHz, 2 GB RAM), but the performance of the PHP version

Re: [PHP] slow performance

2007-04-25 Thread Richard Lynch
On Wed, April 25, 2007 4:45 am, Zoltán Németh wrote: 2007. 04. 25, szerda keltezéssel 11.33-kor Henning Eiben ezt írta: Hi, I wrote a small sample-application once using PHP (with propel and smarty) and once using Java (JBoss, EJB3, JSP Servlets). Both apps are being served from a

Re: [PHP] slow performance

2007-04-25 Thread Richard Lynch
On Wed, April 25, 2007 4:53 am, Henning Eiben wrote: Well ... I did some stress-testing. I create 20 concurrent requests to my application: random pages, randomizing the post parameter, which causes to load different data from the database (MySQL 5.0.37, running on a separate server). My

Re: [PHP] slow performance

2007-04-25 Thread Richard Lynch
On Wed, April 25, 2007 5:09 am, Zoltán Németh wrote: 2007. 04. 25, szerda keltezéssel 11.53-kor Henning Eiben ezt írta: Zoltán Németh schrieb: not exactly. it pre-compiles them to opcodes and stores the opcode blocks. the interpreter normally first pre-compiles the code to opcodes then

Re: [PHP] slow performance

2007-04-25 Thread Richard Lynch
On Wed, April 25, 2007 5:38 am, Henning Eiben wrote: Richard Davey wrote: Running my test for about 5 minutes, I get about 31.000 request for the java application, but only about 3.000 for the php. No offence, but the problem is almost 100% certainly in your PHP code then. I'd look very

Re: [PHP] slow performance

2007-04-25 Thread Richard Lynch
On Wed, April 25, 2007 5:48 am, Henning Eiben wrote: But as far as I understand, java kinda does the same thing, doesn't it? Sort of, but not really... Java has a single central one giant process architecture. PHP has a shared-nothing architecture. They're at polar opposites on this bit. A

Re: [PHP] Re: [PHP-WIN] Re: [PHP] slow performance

2007-04-25 Thread Richard Lynch
On Wed, April 25, 2007 6:43 am, Henning Eiben wrote: Are there multiple threads spawned? Depends on server API. ISAPI does, fastCGi doesn't. OK; so for serving multiple concurrent clients ISAPI would sound to me like the better choice, since it can use threads, or what would be the

Re: [PHP] slow performance

2007-04-25 Thread Richard Lynch
On Wed, April 25, 2007 6:38 am, Tijnema ! wrote: On 4/25/07, clive [EMAIL PROTECTED] wrote: Do you know any resource, describing how php works (like the thing about compiling opcode, and stuff)? How does php handle simultaneous requests? Are there multiple threads spawned? PHP doesn't