Re[2]: Accept() loop in php-fcgi?
Igor <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Organization | ROL |
| Message-ID | <[email protected]> |
Hello Jonathan,
Friday, January 20, 2006, 11:37:11 AM, you wrote:
JC> If my main php script is structured as follows:
JC> <?
JC> include("include/include.1.inc");
JC> include("include/include.2.inc");
JC> include("include/include.3.inc");
JC> ...
JC> ...
JC> include("include/include.100.inc");
JC> echo("this is main.php");
Logically it should work differently under Fast-CGI. If you're
right then either your PHP compilation does make includes at run-time - I doubt
that - or mod_fascgi doesn't work for PHP at all in your case
(that might be the case if you've not configured it)
PHP includes were always slow, and if you have to design a huge,
nice yet modular system you got to keep it in mind, otherwise when
everything is ready - it won't work.
Are you sure your PHP is working in fast-cgi mode?
JC> and all of the "include/include.`seq 1 100`.inc" php include files are
JC> empty, then the one unit after translation should be equivalent to:
JC> <?
JC> // empty
JC> // empty
JC> // empty
JC> ...
JC> // empty
JC> echo("this is main.php");
>>
JC> However, from the benchmark under (mod_fastcgi + php-fcgi), a single
JC> echo statement in php yields 1500+ requests per seconds performance
JC> versus 200+ requests per second from a single echo statement plus 100
JC> empty includes.
Try the following:
- run a php fast-cgi script which does include some file
- when the script is loaded rename the inc file.
- open that PHP-fastcgi script via HTTP again and see if it does
require deleted inc file... it should not need it in
FastCGI mode unless PHP does run-time includes now - that would
be funny :-)
JC> Obviously I may have done something wrong in the benchmark
Rather in php-fastcgi configuration...
JC> methodology. Could you please kindly provide an example that would
JC> demostrate the benefit of time saved from compiling the files
JC> (repeatedly)?
You've done everything right, just make sure you've configured
PHP/fast-cgi correctly.
--
www.rol.ru
Best regards,
Igor mailto:[email protected]
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/