Gigabit network performance
Notes by Lars Sommer, lasg@lasg.dk
—
Use nttcp to test
/usr/ports/benchmarks/nttcp/
—
Network cards on PCI bus:
1000Mb/s is 125MB/s
If 32 bit 33MHz PCI bus, it gives 133MB/s.
Because shared with other parts, 80MB/s is normally maximum.
If 32 bit 66MHz PCI bus, it gives 266MB/s.
If 64 bit 66MHz PCI bus, it gives 532MB/s.
—
MTU changes:
The MTU (ethernet frame size) can be set higher than normal 1500, but unusable
if a switch or likely can not handle it.
—
TCP window changes:
Try:
Maximum window size:
FreeBSD:
kern.ipc.maxsockbuf=262144
Linux:
net.core.wmem_max=8388608
Default window size:
FreeBSD, sending and receiving:
net.inet.tcp.sendspace=65536
net.inet.tcp.recvspace=65536
Linux, sending and receiving:
net.core.wmem_default = 65536
net.core.rmem_default = 65536
Dynamic larger window scaling:
FreeBSD:
net.inet.tcp.rfc1323=1
Linux:
net.ipv4.tcp_window_scaling=1
Increase number of mbufs:
FreeBSD:
kern.ipc.nmbclusters=32768
Linux:
net.ipv4.tcp_mem= 98304 131072 196608