Questions tagged [nagle]

Nagle's algorithm, named after John Nagle, is a means of improving the efficiency of TCP/IP networks by reducing the number of packets that need to be sent over the network.

Nagle's algorithm, named after John Nagle, is a means of improving the efficiency of TCP/IP networks by reducing the number of packets that need to be sent over the network.

40 questions
4
votes
0 answers

TCP_NODELAY with persistent socket?

It seems that I can either get a persistent socket connection with pfsockopen(), or get a normal socket connection with socket_connect() then using socket_set_option() to set TCP_NODELAY. But there is no way to get a persistent socket connection…
user696495
  • 139
  • 1
  • 6
3
votes
1 answer

Nagle's Algorithm, ACK Delay and Rlogin echo

I was suggested to ask here too, since specific questions about protocols are on-topic, but in case anyone is interested the question also has a small bounty on ServerFault. I'm reading about TCP data flow, Delayed ACK and Nagle's Algorithm. So far…
IanC
  • 1,968
  • 14
  • 23
3
votes
1 answer

Reproduce write-write-read delay with Java sockets

I have read that the combination of three things causes something like a 200ms delay with TCP: Nagle's algorithm, delayed acknowledgement, and the "write-write-read" combination. However, I cannot reproduce this delay with Java sockets and I am…
AmyGamy
  • 101
  • 7
3
votes
2 answers

Disabling nagle in python: how to do it the right way?

I need to disable nagle algorithm in python2.6. I found out that patching HTTPConnection in httplib.py that way def connect(self): """Connect to the host and port specified in __init__.""" self.sock =…
Mendor
  • 85
  • 2
  • 8
2
votes
1 answer

what's the risk of disabling TCP nagle behavior?

By default for Windows at least, Nagling is on. There are potential performance gains due to turning it off. What's the downside of turning it off?
Frank Schwieterman
  • 24,142
  • 15
  • 92
  • 130
2
votes
2 answers

(C#)Azure Function - Disable Nagle's algorithm when having storage account bindings

Everywhere i see, to disable nagle's algorithm, you can do it by service point after creating the storage account client. I have also read in several places that this only works if you do it before the first request. In my case, my function (v2)…
FEST
  • 813
  • 2
  • 14
  • 37
2
votes
0 answers

Socket.setTcpNoDelay() vs host setting (Nagle's Algorithm)

I just wanted some insight into how Nagle's algorithm is handled in regards to an application vs host. So, say the host had TCP_NODELAY enabled, but the Java application didn't, which would take priority? What about the other way round?
Majored
  • 172
  • 7
2
votes
0 answers

JavaScript | How to disable nagle algorithm without node.js

I'm trying to write a small client-server game. Server written in c++. Client on js. For connection using websocket. Because highly depend on the delay I must disable nagle algorythm. I know that in node.js you can do it using their setNoDelay()…
evilfant
  • 21
  • 3
2
votes
2 answers

Can't turn TCP_NODELAY OFF

I'm using Boost asio to send a TCP message. I set the NO_DELAY option because this is a 'real time' control system. I see the PSH flag set in the message using Wireshark. I am happy with the performance and it is working as expected. For interest, I…
Ant
  • 1,668
  • 2
  • 18
  • 35
1
vote
0 answers

Delay using socket.io

I started using socket.io for the web game. Using nodejs express server I tried to write simple test. In this test server writes timestamp to the client and client returns this timestamp. After this, server logs time used for sending there and…
VorobeY1236
  • 11
  • 1
  • 2
1
vote
1 answer

How does one configure TCP_NODELAY for libpq and postgres server?

I am trying to ensure that TCP_NODELAY is set (Nagle disabled) for Postgres client and server. I can see that there is code in libpq to use the option when a TCP_NODELAY macro is defined. I've cloned the postgres repo, run: ./configure make…
CamW
  • 3,223
  • 24
  • 34
1
vote
0 answers

Nagle's algorithm and SO_SNDBUF

I'm trying to understand the consequence of using Nagle's algorithm with different send buffer size values. My current understanding of the send buffer is that it refers to a part of memory where a copy of the unacknowledged sent packet is stored.…
user2635088
  • 1,598
  • 1
  • 24
  • 43
1
vote
0 answers

TCP NO_DELAY + Lost header + TCP Retransmission

A strange situation is seen in this case: HTTP request is sent with TCP flag NO_DELAY (i.e. Nagle algorithm disabled); WireShark does not capture the TCP packet with HTTP verb and headers - only the packet with HTTP body is seen (is the packet…
Pavel Baravik
  • 173
  • 1
  • 9
1
vote
1 answer

C# Server - TCP/IP Socket Efficiency

Good day all! I am working on a open source server for a game that is closed source - the game operates using TCP/IP sockets (instead of UDP, doh...) So being a connection based protocal, I am contrained to work with this. My current program…
D. Brumby
  • 33
  • 1
  • 10
1
vote
1 answer

Nagle's algorithm and Delayed Ack

I am working on Linux (Ubuntu). I understand both these concepts but I want to read the logic for myself. Where is it written in the source code? Some say it is easier to understand it in FreeBSD. Is that true?
Bruce
  • 33,927
  • 76
  • 174
  • 262