LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP Read Buffer Size

So I've searched and found a few answers but not a clear one.

 

Lets say I have a gigabit ethernet port, and I am sending data to it via TCP.  If I perform a TCP read once a second, how fast can I be sending data, before my buffer fills?  Or the reverse question, how big is the TCP read buffer?

 

I saw this post which claims the default buffer is 17,520 bytes.  This seems a bit small to me.  I mean if I only have my gigabit port loaded to say 1%, sending data at 1,000,000 bits / second this is 125,000 bytes per second.  This means my 17,520 byte buffer will fill in 140ms.  I haven't had a chance to test this so I can't say if this buffer size is true, and is true for Windows 7 64-bit.  Additionally I'm curious if this buffer can be increased.

 

Now there's the other thing with Jumbo Packets.  Is that something I should be messing with?  Would that help be be able to read less often and not miss any data?  Thanks.

0 Kudos
Message 1 of 2
(5,270 Views)

This link here talks about default buffer sizes for Windows: http://technet.microsoft.com/en-us/library/cc938219.aspx

This also mentions 17520 bytes for Ethernet.

TCP data rates automatically get throttled if any data packets are dropped. So if you want to send 1Mbps, but you are reading infrequently which causes the buffer to fill up and packets get dropped, TCP will not let you maintain that data rate. Your data rate will drop. Only UDP lets you transmit at any desired data rate but no guarantees on packet delivery since any packets dropped are not resent. TCP as you know resends any packets dropped, and it also slows down packet transmission rates anytime it detects drop and resend requests.

Tanim
National Instruments
0 Kudos
Message 2 of 2
(5,228 Views)