LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-21-2016, 03:03 PM   #1
cwwanner
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, 12:01 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
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.
 
  


Reply

Tags
tcp



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 04:57 PM
Default value for TCP send buffer size peer Linux - General 4 01-27-2009 07:21 AM
How to find TCP buffer size mvenkat_in Solaris / OpenSolaris 3 02-04-2008 10:14 PM
possible to send size zero tcp packet? jackandking Linux - Networking 3 07-05-2007 02:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:20 AM.

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