Edit report at http://bugs.php.net/bug.php?id=46723&edit=1
ID: 46723 Updated by: dmi...@php.net Reported by: jost_boekemeier at users dot sf dot net Summary: FastCGI is incredibly slow due to TCP ack delay -Status: Assigned +Status: Feedback Type: Bug Package: CGI related Operating System: * PHP Version: 5CVS, 6CVS (2008-12-08) Assigned To: dmitry Block user comment: N New Comment: I don't know what is the "ack delay". As I know TCP_NODELAY just disables the Nagle algorithm and this makes packets to be always sent ASAP. As result it may produce more packets. Probably it may affect FastCGI only in some specific scenarios. Could you please provide a php script, without external dependencies (databases, Java, etc) which demonstrates the problem. (you can send it by email if it's too big) Also which web server and fastcgi manager do you use? Previous Comments: ------------------------------------------------------------------------ [2010-08-26 17:03:04] jost_boekemeier at users dot sf dot net Test machine was FC10 with a fedora-patched kernel 2.6.25. It is possible to eliminate the ack delay on kernel-level (e.g. make NDELAY default for local tcp connections). But in fc9, fc10 and fc11 the problem was, and in FreeBSD the problem is, very visible. Bridge0 was identical to Bridge except for the NDELAY patch. An alternative approach would be to add a write cache which grows dynamically, and which is flushed each time read() is called. But I think this is too much overhead. ------------------------------------------------------------------------ [2010-08-25 14:55:39] dmi...@php.net I've tested your patch on Linux 2.6.27 and it doesn't make any visible difference. May be you used different URLs? (In your last post JavaBridge != JavaBridgeO) Also it would be better to use special programs to benchmark (e.g. ab or http_load) ------------------------------------------------------------------------ [2010-03-20 18:41:35] jost_boekemeier at users dot sf dot net Please excuse the delay. I didn't noticed that you were asking for a patch. After applying the patch fastcgi renders 900 pages in 1m8.095s, compared to 1m40.428s before. [notice for me] $ time for i in `seq 900`; do wget -O/dev/null -o/dev/null http://localhost:8080/JavaBridge/sessionSharing.php; done real 1m40.428s user 0m1.587s sys 0m3.108s $ time for i in `seq 900`; do wget -O/dev/null -o/dev/null http://localhost:8080/JavaBridgeO/sessionSharing.php; done real 1m8.095s user 0m1.212s sys 0m2.485s ------------------------------------------------------------------------ [2009-01-29 01:00:16] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2009-01-21 19:27:40] j...@php.net Patches are always welcome, you don't need to wait for a request..:) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=46723 -- Edit this bug report at http://bugs.php.net/bug.php?id=46723&edit=1