OS Tuning

 

+

Search Tips   |   Advanced Search

 


Contents

  1. AIX
  2. Solaris
  3. HP-UX 11i
  4. Linux


AIX

See also: AIX performance tuning

AIX with DB2

Description: Separate DB2 log files from the physical database files to 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.
To 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: The default location for the files is \home\<db2_user_name>\sqllib\db2dump.
Recommended: 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: Number of open files permitted. If value set is too low, a Memory allocation error is displayed.
To Set: To set the ulimit to 2000 using ksh, run:

ulimit -n 2000

Use the command ulimit -a to display the current values for all limitations on system resources.

Default: For AIX systems, the default setting is 2000.
Recommended: 2000

 

Other AIX information

Additional settings include:

 


Solaris

 

Solaris file descriptors (ulimit)

Description: Number of open files permitted. If too low, a "Too many open files" error displays in stderr.log.
To Set: For ksh, run...

ulimit -n 1024

...to set to 1024.

To display the current values for all limitations run...

ulimit -a
Default: None
Recommended: 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.

To 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: The Solaris default time wait interval is 2400000 milliseconds.
Recommended: 60000 milliseconds.

 

Solaris TCP_FIN_WAIT_2_FLUSH_INTERVAL

Description 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.
To set 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: The Solaris default is 675000.
Recommended: 67500

 

Solaris TCP_KEEPALIVE_INTERVAL

Description: Timer interval prohibiting an active connection from staying in ESTABLISHED state if one of the peers never responds.
To Set: Use the following commands to determine the current value or to set the value to 300 seconds:

ndd -get /dev/tcp tcp_keepalive_interval
ndd -set /dev/tcp tcp_keepalive_interval 300000

Default: 7200000
Recommended: 300000

 

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.
To 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: 10
Recommended: 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.
To Set: Set this parameter through the /etc/system entry as follows:

semsys:seminfo_semopm = 200 
Default: None
Recommended: 16384

 


HP-UX 11i

 

JVM virtual page size

Description: Setting the JVM instruction and data page sizes to 64MB improves performance.
To 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: 4MB, if not assigned
Recommended: 64MB

 

HP-UX 11i TCP_CONN_REQUEST_MAX

Description: 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...

netstat -p tcp

Look for "connect requests dropped due to full queue"

To Set: ndd -set /dev/tcp tcp_conn_request_max 1024
Default: 4096
Recommended: 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 WAS 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

To Set: Use the HP-UX SAM utility to set the kernel parameters. See the documentation for your operating system for directions.
Default: None
Recommended: 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
To Set: Use the HP-UX SAM utility to set the kernel parameters.
Default: None
Recommended: See table

 

garbage collection nursery size

Description: WAS 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.
To Set: Use the -Xmn command at the generic Java options, for example, using -Xmn512m sets the nursery size to 512MB.
Default: 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.

 

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.
To Set:

  1. If you are running any SLES8 service pack below SP2A, upgrade to SP2A.
  2. Issue the command sysctl -w sched_yield_scale=1

Default: 0
Recommended: 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.
To Set:

  1. Issue the command: uname -a

  2. 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: 2.4.9-e.3
Recommended: 2.4.9-e.23