cvs commit: src/sys/conf options src/sys/netinet ip_output.c

David Malone dwmalone at
Sat Mar 29 01:20:37 PST 2003

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.)


More information about the cvs-src mailing list