[e2e] Need help: setting winsock receive low watermark while using completion port and TCP

Alex Krivonosov (alexkr) alexkr at cisco.com
Wed Aug 24 09:22:59 PDT 2005


Sireen,

This issue has nothing to do with the protocol operation, this is
clearly an intermal windows problem. While using blocking sockets, it
does not happen independent on the buffer size.

Alex

-----Original Message-----
From: Sireen Habib Malik [mailto:s.malik at tuhh.de] 
Sent: Wednesday, August 24, 2005 6:30 AM
To: Alex Krivonosov (alexkr)
Cc: end2end-interest at postel.org
Subject: Re: [e2e] Need help: setting winsock receive low watermark
while using completion port and TCP


> 
>I have a TCP connection handled by the completion port IO model. What 
>is happening is in case I specify a large buffer for receiving 
>(WSARecv), the operation completes only after the buffer is full, not 
>after receiving about 500 bytes (a packet), so a significant delay is 
>introduced. In case of small buffers, performance degrades. Any advice 
>on this? Completion port model is a must.
>  
>
No idea what a "completion port model" is! Here are some hints for your
question.

Large delay for large buffer is intuitively clear. For the small
buffers, consider the relation:

Maximum Window (Wmax) = BufferSize+ Capacity*RTT (assuming error-free
medium, and that Capacity is the speed of the ONLY bottleneck).

For the more common TCP versions, Wmax should not be so small that TCP
does not get a chance to get out of the Slow-Start phase. For
triple-duplicates to arrive, there should be atleast 3 packets
successfully delievered after the lost packet. Otherwise, TCP time-outs.

If your client access-speed is small, give your connection enough
buffer-space to "atleast" get to the saw-tooth behavior.

The other possibility is that with a large buffer the connection can
operate at the Maximum Congestion Window, however, with a small buffer
you are  forcing it go into the saw-tooth congestion control. So poorer
performance, relatively speaking.

Hope that helps.
--
SM





 


More information about the end2end-interest mailing list