LinuxQuestions.org
Review your favorite Linux distribution.
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 10-24-2007, 01:20 PM   #1
Viken Kondakji
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: 0
tcp send window size discrepency


On our dev machine, kernel.osrelease = 2.4.21-32.0.1.EL.msdwhugemem, when I do:

cat /proc/sys/net/ipv4/tcp_wmem

I get
4096 16384 131072

But, programatically I'm geting a different result. In a program, I do:

Before issuing connect(2) I do a getsockopt; this tells me the default value. Then I do a setsockopt of the send buffer to a very large value (8*1024*1024). The call succeeds. Then I do another getsockopt to see what the actual value is. I get 262,142. Since I did not get 8MB (got less) on the second getsockopt, and since all these calls succeeded, I surmised that This must be the (current) max setting allowed on this host.

However, the current max for this host from the /proc is 131072.

Anyone know why from a program I'm getting 262142 = 131072*2 - 2 ?

Which value will the kernel use as the send buffer size? 131072 or 262142 ?

Thanks.
 
  


Reply



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
Confusion regarding the TCP window size bzlaskar Linux - Networking 3 07-06-2007 02:52 PM
possible to send size zero tcp packet? jackandking Linux - Networking 3 07-05-2007 02:27 AM
increasing TCP window size linux_mando Linux - Networking 2 02-27-2007 09:56 AM
Setting tcp receive window size cwwilson721 Linux - Networking 2 01-21-2007 06:43 AM
tcp/ip window size h/w Linux - Networking 2 12-04-2003 10:08 PM

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

All times are GMT -5. The time now is 02:18 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