Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Leopard is setting RWIN too large!!!

I did a TCP test at speedguide.net and this is what it found for my TCP stack settings:

Default TCP Receive Window (RWIN) = 524280
RWIN Scaling (RFC1323) = 3 bits (scale factor of 6)
Unscaled TCP Receive Window = 65535

This is way off normal, and changing the RWIN in terminal has no effect. It stays at 524280, which is too large except for an extremely fast connection. Nothing I could do in terminal would set the RWIN to a correct range.

I finally turned scaling off (RFC1323=0) which set my RWIN to 65535, but that is a bit low for my cable connection. There does not seem to be a way to get any other size.

Mac OS X (10.5)

Posted on Oct 27, 2007 4:47 PM

Reply
68 replies

Oct 28, 2007 8:31 AM in response to Zaxcom

I believe you must change the net.inet.tcp.sockthreshold, it is currently set to 256 which means that the recvspace and sendspace changes you make will have no effect until 256 socket connections have been utilized. Change this to 0 and your new recvspace and sendspace settings will work. Remember, rwin is a WINDOZE/Linux naming convention and not a Unix tcp stack naming convention.

Oct 28, 2007 10:04 AM in response to Ziv Jacoby

You'll use the terminal, located in the /Applications/utilities folder.

Try this:

Open the terminal
type: sysctl -a|grep threshold

you should see the result: net.inet.tcp.sockthreshold: 64

If you with to change this, use this:

sudo sysctl -w net.inet.tcp.sockthreshold=0

You will be prompted for your password. If you want this to keep between reboots, you will need to modify the /etc/sysctl.conf file. Editing this will require the use of a Unix editor, like VI. If you need help with that, let me know, I've been a Unix sysadmin for 19 years, editing files isn't as scary as some think. 🙂

Oct 28, 2007 8:54 PM in response to kingbloobie

The easiest way I've found on the Mac, without having to use the unix editor Vi, but the terminal is necessary. Open the terminal application in the /Applications/Utilities folder. Enter the following:

cd /etc <return>
sudo open -a textedit sysctl.conf ( you will be prompted for your password)

after entering your password, you will be in textedit, all you have to do is add this line:

net.inet.tcp.sockthreshold=0


File -> Save
Textedit -> Quit

You can verify your entry in the /etc/sysctl.conf file by typing this:

cat /etc/sysctl.conf

the contents will pill out onto the console, you will probably only have one line in it. If you added correctly, upon your next reboot, the setting you with to modify will take effect.

More information can be found by typing:

man sysctl

Oct 29, 2007 7:06 AM in response to Scott Micciche

Scott

This is the first time that I have ever done anything in Terminal so please be patient with me.

so I follow your instructions and A new window appears ( black band across top GNU nana 2.01 File sysctl.conf ) in which I type

net.inet.tcp.sockthreshold=0

CTRL-X

I press return and nothing happens - Terminal does NOT prompt me to save - what am I doing wrong ?

I am in DESPERATE need of this fix !

Thanks for all your help and my apologies that I am totally ignorant about Terminal

Oct 29, 2007 7:15 AM in response to kingbloobie

All,

I think that using vi as your editor is the best thing.

1. Just login as su (by typing sudo su in terminal using computer admin acount).
2. type >vi /etc/sysctl.conf (where > is your prompt no need to type it)
3. in vi, press the letter i where you want the text to appear and type net.inet.tcp.sockthreshold=0
4. press escape and :wq (column w q)

if you make a mistake in vi you can always press escape and :q! to exit with no save

In any case it is always advisable to save a copy of the original file (just in case) by typing:

cp /etc/sysctl.conf /etc/sysctl.conf.org


if a restore is needed one can always type

cp /etc/sysctl.conf.org /etc/sysctl.conf


to restore the original file

Ziv

Oct 29, 2007 7:25 AM in response to effstop

If you tried the "sudo" command first, you shouldn't have any trouble, if not, it may not be able to save the file due to permissions in that folder. You can try CTRL-C to quit that program and try this instead:

cd /etc
sudo echo "net.inet.tcp.sockthreshold=0" > sysctl.conf

There shouldn't be a file by default on a new installation of Leopard as the initial tuning is done using different plist files.

Leopard is setting RWIN too large!!!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.