Subject: kern/21597: downloads from some servers too slow due to a tcp setting
To: None <gnats-bugs@gnats.netbsd.org>
From: None <pavel.cahyna@st.mff.cuni.cz>
List: netbsd-bugs
Date: 05/16/2003 12:43:21
>Number:         21597
>Category:       kern
>Synopsis:       downloads from some servers too slow due to a tcp setting
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 16 12:44:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Pavel Cahyna
>Release:        1.6_STABLE
>Organization:
>Environment:
NetBSD beta 1.6_STABLE NetBSD 1.6_STABLE #1: Tue Feb 18 11:30:59 UTC 
2003     root@beta:/usr/obj/kern/BETA-BRIDGE_IPF alpha
>Description:
Downloadning from some servers (e.g. ftp.gnu.org or www.netbsd.org) 
is much slower from a NetBSD clent than from a Linux or Windows 2000 
client in the same Ethernet segment.

This can be fixed by setting net.inet.tcp.recvspace to a higher 
value.
>How-To-Repeat:
bash-2.05# sysctl net.inet.tcp.recvspace
net.inet.tcp.recvspace = 16384
bash-2.05# !ftp
ftp http://www.netbsd.org/gallery/in-Action/jschauma-kde3.png
ftp: Connect to address `2001:4f8:4:b:290:27ff:feab:19a7': No route to host
Trying 204.152.184.116...
Requesting http://www.netbsd.org/gallery/in-Action/jschauma-kde3.png
100% |*************************************| 65442 KB   79.66 KB/s    00:00 ETA
bash-2.05# sysctl -w net.inet.tcp.recvspace=65536
net.inet.tcp.recvspace: 16384 -> 65536
bash-2.05# !ftp
ftp http://www.netbsd.org/gallery/in-Action/jschauma-kde3.png
ftp: Connect to address `2001:4f8:4:b:290:27ff:feab:19a7': No route to host
Trying 204.152.184.116...
Requesting http://www.netbsd.org/gallery/in-Action/jschauma-kde3.png
100% |*************************************| 65442 KB  150.87 KB/s    00:00 ETA

150 KB/s is actually the speed which I get with Windows 2000 client.
>Fix:
Please set the default (TCP_RECVSPACE in netinet/tcp_usrreq.c) to a 
higher value. I guess many people won't find the cause themselves.
>Release-Note:
>Audit-Trail:
>Unformatted: