LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-22-2007, 12:16 PM   #1
zok
Member
 
Registered: Sep 2006
Posts: 42

Rep: Reputation: 15
Changing Kernel Parameters -- RHAS 4


I'm going to be installing Oracle and the documentation says that some of the kernel parameters must be changed:

semmsl 250
semmns 32000
semopm 100
semmni 128
shmall 2097152
shmmax Half the size of physical memory (in bytes)
shmmni 4096
file-max 65536
ip_local_port_range Minimum:1024, Maximum: 65000
rmem_default 262144
rmem_max 262144
wmem_default 262144
wmem_max 262144

I did a bit of searching and seem to have found that I can check the current paramters with /sbin/sysctl -a:

$ sudo /sbin/sysctl -a | grep sem
Password:
kernel.sem = 250 32000 32 128

And to change a kernel parameter edit /etc/sysctl.conf and mofity whatever you need. When I look at this file, though, I don't see any entries for the parameters I want to change. Am I looking in the right place? Am I missing something?

Thanks.
 
Old 01-22-2007, 12:22 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Yes. If they're not in the conf file it means you're using the default settings. Once you add to the conf file and run the command to reread it the new settings will take effect.

I'd caution you on the "half of physical memory" for shmmax. The Oracle SGA resides primarily in a single shared memory segment and this parameter controls the size of a shared memory segment. If the box is a dedicated database server with no other apps expected to run on it making shmmax larger will allow for a larger SGA which will increase DB performance. You don't want to use all the memory but it's not unusual to have this larger than the half of physical memory they indicate.

There are other limitations on memory usage though. If you're not using the hugemem kernel you have a limit of under 2 GB for memory used by a single process.
 
Old 01-22-2007, 01:14 PM   #3
MOS JEFF-INITELY
Member
 
Registered: Sep 2006
Distribution: Windows .. MUAHAHAHA
Posts: 66

Rep: Reputation: 15
use the `sysctl -w whatever=somevalue` command (as root of course) this will change your kernel parameters immediately without a reboot.

ease-e
 
Old 01-23-2007, 10:44 AM   #4
zok
Member
 
Registered: Sep 2006
Posts: 42

Original Poster
Rep: Reputation: 15
Thanks, that's easy enough. One thing I'm unsure about, though. I need to ensure the following values are set:

semmsl 250
semmns 32000
semopm 100
semmni 128

All of these values seem to be grouped into kernel.sem:

$ sudo /sbin/sysctl -a | grep sem
Password:
kernel.sem = 250 32000 32 128

What is the proper form to set only the third value -- semopm. I tried a few things but none of them worked:

$ sysctl -w kernel.semopm=100
error: 'kernel.semopm' is an unknown key

$ sysctl -w semopm=100
error: 'semopm' is an unknown key

$ sysctl -w kernel.sem=250 32000 100 128
kernel.sem = 250
error: '32000' must be of the form name=value
error: '100' must be of the form name=value
error: '128' must be of the form name=value

The same goes for how I would change the following:

ip_local_port_range Minimum:1024, Maximum: 65000

Also, it seems that when the changes are made using "sysctl -w variable=value", it doesn't stick? I used this, rebooted, and the values are back to their originals. I'll just change them in the conf file, but I just want to confirm this.

Thanks.
 
Old 01-23-2007, 11:37 AM   #5
zok
Member
 
Registered: Sep 2006
Posts: 42

Original Poster
Rep: Reputation: 15
Nevermind, I found that changing these values in the conf file as follows work:

kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000

Thanks for the help.
 
Old 01-23-2007, 11:48 AM   #6
MOS JEFF-INITELY
Member
 
Registered: Sep 2006
Distribution: Windows .. MUAHAHAHA
Posts: 66

Rep: Reputation: 15
yes, they will go back to default on a reboot. To make the change permanent, add or change the following line in the file /etc/sysctl.conf. This file is used during the boot process.

the command should be used like this:
sysctl -w kernel.sem="250 32000 100 128"
or: echo 250 32000 100 128 > /proc/sys/kernel/sem
sysctl -w net.ipv4.ip_local_port_range="1024 65000"
sysctl -w kernel.shmall=2097152

The four semaphore parameters are actually set by kernel.sem:
# cat /proc/sys/kernel/sem
250 32000 32 128
SEMMSL, SEMMNS, SEMOPM, and SEMMNI.

make sure you quote multi-values.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing shell DISPLAY parameters dpvone Linux - Software 4 05-10-2007 09:15 AM
Changing Kernel Parameters aslamg Linux - Newbie 13 01-20-2006 02:57 AM
changing objects parameters via getters inside functions in c++? markhod Programming 1 03-08-2005 05:30 AM
Upgrading Kernel in RHAS 2.4.9 vanibhat Linux - Security 4 03-03-2005 02:26 PM
Changing Kernel Parameters aslamg Linux - Newbie 2 09-03-2002 05:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration