From owner-freebsd-net Sat May 26 15: 7:21 2001 Delivered-To: freebsd-net@freebsd.org Received: from freesbee.wheel.dk (freesbee.wheel.dk [193.162.159.97]) by hub.freebsd.org (Postfix) with ESMTP id 7D2A737B423 for ; Sat, 26 May 2001 15:07:12 -0700 (PDT) (envelope-from jesper@skriver.dk) Received: by freesbee.wheel.dk (Postfix, from userid 1001) id D58005D3B; Sun, 27 May 2001 00:08:54 +0200 (CEST) Date: Sun, 27 May 2001 00:08:54 +0200 From: Jesper Skriver To: freebsd-net@FreeBSD.org Subject: Re: control TCP send/recieve window size based on port numbers ? and a bug(?) in sendpipe/recvpipe handling ... Message-ID: <20010527000854.B98021@skriver.dk> References: <20010526213442.A95985@skriver.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010526213442.A95985@skriver.dk>; from jesper@FreeBSD.org on Sat, May 26, 2001 at 09:34:42PM +0200 X-PGP-Fingerprint: 6B88 9CE8 66E9 E631 C9C5 5EB4 22AB F0EC F956 1C31 X-PGP-Public-Key: http://freesbee.wheel.dk/~jesper/gpgkey.pub Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sat, May 26, 2001 at 09:34:42PM +0200, Jesper Skriver wrote: > Hi, > > I'm currently looking at ways to tune a ftp server, and when > tuning net.inet.tcp.sendspace/net.inet.tcp.recvspace and > NMBCLUSTERS, I came to think that in a ftp server role, half the > TCP sessions will be control sessions, which doesn't transfer much > data, so there is no reason to reserve the same number of buffers > for sendspace/recvspace for these, compared to the data sessions. > > I was thinking of adding 3 new sysctl's > > net.inet.tcp.override_sendspace > net.inet.tcp.override_recvspace > net.inet.tcp.override_ports > > The latter controls which (if any) src/dst ports, trigger the > session to get the overridden send and recv-space applied. > > Does this make any sense ? As Mike Silbersack has educated me, the sendspace and recvspace is only the upper limit pr. session, and it's not static allocated, so this i not a problem, and thus this patch doesn't give us anything. So the only thing remaining is the bug where the sendpipe/recvpipe doesn't have any effect. /Jesper > For my own testing I'm using > > which do this with one exception, it only allow's one port to be > listed as override, I was to lazy to go into a comma separeted list > for my initial testing. > And I need to add these 3 sysctl's to tcp(4). > > My testing show that it doesn't seem to have any effect, but that > actually show a different problem, as the sendpipe/recvpipe > doesn't seem to have any effect either. > > On a box running stock -current as of may 16th > > root@tam% route change default -sendpipe 1024 > change net default > root@tam% route change default -recvpipe 1024 > change net default > root@tam% route get default > route to: default > destination: default > mask: default > gateway: dhcp129.skriver.dk > interface: xl0 > flags: > recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire > 1024 1024 0 0 0 0 1500 0 > > And then I get a file from the http server on this host, but > netstat -a give me > > root@tam% netstat -a|head -3 > Active Internet connections (including servers) > Proto Recv-Q Send-Q Local Address Foreign Address (state) > tcp4 0 17520 dhcp138.skriver..http freesbee.wheel.d.1162 ESTABLISHED > > So the send queue is the default 16k, regardless of the fact that > I've overridden the default via the route > > Ok, perhaps I have to change it at the cloned route. > > root@tam% route get 193.162.159.97 > route to: freesbee.wheel.dk > destination: freesbee.wheel.dk > gateway: dhcp129.skriver.dk > interface: xl0 > flags: > recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire > 0 0 139462230 79 7 0 1500 3421 > root@tam% route change 193.162.159.97 -sendpipe 1024 -recvpipe 1024 > change host 193.162.159.97 > root@tam% route get 193.162.159.97 > route to: freesbee.wheel.dk > destination: freesbee.wheel.dk > gateway: dhcp129.skriver.dk > interface: xl0 > flags: > recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire > 1024 1024 139462230 79 7 0 1500 3390 > > But still I get > > jesper@tam% netstat -a | head -3 > Active Internet connections (including servers) > Proto Recv-Q Send-Q Local Address Foreign Address (state) > tcp4 0 16384 dhcp138.skriver..http freesbee.wheel.d.1177 ESTABLISHED > > Any ideas ? > > /Jesper > > -- > Jesper Skriver, jesper(at)skriver(dot)dk - CCIE #5456 > Work: Network manager @ AS3292 (Tele Danmark DataNetworks) > Private: FreeBSD committer @ AS2109 (A much smaller network ;-) > > One Unix to rule them all, One Resolver to find them, > One IP to bring them all and in the zone to bind them. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > /Jesper -- Jesper Skriver, jesper(at)skriver(dot)dk - CCIE #5456 Work: Network manager @ AS3292 (Tele Danmark DataNetworks) Private: FreeBSD committer @ AS2109 (A much smaller network ;-) One Unix to rule them all, One Resolver to find them, One IP to bring them all and in the zone to bind them. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message