From muir@idiom.com  Thu Feb 16 02:16:37 1995
Received: from idiom.com (idiom.com [140.174.82.4]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id CAA17902 for <FreeBSD-gnats-submit@freebsd.org>; Thu, 16 Feb 1995 02:16:27 -0800
Received: (from muir@localhost) by idiom.com (8.6.9/8.6.9) id CAA21144; Thu, 16 Feb 1995 02:16:20 -0800
Message-Id: <199502161016.CAA21144@idiom.com>
Date: Thu, 16 Feb 1995 02:16:20 -0800
From: David Muir Sharnoff <muir@idiom.com>
Reply-To: muir@idiom.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: small SO_SNDBUF oddity
X-Send-Pr-Version: 3.2

>Number:         219
>Category:       kern
>Synopsis:       Performance on local net drops too much when SNDBUF is 200
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 16 02:20:02 1995
>Closed-Date:    Wed Apr 3 11:01:33 PST 1996
>Last-Modified:  Wed Apr  3 11:02:51 PST 1996
>Originator:     David Muir Sharnoff
>Release:        FreeBSD 2.0-RELEASE i386
>Organization:
Idiom Consulting
>Environment:

>Description:

	I have a little hack I do to my daemons (ftp, sendmail, news, http):
	to spare my slow internet link, I set my socket output buffer size
	to very small.  This forces a round-trip delay on each packet.

	I started doing this under SunOS and when I swtiched to FreeBSD,
	I re-hacked things.

	While I would expect the performance of ftp to drop considerably
	on my ethernet when I put the hack in, I did not expect it to drop
	down to 1.5K/s!  I see the same performance when ftp'ing from a
	950210-SNAP system and a SunOS 4.1.3 system.  Other ethernet traffic
	goes fast.

	This is very odd.  I have no idea why my ftp performance is so
	very low.

	Any clues would be appreciated.  In the meantime, I'm re-hacking
	the ftp daemon to notice when the network is local and go fast.  This
	will allow me to install 950210-SNAP on my test machine.

	Speaking of which?  What do I need to do to make my partition
	bootable from the point of view of OS-BS?

>How-To-Repeat:

	Add

	int bsize = 200;
	setsockopt(s, SOL_SOCKET, SO_SNDBUF, (char *)&bsize, sizeof(bsize))

	to ftpd in the two places sockets are created and try ftp'ing
	on a local ethernet.

>Fix:
	
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: fenner 
State-Changed-When: Wed Apr 3 11:01:33 PST 1996 
State-Changed-Why:  
Neither the bug originator nor I could duplicate this problem on -stable. 
It's not clear exactly what fixed it, but it appears to be gone. 
>Unformatted:


