To the Brass 
Cannon Webboard
Established 1986

Kevin Martin - PO Box 82783 - Portland, OR 97282

Network Interface Performance Tuning

Install this as /etc/rc2.d/S95net-tune and make it executable with
chmod +x /etc/rc2.d/S95net-tune

(Actually, Sun suggests it go between their two inet startup scripts, which would make it S74 rather than S95.)


#!/bin/sh
# Network interface tuning parameters 
# To force hme0 to 100Mbit full duplex:
ndd -set /dev/hme instance 0
ndd -set /dev/hme adv_100T4_cap 0
ndd -set /dev/hme adv_100fdx_cap 1
ndd -set /dev/hme adv_100hdx_cap 0
ndd -set /dev/hme adv_10fdx_cap 0
ndd -set /dev/hme adv_10hdx_cap 0
ndd -set /dev/hme adv_autoneg_cap 0
# 
#
# Web server adjustments - these are experimental
ndd -set /dev/tcp tcp_rexmit_interval_initial 5000
# ...was 3000
ndd -set /dev/tcp tcp_rexmit_interval_min 500
# ...was 200
ndd -set /dev/tcp tcp_conn_req_max_q 256
# ...was 128
ndd -set /dev/tcp tcp_recv_hiwat 65535
# ...was 8192
ndd -set /dev/tcp tcp_xmit_hiwat 65535
# ...was 8192.
ndd -set /dev/tcp tcp_cwnd_max 262144
# ...no change (we tried a suggested reduction but it hurt 
# performance under heavy load)
#
#
# Example only: To set hme1 to 10/half:
#ndd -set /dev/hme instance 1
#ndd -set /dev/hme adv_100T4_cap 0
#ndd -set /dev/hme adv_100fdx_cap 0
#ndd -set /dev/hme adv_100hdx_cap 0
#ndd -set /dev/hme adv_10fdx_cap 0
#ndd -set /dev/hme adv_10hdx_cap 1
#ndd -set /dev/hme adv_autoneg_cap 0

You can achieve some of this by setting the corresponding values for the hme device in /etc/system; but if you have more than one hme interface using ndd is the only way to set each of them independent of the others. That means using a startup script like the one above.

Please Note

If a search engine dropped you directly into this document, you should go to the index page to find out what you're reading. This document is a record of a project from 1999-2000 -- it is not a current guide to installing any software product.