[PHP] Re: [PHP-WIN] Re: [PHP] slow performance
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/ Then you'd need to restart the IIS. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP-WIN] Re: [PHP] slow performance
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 you can also manage better control over the user running FCGI that having it embedded in ISAPI, but I could be 100% wrong on that. OK, but that shouldn't affect performance in any way. But I'll keep that in mind. While I'm writing this, I think about this, and at least with ASP and VBScript I think the scripts are executed in the IUSR_[xx]-context if your website allows anonymous connections, otherwise there is some other user that is used for IIS-apps, or you could inherit the context of the user calling the website (if you're using digest authentication or integrated windows authentication). -- ... If it wasn't for C, we would be using BASI, PASAL and OBOL! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-WIN] Re: [PHP] slow performance
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 result of getting more requests than there are processes to handle them. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-WIN] Re: [PHP] slow performance
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 more processes - 500 could be result of getting more requests than there are processes to handle them. How would I do that? -- ... Does killing time harm eternity? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-WIN] Re: [PHP] slow performance
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 $foo = $$bar in Java :) which allows it to generate more low-level and more efficient bytecode and also use JIT compiling to further improve its performance. PHP opcodes is more high-level and not JIT-ed (unless somebody writes JIT for PHP, which didn't happen yet :) Do you know any resource, describing how php works (like the thing about compiling opcode, and stuff)? How does php handle simultaneous requests? Try these: http://www.php.net/manual/en/internals.php http://blog.libssh2.org/index.php?/archives/24-Extending-and-Embedding-PHP.html Are there multiple threads spawned? Depends on server API. ISAPI does, fastCGi doesn't. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-WIN] Re: [PHP] slow performance
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 dynamic language than PHP (try doing $foo = $$bar in Java :) which allows it to generate more low-level and more efficient bytecode and also use JIT compiling to further improve its performance. PHP opcodes is more high-level and not JIT-ed (unless somebody writes JIT for PHP, which didn't happen yet :) ok, sounds reasonable. Do you know any resource, describing how php works (like the thing about compiling opcode, and stuff)? How does php handle simultaneous requests? Try these: http://www.php.net/manual/en/internals.php http://blog.libssh2.org/index.php?/archives/24-Extending-and-Embedding-PHP.html ah, this saves my good-night-reading for today! :) 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? -- ... ERROR: CPU not found. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-WIN] Re: [PHP] slow performance
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 context through the code, etc. So FastCGI usually would be faster and also more stable since the memory space is not shared. It forgoes some advantages of threaded application, but overall it is faster. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-WIN] Re: [PHP] slow performance
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 threads and keep the thread context through the code, etc. So FastCGI usually would be faster and also more stable since the memory space is not shared. It forgoes some advantages of threaded application, but overall it is faster. 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? -- ... ERROR: CPU not found. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-WIN] Re: [PHP] slow performance
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 module for IIS. Zend Core contains one, and Microsoft has its own here: http://www.iis.net/default.aspx?tabid=151 Also see: http://blogs.iis.net/rickjames/archive/2007/04/19/fastcgi-tp2-unofficial-update-70419.aspx -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-WIN] Re: [PHP] slow performance
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 FastCGI, you need FastCGI module for IIS. Zend Core contains one, and Microsoft has its own here: http://www.iis.net/default.aspx?tabid=151 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%. -- ... ERROR: CPU not found. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP-WIN] Re: [PHP] slow performance
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 advantage of using fastcgi? I believe you can also manage better control over the user running FCGI that having it embedded in ISAPI, but I could be 100% wrong on that. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php