Re: TCP_NODELAY at loopback interface

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Remi,

I expected that the Nagle algorithm would affect connections at the loopback
interface. But with some benchmarks did not show any effect by this option.
It looks like all packets are sent immediately. Probably I will disable
Nagle to keep this under all circumstances.

I cant find how SO_SNDBUF could speed up transmission. I only found that:
"A value of 0 is not supported."
in the Windows CE 5.0 documentation.

As Paul wrote, I will treat the value 8 as a not-null value, what is legal
for a BOOL i C language. I just was curious about the meaning of "eight".
Unfortunately I dont have the sources.

Regards,
Helge


"R. de Gravelaine" <g_r_a_v_e_l_a_i_n_e_@xxxxxxxxxxx> wrote in message
news:%234hIQXhBKHA.4376@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

1) Don't really know but setting TCP_NODELAY should do no harm. My feeling
is that there is a potentiality for the TCP stack to "speed-up" some
operations when using the loopback interface but that unless this
behaviour is proven, Nagle's algorithm should be disabled if you fear that
some buffer rearrangement or retention occurs. Please note that setting
SO_SNDBUF to 0 can also have a strong impact on the way your socket packs
data to be sent.

2) This is quite strange. Even if TCP_NODELAY value was returned in
bDisableNagle, it should be 0x0001. Did you check the value returned for
getsockopt?

Remi


Helge Kruse a écrit :
Hello,

the WINCE 5.0 Winsock socket option TCP_NODELAY should control, if the
Nagle
algorithm is activated or not. The nagle alrorithm should delay
transmission
of short segments and send one segments, that contains all the short
chunks.
see http://msdn.microsoft.com/en-us/library/aa450065.aspx

1) Does the Nagel algorithm also works for the Loopback interface
127.0.0.1?
How is the term "data already in flight" to be read?

2) The function getsockopt returns the current value of the winsock
option.
What does it mean, when I get the result 8 (eight), when I have set the
value before to 1 (one)?

Here are the functions with parameters I use:

BOOL bDisableNagle;
int nSize;
::setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&bDisableNagle,
sizeof(BOOL));
nSize = sizeof(BOOL);
::getsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&bDisableNagle,
&nSize);


Regards,
Helge



.



Relevant Pages

  • Re: TCP_NODELAY at loopback interface
    ... this can disable extra buffering made at the socket ... I expected that the Nagle algorithm would affect connections at the ... some operations when using the loopback interface but that unless this ...
    (microsoft.public.windowsce.embedded)
  • Re: Freeing Algorithms
    ... detail about how the algorithm works, ... is the same shape whatever the power requirements of the ... OTOH, if the hardware interface were as specific as in your example with Years, ... And there's the same tension in the design of hardware interfaces. ...
    (comp.lang.java.programmer)
  • Re: Delegates VS interfaces - some confusion
    ... one member of the interface, whereas with a delegate you can specify ... delegate void Func; ... algorithm not changing at run time and how that makes it intrinsic to ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Strategy Design Pattern
    ... really apply to Python per say, but the idea behind the patterns can be ... think the goal is to abstract out of the class an algorithm that can ... this is quite simple - decide upon an interface that the ... def TakeOff: ...
    (comp.lang.python)
  • Re: TCP_NODELAY at loopback interface
    ... that the Nagle algorithm can also be active ... Does the Nagel algorithm also works for the Loopback interface ...
    (microsoft.public.windowsce.embedded)