1. Project 2-1 Configure Kernel Parameters
The default install of the
Linux operating system has values set for the kernel parameters, but the
Oracle requirements may need you to adjust these settings. This project
will walk you through step by step to change the kernel parameters and
show the values of these settings.
Step by Step
Get the minimum values from the installation guide. Here is a quick list:
Semmsl | 250 |
Semmns | 32000 |
Semopm | 100 |
Semmni | 128 |
Shmall | 2097152 |
Shmmax | The lesser of the two: either half the size of the physical memory or 4GB |
Shmmni | 4096 |
file-max | 512*PROCESSES |
ip_local_port_range | Min: 1024, max: 650000 |
rmem_default | 4194304 |
rmem_max | 4194304 |
wmem_default | 262144 |
wmem_max | 262144 |
Verify
the parameters that are currently set. There may be values already set
above the minimum value, so these would not need to be changed. At the
command line type the following:
# /sbin/sysctl –a | grep <param-name>
Substitute the parameter name for param-name. For example, shm will show the values for the semaphore parameters:
# /sbin/sysctl –a | grep shm
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 2147483648
Edit
the /etc/sysctl.conf to adjust the kernel parameter values. Use vi or
another text editor to add the line as listed under #ORACLE 11gR1
kernel parameters to the end of the file. The other parameter that was
changed was kernel.shmmax. Here is the example /etc/sysctl.conf file;
the areas that need to change or be added are in bold:
sysctl.confedits:
#Controlsthemaximumsizeofamessage,inbytes
kernel.msgmnb=65536
#Controlsthedefaultmaximumsizeofamessagequeue
kernel.msgmax=65536
#Controlsformaximumsharedsegmentsize,inbytes
# CHANGED FOR ORACLE 11g # kernel.shmmax = 1073740324
kernel.shmmax = 2147483648
#Controlsthemaximumnumberofsharedmemorysegments,inpages
kernel.shmall=2097152
#ORACLE 11gR1 Kernel Parameters – add the following lines
fs.file-max=6553600
kernel.shmmni=4096
kernel.sem=25032000100128
net.ipv4.ip_local_port_range=102465000
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=262144
Reload
the kernel parameters for the new values to take effect. This can be
done by restarting the server or by using the following command to
reload:
The execution of this command and its output are shown in Figure 1.
Project Summary
In walking through this
project, you now know how to see the kernel parameters, make changes to
the parameters, and verify those changes. In changing the kernel
parameters, you are making the necessary optimizations for the Oracle
software to run on the Linux platform.
2. Get Familiar with Linux
Having
the user interface and the terminal window for access to the command
line means that there are a couple of ways to navigate through Linux and
do what needs to be done. With previous examples of using the command
line, files were edited, users were added, and parameters were set up.
In managing some of the Oracle files and directories, it is useful to
know some of the basic commands or how to look up the option for the
commands. Changing directories, copying and moving files, editing, and
being able to look at the content of the file are all basic commands in
Linux (and almost the same as what is used in Unix, with a couple of
possible differences in the parameter options). The following are some
useful Linux commands, with a brief definition:
pwd This shows the current directory (print working directory).
more filename This lists the file.
ls This lists the files in the directory.
echo $VAR This shows value of variables or echoes back the text.
mv filename newfilename This renames a file.
cp filename / newdirectory This copies a file.
rm filename This removes (deletes) a file; wildcards can be used but are not recommended for a root directory.
Manual pages are available to provide details for
commands as well as available options. There are also examples for how
to use the commands in the details. This information can be accessed by
typing man and then the command. Here is an example of the command, and Figure 2 show the results of this command and what can be found in the man pages.