Tuning OS For Best Performance

Tuning OS For Best Performance

  • perf-test.com need your contributions to build up a strong repository of performance engineering resources.

Proper tuning of operating system is required to make sure you dont encounter performance issues during the testing phase. It also helps you improve the overall stability of the operating system and avoid any kind of scalability issues. The typical scenarios which may indicate issues with OS tunables are listed below

Indications of OS tuning issues
  • Errors caused by the operating system’s failure to release old sockets from a close_wait call
  • Errors in the server logs - “connection refused”
  • Error in server logs - “too many open files”
  • Client side error - “address in use: connect”

In this guide we will only list out the tunable parameter names and not the values, since the tunable values depends on the applications to be deployed over the operating system.

So now lets begin the performance tuning exercise for operating system
Before starting to tune you should know the operating system you are working on. On most of the systems you can get to know the operating system name by typing

Code:
uname -a

upload_2015-12-3_15-26-8.png


Follow the below procedure depeding on the operating system you have

OS Tuning on Solaris

Setting TCP Parameters With the ndd Command - This section lists important TCP tuning parameters that when tuned, can enhance application performance:

/dev/tcp tcp_time_wait_interval
/dev/tcp tcp_conn_req_max_q
/dev/tcp tcp_conn_req_max_q0
/dev/tcp tcp_ip_abort_interval
/dev/tcp tcp_keepalive_interval
/dev/tcp tcp_rexmit_interval_initial
/dev/tcp tcp_rexmit_interval_max
/dev/tcp tcp_rexmit_interval_min
/dev/tcp tcp_smallest_anon_port
/dev/tcp tcp_xmit_hiwat
/dev/tcp tcp_recv_hiwat
/dev/ce instance
/dev/ce rx_intr_time

You can set the TCP-related tuning parameters using the ndd command, as demonstrated in the following example:


Code:
ndd -set /dev/tcp tcp_conn_req_max_q 8192

Setting Parameters In the /etc/system File
This section lists important /etc/system file tuning parameters that when tuned, can enhance application performance. Each socket connection to the server consumes a file descriptor. To optimize socket performance, you may need to configure your operating system to have the appropriate number of file descriptors. Therefore, you should change the default file descriptor limits, as well as the hash table size and other tuning parameters in the /etc/system file.

Note: You must reboot your machine anytime you modify /etc/system parameters.

set rlim_fd_cur
set rlim_fd_max
set tcp:tcp_conn_hash_size (Solaris 8 and 9)
set ip:ipcl_conn_hash_size (Solaris 10)
set shmsys:shminfo_shmmax Note: This should only be set for machines that have at least 4 GB RAM or higher.
set autoup
set tune_t_fsflushr
For more details see below documentation -

OS Tuning On Linux

Following are the most important tuning parameters for Linux operating system. You can tweek below parameters to maximize the performance of Linux

/sbin/ifconfig lo mtu
kernel.msgmni
kernel.sem
fs.file-max
kernel.shmmax
net.ipv4.tcp_max_syn_backlog​

More Details - Ipsysctl Tutorial 1.0.4

OS Tuning On HP-UX
Following are the most important tuning parameters for Linux operating system. You can tweek below parameters to maximize the performance of lnux
  • tcp_conn_req_max
  • tcp_xmit_hiwater_def
  • tcp_ip_abort_interval
  • tcp_rexmit_interval_initial
  • tcp_keepalive_interval
More Details - Tunable Kernel Parameters
Author
admin
Views
46
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from admin