Purpose
Manages
network tuning parameters.
Description
The optimizenet command
is used to configure network tuning parameters. The optimizenet command
sets or displays current or next boot values for network tuning parameters.
This command can also make permanent changes or defer changes until
the next reboot. Whether the command sets or displays a parameter
is determined by the accompanying flag. The -set flag performs
both actions. It can either display the value of a parameter or set
a new value for a parameter.
If the -list flag is specified without any Tunables, only Tunables
modifiable by this command are displayed.
Flags
| Flag name |
Description |
| -default Tunable |
Resets Tunable to its default value. If the Tunable needs to be
changed (not currently set to its default value) and it is of type Reboot, it is
not changed; a warning displays instead. |
| -h Tunable |
Displays help about Tunable parameter if one
is specified. |
| -list [Tunable] |
Lists the characteristics of one or all Tunables, one per line, by using the
following format:
NAME CUR DEF BOOT MIN MAX UNIT TYPE
DEPENDENCIES
------------------------------------------------------------------
General Network Parameters
-----------------------------------------------------------------
sockthresh 85 85 85 0 100 %_of_thewall D
-----------------------------------------------------------------
fasttimo 200 200 200 50 200 millisecond D
-----------------------------------------------------------------
inet_stack_size 16 16 16 1 kbyte R
-----------------------------------------------------------------
where
- CUR
- current value
- DEF
- default value
- BOOT
- reboot value
- MIN
- minimal value
- MAX
- maximum value
- UNIT
- tunable unit of measure
- TYPE
- Parameter type: D (Dynamic), S (Static), R (Reboot), B (Bosboot), M (Mount), I (Incremental),
and C (Connect)
- DEPENDENCIES
- List of dependent tunable parameters, one per line
|
| -perm |
Makes changes apply to both current and reboot values when used in combination
with -set or -default. These combinations cannot be used on Reboot type parameters
because their current value can't be changed. When used with -set without specifying a new
value, values displays only if the current and next boot values for a parameter are the same.
Otherwise, NONE displays as the value.
|
| -reboot |
Makes changes apply to reboot values when used
in combination with -set or -default. When used with -set without
specifying a new value, next boot values for tunables display
instead of the current values. |
| -set Tunable [=NewValue ] |
Displays the value or sets the Tunable to NewValue. If a tunable needs
to be changed (the specified value is different than current value), and is of type Reboot it
is not changed but a warning displays instead. When -reboot is used in combination without
a new value, the nextboot value for Tunable is displayed. When -perm is used in
combination without a new value, a value displays only if the current and next boot values for
tunable are the same Otherwise NONE displays as the value.
|
Network
tunable parameters
| Parameter |
Description |
| arptab_bsiz |
- Purpose:
- Specifies Address Resolution Protocol (ARP) table bucket size.
- Values:
-
- Default: 7
- Range: 1 to MAXSHORT
- Type: Reboot
- Diagnosis
- netstat -protocol arp shows the number of ARP packets sent and the number of ARP entries
purged from the ARP table. If large number of entries are being purged, the ARP table size must be
increased.
|
| arptab_nb |
- Purpose:
- Specifies the number of ARP table buckets.
- Values:
-
- Default: 73
- Range: 1 to MAXSHORT
- Type: Reboot
- Diagnosis:
- netstat -protocol arp shows the number of ARP packets sent and the number of ARP entries purged
from the ARP table. If large number of entries are being purged, the ARP table size must be
increased.
Increase this value for systems that have a large number of clients or servers. The
default provides for 73 x 7 = 511 ARP entries, but assumes an even hash distribution.
|
| clean_partial_conns |
- Purpose:
- Specifies whether SYN (synchronizes the sequence number) attacks are being avoided.
- Values:
-
- Default: 0 (off)
- Range: 0 or 1
- Type: Dynamic
- Tuning:
- This option must be turned on for servers that need to protect against network attacks. If on,
randomly removes partial connections to make room for new non-attack connections.
|
| net_malloc_police |
- Purpose:
- Specifies the size of the net_malloc and net_free trace
buffers.
- Values:
-
- Default: 0
- Range: 0 to MAXINT
- Type: Dynamic
- Tuning:
- If the value of this variable is nonzero, all net_malloc and net_free buffers are
traced in a kernel buffer and by system trace hook HKWD_NET_MALLOC. Additional error-checking is
also enabled. This includes checks for freeing a free buffer, alignment, and buffer overwrite.
Enable this parameter only when investigating some network problem because performance is affected
negatively when turned on. The default value is zero (policing off). Values of
net_malloc_police larger than 1024 allocate that many items in the kernel buffer for tracing.
|
| rfc1323 |
- Purpose:
- Enables window scaling and time stamps as specified by RFC 1323 (TCP Extensions for High
Performance). Window scaling allows the TCP window sizes (tcp_recvspace and
tcp_sendspace) to be larger than 64 KB (65536) and is typically used for large MTU networks.
- Values:
-
- Default: 0 (off)
- Range: 0 or 1
- Type: Connect
- Tuning:
- The default value of 0 disables the RFC enhancements on a systemwide scale. A value of 1
specifies that all TCP connections attempt to negotiate the RFC enhancements. Make changes before
attempting to set tcp_sendspace and tcp_recvspace to more than 64 KB.
|
| route_expire |
- Purpose:
- Specifies whether unused routes created by cloning, or created
and modified by redirects expire.
- Values:
-
- Default: 1 (on)
- Range: 0 or 1
- Type: Dynamic
- Tuning:
- A value of 1 allows route expiration, which is the default. Negative
values are not allowed for this option.
|
| tcp_pmtu_discover |
- Purpose:
- Enables or disables path MTU discovery for TCP applications.
- Values:
-
- Default: 1
- Range: 0 or 1
- Type: Dynamic
- Tuning:
- A value of 0 disables path MTU discovery for TCP applications,
while a value of 1 enables it.
|
| tcp_recvspace |
- Purpose:
- Specifies the system default socket buffer size for receiving data. This affects the window size
that is used by TCP.
- Values:
-
- Default: 16384 bytes
- Range: 4096 - 1048576
- Type: Connect
- Diagnosis:
- Setting the socket buffer size to 16 KB (16,384) improves performance over standard Ethernet and
Token-Ring networks. Lower bandwidth networks, such as Serial Line Internet Protocol (SLIP), or
higher bandwidth networks, such as Serial Optical Link, must have different optimum buffer sizes.
The optimum buffer size is the product of the media bandwidth and the average round-trip time of a
packet. For high-speed networks, like gigabit Ethernet or ATM 622, a value of 65536 must be used for
the minimum size for best performance.
For values larger than 65536, you must enable
rfc1323 (rfc1323=1) to enable TCP window scaling.
|
| tcp_sendspace |
- Purpose:
- Specifies the system default socket buffer size for sending data.
- Values:
-
- Default: 16384 bytes
- Range: 4096 - 1048576
- Type: Connect
- Tuning:
- This affects the window size that is used by TCP. Setting the socket buffer size to 16 KB
(16,384) improves performance over standard Ethernet networks. Lower bandwidth networks, such as
Serial Line Internet Protocol (SLIP), or higher bandwidth networks, such as Serial Optical Link,
must have different optimum buffer sizes. The optimum buffer size is the product of the media
bandwidth and the average round-trip time of a packet: (optimum_window=bandwidth *
average_round_trip_time) For high-speed networks, like gigabit Ethernet or ATM 622, a value of 65536
must be used for the minimum size for best performance. For values larger than 65536, you must
enable rfc1323 (rfc1323=1) to enable TCP window scaling.
|
| udp_recvspace |
- Purpose:
- Specifies the system default socket-buffer size for receiving
UDP data.
- Values:
-
- Default: 42080 bytes
- Range: 4096 - 1048576
- Type: Connect
- Diagnosis:
- Nonzero n in netstat -stats report of udp: n socket
buffer overflows
- Tuning:
- Increase size, preferably to multiple of 4096.
|
| udp_sendspace |
- Purpose:
- Specifies the system default socket-buffer size for sending UDP
data.
- Values:
-
- Default: 9216 bytes
- Range: 4096 - 1048576
- Type: Connect
- Diagnosis:
- Increase size, preferably to multiple of 4096.
|
Examples
- To display the maximum size of the mbuf pool, type:
optimizenet -set thewall
- To change the default socket buffer sizes on your system, type:
optimizenet -reboot -set tcp_sendspace=32768
- To use a machine as an internet work router over Internet Protocol networks, type:
optimizenet -set ipforwarding=1
- To list the current and reboot value, range, unit, type and dependencies
of the arptab_bsiz parameter, type:
optimizenet -list arptab_bsiz
- To display help information on arptab_bsiz, type:
optimizenet -h arptab_bsiz