Wednesday, August 11, 2010

Linux Kernel parameter handling

 

ipcs">root@APP-SERVER):/root#>ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 4194303
max total shared memory (kbytes) = 1073741824
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

------ Messages: Limits --------
max queues system wide = 16
max size of message (bytes) = 65536
default max size of queue (bytes) = 65536

To modify these kernel parameters, we need to edit the /etc/sysctl.conf file:

cat">root@(APP-SERVER):/root#>cat /etc/sysctl.conf
# Kernel sysctl configuration file for Oracle Enterprise Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456

 

rc.sysinit reads the kernel parameter in boot time.

(boot.sysctl  on SUSE Linux.)

/etc/rc.sysinit  --- a soft link only
/etc/rc.d/rc.sysinit – actual one

 

Run sysctl with -p parameter to load in sysctl settings from the default file /etc/sysctl.conf.

   sysctl –p




[root@App ~]# sysctl -p /etc/sysctl.conf

vm.nr_hugepages = 20480


net.ipv4.ip_forward = 0


net.ipv4.conf.default.rp_filter = 1


net.ipv4.conf.default.accept_source_route = 0


kernel.sysrq = 0


kernel.core_uses_pid = 1


net.ipv4.tcp_syncookies = 1


kernel.msgmnb = 65536


kernel.msgmax = 65536


kernel.shmmax = 4294967295


kernel.shmall = 268435456





Refer to http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.uprun.doc/doc/t0008238.htm


No comments:

Post a Comment