Feeds:
Posts
Comments

Archive for the ‘Oracle’ Category

This article will assist you to set permanently the kernel parameters on RedHat Advanced Server and on United Linux

Oracle uses UNIX resources such as shared memory, swap space, and semaphores extensively for interprocess communication. If your kernel parameter settings

are insufficient for Oracle, you will experience problems during installation and/or instance startup.

To modify kernel parameters a common way is to change /proc file system:

1. Log in as root user.

2. Change to the /proc/sys/kernel directory.

3. echo <desired list of values> > <group of parameters>

But this update is not permanent and after system reboot, your kernel parameters’s values will be the same as before.

A way to set kernel parameter modifications permanently, on Linux, is to includethem in a shell script. This could be run as root user, or in an automatic way at startup process (this is valid for RedHat Advanced Server and UnitedLinux)

– Create file /etc/init.d/set_kernel_parameters

#!/bin/sh

#

#

echo -n $”Start Setting kernel parameters on ”

echo 100 1024 100 100 > /proc/sys/kernel/sem

echo 2147483648 > /proc/sys/kernel/shmmax

echo 4096 > /proc/sys/kernel/shmmni

echo 2097152 > /proc/sys/kernel/shmall

echo 65536 > /proc/sys/fs/file-max

ulimit -n 65536 >/dev/null 2>&1

echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range

ulimit -u 16384 >/dev/null 2>&1

echo -n $”End Setting kernel parameters on ”

echo

– grant execute rights on this file

$ chmod 755 /etc/init.d/set_kernel_parameters

– create symbolic link to run at startup

$ ln -s /etc/init.d/set_kernel_parameters /etc/rc.d/rc5.d/S55kernel

$ ln -s /etc/init.d/set_kernel_parameters /etc/rc.d/rc3.d/S55kernel

– make the kernel parameters active by running as root

$ /etc/init.d/set_kernel_parameters

 

RedHat Linux Advanced Server

——————————————

Another way to setup permanently kernel parameter values on Red Hat Advanced Server is to use ‘/etc/sysctl.conf’ file.

Every time the system boots, the ‘/etc/rc.d/rc.sysinit’ script is executed by init process. This shell script contains a call to sysctl command and

reads the values from /etc/sysctl.conf file as the ones to be set Therefore, any values added to /etc/sysctl.conf will take effect after the system boot.

sysctl.conf is a simple file containing sysctl values to be read in and set by sysctl (see man 8 sysctl).

The syntax is simply as follows:

# comment

; comment

token = value

Note that blank lines are ignored, and whitespace before and after a token

or value is ignored, although a value can contain whitespace within. Lines

which begin with a # or ; are considered remarks / comments and ignored.

EXAMPLE:

# sysctl.conf sample

#

net.ipv4.ip_forward = 0

net.ipv4.conf.default.rp_filter = 1

kernel.sysrq = 1

kernel.sem = 100 1024 100 100 #This sets SEMMSL, SEMMNS, SEMOPM, SEMMNI

kernel.shmmax = 2147483648

kernel.shmmni = 100

net.ipv4.ip_local_port_range = 1024 65000

fs.file-max = 65536

The sysctl command is used to view, set, and automated kernel settings

in the /proc/sys/ directory. To get a quick overview of all settings

configurable in the /proc/sys/ directory, type the sysctl -a command as

root. This will create a large, comprehensive list.

 

United Linux

——————–

On United Linux another way to set kernel parameter modifications permanently

is to use the ‘/etc/init.d/boot.local’ file.

You can put in that file the commands setting the kernel parameters.

At the boot time ‘boot.local’ is started and the these setting processed

EXAMPLE:

#! /bin/sh

#

# Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany. All rights reserved.

#

# Author: Werner Fink <werner@suse.de>, 1996

# Burchard Steinbild <feedback@suse.de>, 1996

#

# /etc/init.d/boot.local

#

# script with local commands to be executed from init on system startup

#

# Here you should add things, that should happen directly after booting

# before we’re going to the first run level.

#

echo -n $”Start Setting kernel parameters on ”

echo 100 1024 100 100 > /proc/sys/kernel/sem

echo 2147483648 > /proc/sys/kernel/shmmax

echo 4096 > /proc/sys/kernel/shmmni

echo 2097152 > /proc/sys/kernel/shmall

echo 65536 > /proc/sys/fs/file-max

ulimit -n 65536 >/dev/null 2>&1

echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range

ulimit -u 16384 >/dev/null 2>&1

echo -n $”End Setting kernel parameters on ”

echo

Again on United Linux (with orarun-1.8-5.i586.rpm a part of SP1)

you can use ‘/etc/sysconfig/oracle’ file to set kernel parameter

modifications permanently.

EXAMPLE:

SET_ORACLE_KERNEL_PARAMETERS=”yes”

SHMMAX=3294967296

SHMMNI=4096

SHMALL=2097152

SEMMSL=1250

SEMMNS=32000

SEMOPM=100

SEMMNI=256

IP_LOCAL_PORT_RANGE=”1024 65000″

FILE_MAX_KERNEL=131072

FILE_MAX_SHELL=65536

PROCESSES_MAX_SHELL=16384

RELATED DOCUMENTS

——————————-

– Linux Man Page for sysctl.conf (5)

-Default Kernel Parameters for Linux Intel for 9.X Database

-Default Kernel Parameters for Linux Intel for 8.1.X Database

-Where To Find Linux Kernel Parameters

-Linux: How to Check Current Shared Memory, Semaphore Values

Read Full Post »