Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Mar 2003 09:20:29 +0000
From:      David Malone <dwmalone@maths.tcd.ie>
To:        Luigi Rizzo <rizzo@icir.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/conf options src/sys/netinet ip_output.c
Message-ID:  <20030329092029.GA21929@walton.maths.tcd.ie>
In-Reply-To: <20030327153352.A66323@xorpc.icir.org>
References:  <200303260452.h2Q4quap015364@www.ambrisko.com> <20030326114030.U2075@odysseus.silby.com> <20030326183351.GJ57674@elvis.mu.org> <20030326130903.G2075@odysseus.silby.com> <20030327013224.P7674@odysseus.silby.com> <031301c2f49b$09d2bfb0$52557f42@errno.com> <20030327153352.A66323@xorpc.icir.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 27, 2003 at 03:33:52PM -0800, Luigi Rizzo wrote:
> so individual writes of 513+ bytes will result in wasting up to 75%
> of the socket buffer space. At the very least, i would drop the
> 'm->m_len <= MCLBYTES / 4' check to reduce the waste.

I think I added that test when we were making sbcompress work on
data in clusters. There was no profound reason for it, other than
preventing it copying complete clusters, which seems rather wasteful.
OTOH, if the data is likely to be copied later I guess we may as
well compress it more aggressively earlier.

(The reason we looked at optimising this was because we were
recieveing small packets from a remote X server and the fxp drivers
were passing them up in clusters, wasting loads of space in netscape's
socketbufs. In our case, the data was much smaller than MCLBYTES/4,
so copying any small amount of data was a big win.)

	David.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030329092029.GA21929>