From owner-freebsd-hackers Tue Jun 30 22:38:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA28779 for freebsd-hackers-outgoing; Tue, 30 Jun 1998 22:38:35 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from redfish.go2net.com (redfish.go2net.com [207.178.55.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id WAA28765 for ; Tue, 30 Jun 1998 22:38:32 -0700 (PDT) (envelope-from marcs@go2net.com) Received: from marcs by redfish.go2net.com with smtp (Exim 1.82 #2) id 0yrFZs-0003XM-00; Tue, 30 Jun 1998 22:37:08 -0700 Date: Tue, 30 Jun 1998 22:37:08 -0700 (PDT) From: Marc Slemko X-Sender: marcs@redfish To: Bill Fenner cc: freebsd-hackers@FreeBSD.ORG, jamin@eecs.umich.edu Subject: Re: client-server problem In-Reply-To: <199807010409.VAA06201@mango.parc.xerox.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 30 Jun 1998, Bill Fenner wrote: > #define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */ > > - -#define MINCLSIZE (MHLEN + MLEN) /* smallest amount to put in cluster */ > +#define MINCLSIZE (MHLEN) /* smallest amount to put in cluster */ > #define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */ ISTR that there was some problem when someone (I?) suggested this workaround before, in addition to what you mention. Hmm. Maybe it was just dg thinking he remembered something breaking, but he wasn't sure what. David Borman said: >I know what problem you are referring to, but it is not as you describe >it. For a non-atomic protocol (like TCP) sosend() will allocate a >cluster if the data won't fit in the mbuf, even if it is over by only >one byte. This puts a small amount of data into a cluster. It >doesn't take very many of these small writes until sb->sb_mbcnt bumps >into sb->sb_mbmax, long before sb->sb_cc hits sb->sb_hiwat. So, you >get a socket send buffer without much data to send, which can't accept >any more data from the user. You wind up waiting for the delayed ACKs >from the remote side to clear out buffer space, but it is never enough >to allow you to get 2 full packets out to get past the delayed ACKs! >The problem is that sbcompress() does not compress cluster mbufs, to >avoid excessive data copies. I've modified sbcompress() (in the next >release of BSD/OS) to allow cluster mbufs to be compressed, provided >that all the data can be copied and there is no more than 1/4 of a >cluster to copy. This change allows enough data to be copied down >from the user to get out 2 full packets and thus get past the delayed >ACKs. The benchmark will still run slow because of the tiny writes, >and the extra data copies, but at least it no longer runs an order or >two of magnitude slower than really tiny writes (<= the size of an mbuf). about the problem. I don't have the full thread, since I'm in SF and don't have access to my machine at home. It may have been on nanog (? most odd discussions are there). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message