Tuning Solaris TCP/IP settings benefits programs that open and close many sockets. Since the Application Server operates with a small fixed set of connections, the performance gain might not be significant.
The following table shows Solaris tuning parameters that affect performance and scalability benchmarking. These values are examples of how to tune your system for best performance.
Table 5–1 Tuning Parameters for Solaris
Parameter |
Scope |
Default |
Tuned Value |
Comments |
---|---|---|---|---|
/etc/system |
65536 |
65536 |
Limit of process open file descriptors. Set to account for expected load (for associated sockets, files, and pipes if any). |
|
/etc/system |
1024 |
8192 | ||
/etc/system |
2 |
0 |
Controls streams driver queue size; setting to 0 makes it infinite so the performance runs won’t be hit by lack of buffer space. Set on clients too. Note that setting sq_max_size to 0 might not be optimal for production systems with high network traffic. |
|
ndd /dev/tcp |
240000 |
60000 |
Set on clients too. |
|
ndd /dev/tcp |
240000 |
60000 |
Set on clients too. |
|
ndd /dev/tcp |
128 |
1024 | ||
ndd /dev/tcp |
1024 |
4096 | ||
ndd /dev/tcp |
480000 |
60000 | ||
ndd /dev/tcp |
7200000 |
900000 |
For high traffic web sites, lower this value. |
|
ndd /dev/tcp |
3000 |
3000 |
If retransmission is greater than 30-40%, you should increase this value. |
|
ndd /dev/tcp |
240000 |
10000 | ||
ndd /dev/tcp |
200 |
3000 | ||
ndd /dev/tcp |
32768 |
1024 |
Set on clients too. |
|
ndd /dev/tcp |
1 |
2 |
Slightly faster transmission of small amounts of data. |
|
ndd /dev/tcp |
8129 |
32768 |
Size of transmit buffer. |
|
ndd /dev/tcp |
8129 |
32768 |
Size of receive buffer. |
|
ndd /dev/tcp |
512 |
8192 |
Size of connection hash table. See Sizing the Connection Hash Table. |
The connection hash table keeps all the information for active TCP connections. Use the following command to get the size of the connection hash table:
ndd -get /dev/tcp tcp_conn_hash
This value does not limit the number of connections, but it can cause connection hashing to take longer. The default size is 512.
To make lookups more efficient, set the value to half of the number of concurrent TCP connections that are expected on the server. You can set this value only in /etc/system, and it becomes effective at boot time.
Use the following command to get the current number of TCP connections.
netstat -nP tcp|wc -l
On the Solaris OS, setting the maximum number of open files property using ulimit has the biggest impact on efforts to support the maximum number of RMI/IIOP clients.
To increase the hard limit, add the following command to /etc/system and reboot it once:
set rlim_fd_max = 8192
Verify this hard limit by using the following command:
ulimit -a -H
Once the above hard limit is set, increase the value of this property explicitly (up to this limit) using the following command:
ulimit -n 8192
Verify this limit by using the following command:
ulimit -a
For example, with the default ulimit of 64, a simple test driver can support only 25 concurrent clients, but with ulimit set to 8192, the same test driver can support 120 concurrent clients. The test driver spawned multiple threads, each of which performed a JNDI lookup and repeatedly called the same business method with a think (delay) time of 500ms between business method calls, exchanging data of about 100KB. These settings apply to RMI/IIOP clients on the Solaris OS.
For more information about setting file descriptor limits, see the following documentation for the Solaris OS:
For information about the /etc/system file, see the system(4) man page.