Tuesday, January 1, 2013

3 Configure Kernel Parameter and number of open file descriptor

maximum number of open file descriptors: nofiles

Global setting can be found via /proc/sys/fs/file-max

Change it can be done via /etc/security/limits.conf

image

# soft limit
ulimit -Sn
# Hard Limit
ulimit -Hn

image

Maximum number of processes available to a single user: nproc

ulimit -Su
ulimit -Hu

 

image

Kernel Parameter

Check current value:

sysctl -a

image

Below is the Oracle recommendation kernel parameters.

semmsl semmns semopm semmni 250 32000 100 128 /proc/sys/kernel/sem
shmmni 4096 /proc/sys/kernel/shmmni
shmmax Recommended: More than half the physical memory /proc/sys/kernel/shmmax
file-max 6815744 /proc/sys/fs/file-max
ip_local_port_range

Minimum: 9000

Maximum: 65500

/proc/sys/net/ipv4/ip_local_port_range
rmem_default 262144 /proc/sys/net/core/rmem_default
rmem_max 4194304 /proc/sys/net/core/rmem_max
wmem_default 262144 /proc/sys/net/core/wmem_default
wmem_max 1048576 /proc/sys/net/core/wmem_max
aio-max-nr 1048576 /proc/sys/fs/aio-max-nr

 

To make the changes, we can update /etc/sysctl.conf

Once the file is being update, we can run below command to make it effective,

/sbin/sysctl -p

 

We  can use ipcs –lm to check the

 

image

 

 

Reference

3 comments:

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates