Solaris (2.5+) Tuning Parameters
- Child processes cannot start under heavy workload?
- Database server reports memory errors while there is plenty free?
- Not taking advantage of external storage cache?
CPU, Memory & Kernel Network Disk
I/O Disable
Daemons
CPU, Memory & Kernel
ulimit
'ulimit' defines file descriptors limits. It specifies the number of
open files permitted. If this value is set too low, a memory allocation error
will occur on Solaris and a too many files open will be logged to the to system
error log file. Set this value higher than the default system value. For large
multi-processor machines, set to unlimited.
# ulimit -a // to query
# ulimit -n
<new_value> // to set to a new value
# ulimit -n -1 // to set it to unlimited |
Maximum Number of Processes Per User
'maxuprc' defines the max number of processes each Solaris user can 'fork'.
If it is set too low, you may not be able to create high number of database
agents necessary to handle connections from your application. So it is
recommended to set this to at least 4096 or higher.
Solaris tunables are in /etc/system file:
...
set shmsys:shminfo_shmmax=16000000
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set maxuprc = 2048
...To set to a different value, update the
line in /etc/system to:
set maxuprc = 8192 |
Solaris Kernel Parameters
Enterprise database servers, such as IBM DB2, provide utilities which
recommends Solaris kernel settings given the hardware. For DB2, for
example, the utility is called 'db2osconf'. The following is the output
from a particular Solaris machine. Many of those settings apply to other
database systems. Add/change them in /etc/system file:
set msgsys:msginfo_msgmax = 65535
set msgsys:msginfo_msgmnb = 65535
set msgsys:msginfo_msgmni = 7168
set msgsys:msginfo_msgtql = 7168
set msgsys:msginfo_msgssz = 16
set msgsys:msginfo_msgseg = 32767set
semsys:seminfo_semmni = 8192
set semsys:seminfo_semmns = 17204
set semsys:seminfo_semmnu = 8192
set semsys:seminfo_semume = 240
set semsys:seminfo_semmap = 1026
set semsys:seminfo_semopm = 200
set semsys:seminfo_semmsl = 200
set semsys:seminfo_semvmx = 32767
set semsys:seminfo_semmap = 1026
set semsys:seminfo_semopm = 200
set shmsys:shminfo_shmmax = 30074587545
set shmsys:shminfo_shmmax = 15037293773
set shmsys:shminfo_shmmni = 8192
set shmsys:shminfo_shmseg = 240
set shmsys:shminfo_shmmin = 1
set rlim_fd_cur=1024
set rlim_fd_max=34000 |
NetworkIn high volume
environment, TCP layer on Solaris should be tuned to the similar values listed
below:
Tune TCP
To display a list of current values, use:
ndd /dev/udp udp_smallest_anon_port
32768
ndd /dev/hme link_status link_speed link_mode
1To update values:
/usr/sbin/ndd -set /dev/tcp tcp_mss_def_ipv4 9216
/usr/sbin/ndd -set /dev/tcp tcp_time_wait_interval 60000
/usr/sbin/ndd -set /dev/tcp tcp_fin_wait_2_flush_interval 67500
/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 65536
/usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q0 65536
/usr/sbin/ndd -set /dev/tcp tcp_xmit_hiwat 65536
/usr/sbin/ndd -set /dev/tcp tcp_recv_hiwat 65536
/usr/sbin/ndd -set /dev/tcp tcp_max_buf 655360
/usr/sbin/ndd -set /dev/udp udp_xmit_hiwat 65536
/usr/sbin/ndd -set /dev/udp udp_recv_hiwat 65536
/usr/sbin/ndd -set /dev/udp udp_max_buf 65536
/usr/sbin/ndd -set /dev/ce adv_1000fdx_cap 1
/usr/sbin/ndd -set /dev/ce adv_1000hdx_cap 0
/usr/sbin/ndd -set /dev/ce adv_100fdx_cap 0
/usr/sbin/ndd -set /dev/ce adv_100hdx_cap 0
/usr/sbin/ndd -set /dev/ce instance 0
/usr/sbin/ndd -set /dev/ce adv_10fdx_cap 0
/usr/sbin/ndd -set /dev/ce adv_10hdx_cap 0 |
Disk I/O
Tune FS Performance
Update the '/etc/vfstab' file and apply the
forcedirectio and noatime parameters. For example:
|
/dev/dsk/c8t2d2s2 /dev/rdsk/c8t2d2s2 /d07 ufs 2 yes
noatime,forcedirectio
|
Enabling file system direct I/O, on Solaris, allows the file system buffer cache
to be bypassed which eliminates the double buffering of data which can adversely
affect file system I/O performance. For changes to take effect, you may
run 'mount -a', if the file system you are modifying is not mounted. If the file
system is mounted it will need to be unmounted and then remounted or a system
reboot will need to be executed.
If I/O performance is of the utmost importance, then the utilization of raw
devices for database files should be considered. The 'noatime' mount option can
improve I/O performance in some cases, for example directories with many files,
by not updating the access time of the file. When 'noatime' is not specified;
every time a file is accessed the files inode information is updated to reflect
the last access time which incurs a write to the file system metadata.
Disable Unused
Daemons
To reduce the workload on system make sure you are only running the daemons
you need, disabling the unnecessary daemons can significantly improve the load
on system. Know what your Solaris server is used for, and disable the
following recommended daemons:
|
http: Daemon starts Web
server serving http requests (if this server isn't web server).
tftp: program accepts ftp
requests.
nfsd: This Daemon services
NFS requests from remote systems.
nntpd : This Daemon
supports USENET network news services.
quotas: /etc/rc quotaon
enables disk quota checking.
rlogind: services rlogin
and rsh commands.
sendmail: This provides
e-mail services both internally and externally (between other systems). Sendmail
uses lot of memory.
ntalk: This Daemon
supports the talk command.
|
|