Re: Sliding windows on XP and 2K don't???
From: Arkady Frenkel (arkadyf_at_hotmailxdotx.com)
Date: 07/15/04
- Next message: Arkady Frenkel: "Re: Server can receive in a socket, but what it sends isn't received in the client."
- Previous message: Arkady Frenkel: "Re: Sliding windows on XP and 2K don't???"
- In reply to: Arkady Frenkel: "Re: Sliding windows on XP and 2K don't???"
- Next in thread: Steve Alpert: "Re: Sliding windows on XP and 2K don't???"
- Reply: Steve Alpert: "Re: Sliding windows on XP and 2K don't???"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 15 Jul 2004 10:51:11 +0300
BTW that well described in Q214397 of KB MSDN , on web
http://support.microsoft.com/default.aspx?scid=kb;EN-US;214397
Arkady
"Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
news:cd5ctk$o3i$1@home.itg.ti.com...
> Nagle have no delay itself , that scenario for waiting ACK as Alun wrote ,
> what is play here is delayed ACK ( which is 200 ms by default ).You can
> change it ( not recommended too ) on receiving host in TCPDelAckTicks key
> registry in
>
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interf
> aces\interface
>
> Arkady
>
> "Steve Alpert" <sra@newsgroups.nospam> wrote in message
> news:uTSqywcaEHA.2812@TK2MSFTNGP11.phx.gbl...
> > Alun Jones [MSFT] wrote:
> >
> > > "Steve Alpert" <sra@newsgroups.nospam> wrote in message
> > > news:e4#tBZaaEHA.1152@TK2MSFTNGP09.phx.gbl...
> > >
> > >>We've been trying to speed up an application and have looked at a few
> > >>sniffs and have found that when we're talking to a host (apparently
with
> > >>Nagle enabled), Windows XP will not transmit a second packet until a
> > >>first packet has been ack'ed! We send a packet of about 30 bytes
> > >>followed almost immediately by a send of another packet of about 300
> > >>bytes and the second always waits until the server has ack'ed the
first
> > >>one? How come?
> > >>
> > >>These packet sizes are certainly small enough that the sliding window
> > >>should come into play.
> > >
> > >
> > > The Nagle algorithm is quite simple.
> > >
> > > When the send request has less than a full frame's worth to send, and
> there
> > > is unacknowledged data that has been sent, the send is buffered.
> > > When an acknowledgement comes in, or there is more than a frame's
worth
> of
> > > data to send, buffered data will be sent.
> > >
> > > So, when your first 30 bytes were given to send(), the Nagle algorithm
> says
> > > "there is no unacknowledged data preceding this send, so we may put
> those 30
> > > bytes on the wire."
> > >
> > > When your next 300 bytes were given to send(), the Nagle algorithm
says
> "I
> > > have not yet received an acknowledgement for the previous 30 bytes, so
I
> > > won't send these 300 bytes".
> > >
> > > Sliding windows only comes into play when you are sending continuous,
> long,
> > > streams of data, at which point, since you repeatedly have more than a
> > > frame's worth of data to send, Nagle does not come into play.
> > >
> > > Since you know your 30 bytes will immediately be followed by 300 more,
> it is
> > > your application's duty to hold the first 30 until the remaining 300
are
> > > ready, at which point you send them as one buffer to a send() call (or
a
> > > single WSABUF to a WSASend call, if you don't want to aggregate the
> buffers
> > > yourself).
> > >
> > > I always advise against disabling the Nagle algorithm - doing so
usually
> > > indicates that your protocol is inefficient. The Nagle algorithm only
> > > impacts inefficient protocol designs.
> > >
> > Alun:
> >
> > Thanks - however, as a test, if I disable Nagle, shouldn't the next 300
> > bytes be pushed out on the wire even though the ACK from the first 30
> > hasn't been returned. Also, according to the docs, a Nagle delay is at
> > least 220 mSec. When the ACK is returned in 40 mSec, the second packet
> > is immediately sent.
> >
> > /steveA
> >
> >
> > --
> > Steve Alpert
> > my email Fgrir_Nycreg @ vqk.pbz is encrypted with ROT13 (www.rot13.org)
> > and spaces
> >
>
>
- Next message: Arkady Frenkel: "Re: Server can receive in a socket, but what it sends isn't received in the client."
- Previous message: Arkady Frenkel: "Re: Sliding windows on XP and 2K don't???"
- In reply to: Arkady Frenkel: "Re: Sliding windows on XP and 2K don't???"
- Next in thread: Steve Alpert: "Re: Sliding windows on XP and 2K don't???"
- Reply: Steve Alpert: "Re: Sliding windows on XP and 2K don't???"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|