Re: What happened to CONFIG_TCP_NAGLE_OFF?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matt Garman wrote:
I don't want to change the API at all.  I'm using a closed-source, 3rd
party library.  Using strace, I can see that the library does *not* do
a setsockopt(...TCP_NODELAY...) on opened sockets.  Since I can't
change the library, I would like to patch and/or configure my kernel
so that all TCP/IP sockets default to TCP_NODELAY.

That _IS_ changing the api. Applications that wish to use nagle will no longer be able to because you will have changed the api to always disable nagle.

Also, if my understanding of Nagle is correct, I think you have that
backwards: Nagle should be disabled (i.e. TCP_NODELAY) for telnet,
mouse movements, etc: we always want to send our packets, regardless
of size or previous packet ACK.

No, nagle was invented specifically for telnet. Without nagle, every character you type is sent in its own packet, which gives around 50,000% overhead. Nagle was created to compact most of your keystrokes into a single packet.

Things like mouse movements should not be sent over TCP at all. UDP makes a much better protocol for that kind of data since if a packet is lost, there is no need to retransmit the same data; instead you just get the next position update and don't care about where the mouse was during the dropped packet.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux