Re: What exactly is net.inet.tcp.sockthreshold?
Re: What exactly is net.inet.tcp.sockthreshold?
- Subject: Re: What exactly is net.inet.tcp.sockthreshold?
- From: "Chris McFarling" <email@hidden>
- Date: Fri, 30 Sep 2005 15:35:25 -0500
----- Original Message -----
From: "Vincent Lubet" <email@hidden>
To: "Chris McFarling" <email@hidden>
Cc: <email@hidden>
Sent: Friday, September 30, 2005 11:58 AM
Subject: Re: What exactly is net.inet.tcp.sockthreshold?
> Chris,
>
> On Sep 30, 2005, at 7:51 AM, Chris McFarling wrote:
>
> > /etc/sysctl-macosxserver.conf states the following:
> >
> > # Some sysctl variables administrators may consider setting in
> > /etc/sysctl.conf:
> > #
> > # This sets a threshold that triggers increasing the send/recv
> > windows for
> > TCP
> > # connection from 32K to 64K to improve some file downloads.
> > # If your server has a lot of memory and serves only local traffic
> > (like AFP
> > cli
> > ents
> > # on local LAN) you may want to increase this value beyond its
> > default of
> > 256 pc
> > bs.
> > #
> > # net.inet.tcp.sockthreshold=512
> >
> >
> > When it says"256 pcbs", what does that mean?
>
> That's the number of TCP control blocks, which is approximately the
> number of active TCP connections.
>
> > Also, how does the triggering
> > mechanism work...when does the OS use 32K windows and when does it
> > use 64K
> > windows?
>
> The OS uses 64 K windows as long as the number of TCP connections is
> less than net.inet.tcp.sockthreshold.
>
> When the number of TCP connections is greater
> net.inet.tcp.sockthreshold the stack will use the values of
> net.inet.tcp.recvspace and net.inet.tcp.sendspace
>
> > The reason I ask is because I actually want to set the window size
> > to 18K.
> > I'm doing some testing and want to see if a smaller window size will
> > increase performance on my network. In doing so I'm trying to
> > understand OS
> > X's behavior though.
>
> To disable this mechanism and force the stack to always use a 18K you
> simply need to set net.inet.tcp.sockthreshold to zero
>
> Vincent
Thanks Vincent. I had read that on a thread somewhere else but wasn't sure
if it was accurate. Unfortunately, that procedure is not working in my case.
It seems the server is determined to use a window size of 32768 no matter
what.
server02 is the machine that I'm editing the TCP parameters on.
I created sysctl.conf and added the necessary parameters:
server02:root# more /etc/sysctl.conf
# Set TCP parameters
net.inet.tcp.sendspace=18824
net.inet.tcp.recvspace=18824
net.inet.tcp.sockthreshold=0
After a restart, the system appears to be using the custom params:
server02:root# sysctl -a
--snip--
net.inet.tcp.sendspace: 18824
net.inet.tcp.recvspace: 18824
net.inet.tcp.sockthreshold: 0
--snip--
To test, I mounted a share from server02 on to a client machine (via AFP)
and ran the following command while doing a tcpdump on the server.
dd bs=1m count=10 if=/dev/zero of=/Volumes/VolumeOnServer02/ddtest_1
It appears that the server is still using a value of 32768 for the TCP
receive window. The server IP is 192.168.10.13 and the client is
192.168.10.121. Note that all of the packets from .13 to .121 advertise a
window size of 32768. This is just a small snippet of packets but the whole
packet trace is the same. Does the AFP server possibly override the
net.inet.tcp.recvspace setting somehow?
13:02:41.680547 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3978075:3979523(1448) ack 1233 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.680549 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3979523:3980971(1448) ack 1233 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.680583 IP 192.168.10.13.548 > 192.168.10.121.50109: P 1233:1257(24)
ack 3980971 win 9050 <nop,nop,timestamp 3550895879 3574079424>
13:02:41.680643 IP 192.168.10.13.548 > 192.168.10.121.50109: . ack 3980971
win 32768 <nop,nop,timestamp 3550895879 3574079424>
13:02:41.680813 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3980971:3982419(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.680816 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3982419:3983867(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.680818 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3983867:3985315(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.680820 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3985315:3986763(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.680822 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3986763:3988211(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.680824 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3988211:3989659(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.680826 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3989659:3991107(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.680900 IP 192.168.10.13.548 > 192.168.10.121.50109: . ack 3991107
win 32768 <nop,nop,timestamp 3550895879 3574079424>
13:02:41.681036 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3991107:3992555(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681038 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3992555:3994003(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681040 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3994003:3995451(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681042 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3995451:3996899(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681044 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3996899:3998347(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681046 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3998347:3999795(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681048 IP 192.168.10.121.50109 > 192.168.10.13.548: .
3999795:4001243(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681050 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4001243:4002691(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681052 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4002691:4004139(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681054 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4004139:4005587(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681056 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4005587:4007035(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681058 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4007035:4008483(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681060 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4008483:4009931(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681062 IP 192.168.10.121.50109 > 192.168.10.13.548: P
4009931:4011379(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681064 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4011379:4012827(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681088 IP 192.168.10.13.548 > 192.168.10.121.50109: . ack 4012827
win 32768 <nop,nop,timestamp 3550895879 3574079424>
13:02:41.681252 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4012827:4014275(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681254 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4014275:4015723(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681256 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4015723:4017171(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681258 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4017171:4018619(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681260 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4018619:4020067(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681262 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4020067:4021515(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681264 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4021515:4022963(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681266 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4022963:4024411(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681268 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4024411:4025859(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681270 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4025859:4027307(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681272 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4027307:4028755(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681274 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4028755:4030203(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
13:02:41.681295 IP 192.168.10.13.548 > 192.168.10.121.50109: . ack 4030203
win 32768 <nop,nop,timestamp 3550895879 3574079424>
13:02:41.681460 IP 192.168.10.121.50109 > 192.168.10.13.548: .
4030203:4031651(1448) ack 1257 win 65535 <nop,nop,timestamp 3574079424
3550895879>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden