tcp: Use mbuf jcluster (4K) in sosendtcp(); improve 10Ge TSO performance
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 13 Sep 2013 09:26:22 +0000 (17:26 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 13 Sep 2013 09:37:50 +0000 (17:37 +0800)
commitef82c254b9dedc4b48fc86848142dc17a953c9e8
treeeccb2b69a84c4d74d318708d3748d2b240a93658
parentc83e573d02bea89e07d19abdff35f9c105f8bd32
tcp: Use mbuf jcluster (4K) in sosendtcp(); improve 10Ge TSO performance

For the Myricom PCIE-8AL-C I have tested, this gives ~900Mbps performance
boost using 1500 MTU when TSO is enabled (from 7.7Gbps to 8.6Gbps).

Using mbuf jcluster could:
- Reduce the number of TX descriptors needed for one TSO packet.
- Let the NIC chip perform longer large data burst.

I believe this is the main reasons for the 10Ge performance boost.

Reduce sosend_agglim from 3 to 2, which means 8K aggregation (was 6K
aggregation) before user thread dispatches the sending buf to netisr.

net.inet.tcp.sosend_jcluster is added to enable this feature; it is
enabled by default.
sys/kern/uipc_socket.c
sys/netinet/tcp_input.c