Subject: Re: Faster pipes from FreeBSD
To: None <abuse@spamalicious.com>
From: Ross Harvey <ross@ghs.com>
List: tech-kern
Date: 04/06/2001 18:12:22
Hehe, I just made the existing socket code 20-30% faster simply by patching
unpst_sendspace and unpst_recvspace in my running kernel with gdb(1),
setting them equal to the buffer sizes used in your proposal.

I'm sure the new code is better still, as nothing could be slower than all
that mbuf whacking. Sadly, it's not possible to get apples to apples, here,
because one type of buffer is wired and the other isn't.

Also, this might be worthwhile as a recommendation for 1.4.x and 1.5.x users,
since it does not sound like something we can actually pull up. FWIW, a
better size than 4k might have been something like:

	max(4 * 1024, min(nmbclusters / 64 * 1024, 32 * 1024))

Here, you might choose /64 for a low-risk change, and /32 or /16 for a
higher performing change. (I think that 32 simultaneous default pipes will
use up every mbuf cluster in the default install.)

For reference, the current default sizes:

	DTYPE_SOCKET	4k		current socket buffer space, wired

	DTYPE_PIPE	16k		usual size, not wired
			64k		sometimes used, not wired

//ross