Tune operating systems
Contents
Tune Windows NT or Windows 2000
- TcpTimedWaitDelay
- Description: Determines the time that must elapse before TCP/IP can release a closed connection and reuse its resources. This interval between closure and release is known as the TIME_WAIT state or twice the maximum segment lifetime (2MSL) state. During this time, reopening the connection to the client and server cost less than establishing a new connection. Reducing the value of this entry allows TCP/IP to release closed connections faster, providing more resources for new connections. Adjust this parameter if the running application requires rapid release, creation of new connections, and there is a low throughput due to many connections sitting in TIME_WAIT.
- How to view or set:
- Using the regedit command, access HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters and create a new REG_DWORD named TcpTimedWaitDelay.
- Set the value to decimal 30, which is Hex 0x0000001e.
- Stop and restart the system.
- Default value: 0xF0 (240 seconds = 4 minutes)
- Recommended value: The minimum value of 0x1E (30 seconds)
- MaxUserPort
- Description: Determines the highest port number TCP/IP can assign when an application requests an available user port from the system.
- How to view or set:
- Using the regedit command, access HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters and create a new REG_DWORD named MaxUserPort.
- Stop and restart the system.
- Default value: None
- Recommended value: At least decimal 32768.
Note: Use these two parameters together when tuning WebSphere Application Server on a Windows NT or Windows 2000 operating system.
&nsp;
Tune AIX
AIX with DB2
- Description: Separating your DB2 log files from the physical database files can boost performance. You can also separate the logging and the database files from the drive containing the Journaled File System (JFS) service. AIX uses specific volume groups and file systems for the JFS logging.
- How to view or set: Use the AIX filemon utility to view all file system input and output, and to strategically select the file system for the DB2 logs. Then, set the DB2 log location according to DB2 logging.
- Default value: The default location for the files is \home\<db2_user_name>\sqllib\db2dump.
- Recommended value: Move the files to a disk that is separate from the DB2 data and that has minimum I/O activity.
AIX file descriptors (ulimit)
- Description: Specifies the number of open files permitted. The default setting is typically sufficient for most applications. If the value set for this parameter is too low, a Memory allocation error is displayed.
- How to view or set: Check the UNIX reference pages on ulimit for the syntax of different shells. To set the ulimit to 2000 for the KornShell shell (ksh), issue the ulimit -n 2000 command. Use the command ulimit -a to display the current values for all limitations on system resources.
- Default value: For AIX systems, the default setting is 2000.
- Recommended value: 2000
AIX TCP_KEEPIDLE
- Description: The keepAlive packet ensures that a connection stays in an active/ESTABLISHED state.
- How to view or set: Use the no command to determine the current value or to set the value. The change takes effect immediately. The change is effective until the next time you restart the machine. To permanently change the value, add the no command to the /etc/rc.net directory. For example:
no -o tcp_keepidle=600
- Default value:14400 milliseconds.
- Recommended value:600 milliseconds.
Other AIX information
There are many other AIX operating system settings to consider that are not within the scope of this document. Additional settings you can adjust follow:
- Adapter transmit and receive queue
- TCP/IP socket buffer
- IP protocol mbuf pool performance
- Update file descriptors
- Update the scheduler
For more information about AIX, see Performance: Resources for learning.
Tune Solaris
- Solaris file descriptors (ulimit)
- Description: Specifies the number of open files permitted. If the value of this parameter is too low, a Too many files open error displays in the WebSphere Application Server stderr.log.
- How to view or set: Check the UNIX reference pages on ulimit for the syntax of different shells. For KornShell (ksh) use the ulimit -n 1024 command. Use the ulimit -a command to display the current values for all limitations on system resources.
- Default value: None
- Recommended value: 2000
- Solaris TCP_TIME_WAIT_INTERVAL
- Description: Notifies the TCP/IP how long to keep closed connection control blocks. After the applications complete the TCP/IP connection, the control blocks are kept for the specified time. When high connection rates occur, a large backlog of the TCP/IP connections accumulate and can slow server performance. The server can stall during certain peak periods. If the server stalls, the netstat command shows that many of the sockets opened to the HTTP server are in the CLOSE_WAIT or FIN_WAIT_2 state. Visible delays can occur for up to four minutes, during which time the server does not send any responses, but CPU utilization stays high, with all of the activity in system processes.
- How to view or set: Use the get command to determine the current interval and the set command to specify an interval of 60 seconds. For example:
ndd -get /dev/tcp tcp_time_wait_interval ndd -set /dev/tcp tcp_time_wait_interval 60000
- Default value: The Solaris default time wait interval is 2400000 milliseconds.
- Recommended value: 60000 milliseconds.
- Solaris TCP_FIN_WAIT_2_FLUSH_INTERVAL
- Description: Specifies the timer interval prohibiting a connection in FIN_WAIT_2 to remain in that state. When high connection rates occur, a large backlog of TCP/IP connections accumulate and can slow server performance. The server can stall during peak periods. If the server stalls, using the netstat command shows that many of the sockets opened to the HTTP server are in CLOSE_WAIT or FIN_WAIT_2 state. Visible delays can occur for up to four minutes, during which time the server does not send any responses, but CPU utilization stays high, with all of the activity in system processes.
- How to view and set: You can set the current interval to 67.5 seconds by using the following commands:
ndd -get /dev/tcp tcp_fin_wait_2_flush_interval ndd -set /dev/tcp tcp_fin_wait_2_flush_interval 67500
- Default value: The Solaris default is 675000.
- Recommended value: 67500
- Solaris TCP_KEEPALIVE_INTERVAL
- Description: The keepAlive packet ensures that a connection stays in an active/ESTABLISHED state.
- How to view or set: Use the ndd command to determine the current value or to set the value. For example:
ndd -set /dev/tcp tcp_keepalive_interval 300000
- Default value: 7200000 milliseconds.
- Recommended value: 300000 milliseconds.
- Solaris kernel semsys:seminfo_semume
- Description: Limits the Max Semaphore undo entries per process. Because this setting specifies a maximum value, the parameter does not cause use of additional memory unless it is needed.
- How to view or set: This value is displayed as SEMUME if the /usr/sbin/sysdef command is run. There can be an entry in the /etc/system file for this tuning parameter. Set this parameter through the /etc/system entry as follows:
set semsys:seminfo_semume = 1024
- Default value: 10
- Recommended value: None
- Solaris kernel semsys:seminfo_semopm
- Description: Displays as SEMOPM if the /usr/sbin/sysdef command is run. An entry in the /etc/system file can exist for this tuning parameter.
- How to view or set: Set this parameter through the /etc/system entry as follows:
semsys:seminfo_semopm = 200
- Default value: None
- Recommended value: 16384
Tune HP-UX 11i
HP-UX 11i settings can be modified to significantly improve WebSphere Application Server performance. For additional information about the HP performance tuning parameters see Performance: Resources for learning.
- Java virtual machine virtual page size
- Description: Setting the Java virtual machine instruction and data page sizes to 64MB improves performance.
- How to view or set: Use the chatr +pi64M +pd64M /opt/WebSphere/AppServer/java/bin/PA_RISC2.0/native_threads/java command. The command output provides the current operating system characteristics of the process executable.
- Default value: 4MB, if not assigned
- Recommended value: 64MB
- HP-UX 11i TCP_CONN_REQUEST_MAX
- Description: Specifies the maximum number of connection requests that the operating system can queue when the server does not have any available threads. When high connection rates occur, a large backlog of TCP/IP connection requests build up and client connections are dropped. Adjust this setting when clients start to timeout after waiting to connect. This situation can be verified by issuing the netstat -p tcp command. Look for the following value: connect requests dropped due to full queue
- How to view or set: Set this parameter by Using the ndd -set /dev/tcp tcp_conn_request_max 1024 command.
- Default value: 4096
- Recommended value: In most cases the default should suffice. Consider adjusting to 8192 if the default proves inadequate.
- HP-UX 11i kernel parameter recommendations
- Description: Use the following kernel parameter settings with DB2 or ORACLE for the best performance:
Kernel parameter WebSphere Application Server setting DB2 setting Oracle setting maxuprc -- 512 -- maxfiles 2,048 -- -- maxfiles_lim 2,048 -- -- nkthread 10,000 -- -- max_thread_proc 2,048 -- -- nproc -- 1,028 -- nflocks -- 8,192 -- ninode -- 2,048 -- nfile -- 8,192 -- msgseg -- 32,767 -- msgmnb -- 65,535 -- msgmax -- 65,535 -- msgtql -- 1,024 -- msgmap -- 258 -- msgmni -- 256 -- msgssz -- 16 -- semmni -- 512 70 semmap -- 514 -- semmns -- 1,024 200 semmnu -- 1,024 -- shmmax -- 966,367,642 1 GB shmmseg -- 16 10 shmmni -- 300 100
- How to view or set: Use the HP-UX SAM utility to set the kernel parameters. See the documentation for your operating system for directions.
- Default value: None
- Recommended value: See table
- HP-UX 11i kernel parameter recommendations for WebSphere MQ 5.3
- Description: The embedded messaging uses WebSphere MQ 5.3. The following are WebSphere MQ 5.3 recommended kernel parameter settings:
Kernel parameter Setting shmmax 536870912 shmseg 1024 shmmni 1024 shmem 1 sema 1 semaem 16384 semvmx 32767 semmns 16384 semmni 1024 (semmni < semmns) semmap 1026 (semmni +2) semmnu 2048 semume 256 msgmni 50 msgtql 256 msgmap 258 (msgtql +2) msgmax 4096 msgmnb 4096 msgssz 8 msgseg 1024 maxusers 32 max_thread_proc 66 maxfiles 1024 nfile 10000
- How to view or set: Use the HP-UX SAM utility to set the kernel parameters. See the documentation for your operating system for directions.
- Default value: None
- Recommended value: See table
- Generational garbage collection nursery size
- Description: WebSphere Application Server 5.0 ships with the the HP native JVM, which is based on the Sun Hotspot technology. One of its features is the use of generational garbage collection where the heap is divided into new and old generations. The appropriate size of the new generation or nursery must be determined using performance analysis tools such as Glance. If the nursery size is properly chosen, the overhead of garbage collection is reduced and throughput and response time improve.
- How to view or set: Use the -Xmn command at the generic Java options, for example, using -Xmn512m sets the nursery size to 512MB.
- Default value: One-third the maximum heap size.
- Recommneded value: When several short-life objects are created, set the value to one-half the maximum heap size.
Tune Linux
- SLES8 SP2A - sched_yield_scale tuning
- Description: The Linux scheduler is very sensitive to excessive context switching, so fixes have been integrated into the SLES8 kernel distribution to introduce delay when a thread yields processing. This fix is automatically enabled in SLES8 SP3 but must be enable explicitly in SLES8 SP2A or above.
- How to view or set:
- If you are running any SLES8 service pack below SP2A, upgrade to SP2A.
- Issue the command sysctl -w sched_yield_scale=1
- Default value: 0
- Recommended value: 1
- RedHat Advanced Server 2.1 Kernel update
- Description: Kernel updates for RedHat Advanced Server 2.1 have implemented changes effecting WebSphere performance, especially Memory to Memory HTTP Session replication.
- How to view or set:
- Issue the command: uname -a
- If you are running any kernel prior to 2.4.9-e.23, upgrade at least to this kernel, but preferably to the latest supported.
- Default value: 2.4.9-e.3
- Recommended value: 2.4.9-e.23
- Linux file descriptors (ulimit)
- Description: Specifies the number of open files permitted. The default setting is typically sufficient for most applications. If the value set for this parameter is too low, a file open error, memory allocation failure, or connection establishment error might be displayed.
- How to view or set: Check the UNIX reference pages on ulimit for the syntax of different shells. To set the ulimit to 2000 for the KornShell shell (ksh), issue the ulimit -n 2000 command. Use the ulimit -a command to display the current values for all limitations on system resources.
- Default value: For Linux systems, the default setting is 1024. This is the default for SLES 9.
- Recommended value:8000