php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #72066 Lack of TCP_NODELAY causes sockets to be horribly slow
Submitted: 2016-04-20 20:24 UTC Modified: 2016-04-29 12:42 UTC
From: slawek1211 at gmail dot com Assigned: krakjoe (profile)
Status: Closed Package: Streams related
PHP Version: 7.0.5 OS: Linux, all flavours
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: slawek1211 at gmail dot com
New email:
PHP Version: OS:

 

 [2016-04-20 20:24 UTC] slawek1211 at gmail dot com
Description:
------------
On loopback interfaces, where MTU is set to 65536 on modern linux flavours, lack of support to open persistent, nodelay sockets makes fast, 2-way, local communication impossible for small packets (15-30kb) due to very high latency.

While pfsockopen cannot be set to TCP_NODELAY mode, sockopen doesn't support persistency, so it's like nothing supports all features needed for fast 2-way communication.

Expected result:
----------------
Ability to set TCP_NODELAY on pfsockopen, or some function to access underlying socket, so this option could be set using socket_set_option

Actual result:
--------------
Lack of TCP_NODELAY support results in a situation that sending 20kb of data using loopback with high MTU could take 30-40ms.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-29 12:42 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2016-04-29 12:42 UTC] krakjoe@php.net
socket_import_stream should do the trick :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 03:01:28 2024 UTC