We use the following kernel configuration file, derived from /usr/src/sys/i386/conf/GENERIC:
BENCH4a
Increase max file descriptors in /sys/conf/param.c
#define MAXFILES (16384) int maxfilesperproc = 12288;
Decrease MSL to 3 seconds in /usr/src/sys/netinet/tcp_timer.h
#define TCPTV_MSL ( 3*PR_SLOWHZ) /* max seg lifetime (hah!) */
Apply this patch to /usr/src/sys/kern/uipc_socket.c to avoid packet fragmentation at 100 byte boundary:
===================================================================
RCS file: /home/ncvs/src/sys/kern/uipc_socket.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -p -u -r1.40 -r1.41
--- src/sys/kern/uipc_socket.c 1998/05/15 20:11:30 1.40
+++ /home/ncvs/src/sys/kern/uipc_socket.c 1998/07/06 19:27:14 1.41
@@ -491,6 +491,7 @@ restart:
mlen = MCLBYTES;
len = min(min(mlen, resid), space);
} else {
+ atomic = 1;
nopages:
len = min(min(mlen, resid), space);
/*
If you are going to use more than 500 IP addresses, you should also apply our ip_addr_hash.patch. Without this patch, the FreeBSD TCP stack will not be able to handle large number of IP addresses efficiently. For example, see a simple experiment described elsewhere. The patch is very experimental and must not be used for general purpose machines.
After applying the patch, you must enable IF_ADDR_HASH kernel configuration option for the changes to have any effect. Our BENCH4a configuration file mentioned above has that option commented out.
Run this sysctl commands from /etc/rc.local:
/sbin/sysctl -w kern.ipc.somaxconn=1024 /sbin/sysctl -w net.inet.tcp.delayed_ack=0 /sbin/sysctl -w net.inet.ip.portrange.last=30000
Disable unnecessary services in /etc/defaults/rc.conf.
If you are using xl driver with 3Com ethernet card, you may need to replace your driver with our patched version. Polygraph does not care what driver is in use, but we have monitored bad network performance with the default 3Com ethernet driver.