Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 11-21-2016, 04:03 PM   #1
LQ Newbie
Registered: Dec 2015
Posts: 11

Rep: Reputation: Disabled
TCP Number of bytes in flight larger than Send Buffer Size

I noticed something that I did not understand in a Wireshark Capture of a data transfer. I have a long fat pipe (20 Mbits/sec, 720 Millisecond Round Trip Time). If I understand correctly, my TCP Send Buffer Size should be 16 KB. The contents of the /proc/sys/net/ipv4/tcp_wmem file is "4096 16384 1978368". Windows Scaling is enabled for the TCP Connection. The maximum TCP window size is 16 MB.

I thought that if the TCP Send Buffer Size was 16 KB, that the TCP socket could only send up to 16 KB of data that was not acknowledge (Bytes in Flight). But when I review the Wireshark capture, most of the time the TCP connection has around 256 KB in Flight.

Can someone explain this behavior? If Windows Scaling is enabled, the socket creates a large send buffer than the default value in the tcp_wmem file?

Thank You
Old 11-23-2016, 01:01 PM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,069

Rep: Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244Reputation: 1244
The send buffer accumulates multiple writes before issuing send, so is more like the mimimum amount that will be in flight. Otherwise every write would cause a send, which would be a lot of overhead on some streaming protocols. Many send buffers worth of data may be in flight (Window size) so that bandwidth is used efficiently on long-latency connections.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the maximum number of bytes is possible to send from a udp socket? boidi Linux - Software 3 10-01-2010 05:57 PM
Default value for TCP send buffer size peer Linux - General 4 01-27-2009 08:21 AM
How to find TCP buffer size mvenkat_in Solaris / OpenSolaris 3 02-04-2008 11:14 PM
possible to send size zero tcp packet? jackandking Linux - Networking 3 07-05-2007 03:27 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration