Re: Internal TCP/IP send buffer?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Marton Anka (marton_at_03am.com)
Date: 10/22/04


Date: Fri, 22 Oct 2004 19:26:27 +0200

Alun,

Thanks for the reply.

> Here's the first clue - any time you talk about disabling Nagle, you have
> to wonder if TCP is the right protocol for you.

No - Nagle can be both a blessing and a curse. That's why there's an option
to disable it. It's simply there to help with bandwidth efficiency when
throughput is preferred over latency. In this case I need to minimize
latency.

> Probably the TCP window negotiated between client and server on
> connection. You shouldn't do anything to work around this, it's a valuable
> property of TCP.

I'm not trying to work around them. If the buffer I'm talking about is
indeed the TCP window, then how do I go about adjusting its size for the
current connection?

>> Can this internal buffer be disabled or limited in size somehow?
>
> That will not solve your problem. Your problem is that you are asking for
> TCP to be made to behave like UDP. It would be better to use UDP instead.

Actually, it will solve my problem. If you can show me where UDP guarantees
delivery, orders packets and controls data flow then yes, it would be better
to use it. At this point however it seems like I'm asking for this
non-existent UDP to behave more like TCP. So I might as well use TCP the way
it was intended to be used, but how can I control that pesky buffer?

To describe the situation:

Client is connected to Proxy over the internet, possibly with a very slow
connection. Server is connected to Proxy over gigabit ethernet. Server is
sending small chunks of data to Proxy that gets forwarded to Client. TCP
buffering between Proxy and Server is causing problems with the data being
out of date by the time it is recv()-d by Proxy. Proxy has no knowledge of
the protocol used between Client and Server, and even if it did it could not
do anything with it as the data is encrypted.

Thanks,

Marton



Relevant Pages

  • Re: Internal TCP/IP send buffer?
    ... and that has to be decided at your proxy server. ... UDP or a separate TCP connection to the target and periodically ... connections) constitutes a completely different source of latency. ...
    (microsoft.public.win32.programmer.networks)
  • Re: [2.6.24.3][net] bug: TCP 3rd handshake abnormal timeouts
    ... server via TCP and non-persistent connections and all application level ... "Sometimes" when establishing a TCP connection to the server, ... Here is a simplified version of what _both_ the server and the client ...
    (Linux-Kernel)
  • Re: [2.6.24.3][net] bug: TCP 3rd handshake abnormal timeouts
    ... server via TCP and non-persistent connections and all application level ... "Sometimes" when establishing a TCP connection to the server, ... Here is a simplified version of what _both_ the server and the client ...
    (Linux-Kernel)
  • Re: Internal TCP/IP send buffer?
    ... That really great adaptative feature of modern MS TCP stack to change! ... >> connection. ... Server is connected to Proxy over gigabit ethernet. ...
    (microsoft.public.win32.programmer.networks)
  • [2.6.24.3][net] bug: TCP 3rd handshake abnormal timeouts
    ... The case is about a bunch of web servers accessing a MySQL database server via TCP and non-persistent connections and all application level errors have been excluded. ... "Sometimes" when establishing a TCP connection to the server, we are seeing a 3000ms delay before the connection if effectively made. ... Here is a simplified version of what _both_ the server and the client see. ...
    (Linux-Kernel)