ID: 46723
Updated by: jani@php.net
Reported By: jost_boekemeier at users dot sf dot net
-Status: Open
+Status: Feedback
Bug Type: CGI related
Operating System: *
PHP Version: 5CVS, 6CVS (2008-12-08)
New Comment:
Patches are always welcome, you don't need to wait for a request..:)
Previous Comments:
------------------------------------------------------------------------
[2008-11-30 17:42:32] jost_boekemeier at users dot sf dot net
Description:
------------
The PHP side of a socket-based FastCGI communication is unbuffered
since PHP 5.1.4 (maybe earlier).
write/write/read cycles have a huge performance impact, on the latest
Linux kernel the FastCGI SAPI is actually slower than executing a CGI
for each request!
The actual problem is caused by the two unbuffered write() operations,
which run into a delayed ack and therefore cause a latency of 40000us on
FC10 and 500ms(!) on FreeBSD.
As an immediate fix I suggest to switch on NDELAY for the PHP FastCGI
socket communication. I can provide a patch if you want me to.
Regards,
Jost Bökemeier
Reproduce code:
---------------
-
Expected result:
----------------
-
Actual result:
--------------
-
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46723&edit=1