1820707 Members
2768 Online
109627 Solutions
New Discussion юеВ

Re: Linux/shmmax

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

Linux/shmmax

I am installing oracle 9i on RH 9.
I need to increase the shmmax param. error=ORA-27123 (unable to attach to shared memory segment. Running on an intel E800 with 512 RAM.

1) how can I see the value of shmmax
2) how can I change it

Is it something like echo 'Value' /proc/sys/kernel/shmmax ???

But still, how do I see the current value?
UNIX IS GOOD
6 REPLIES 6
Jerome Henry
Honored Contributor
Solution

Re: Linux/shmmax

Yes,
But cat /proc/sys/kernel/shmmax will show you the content.
Echo 3355442 > /proc/sys/kernel/shmmax will change the value.
Recompiling the kernel is required to change it on each reboot.
Don't forget that shmmax should be around 25 % of physical memory (/proc/meminfo/Mem). You may need to increase it on runngin Oracle.

Close to celebrate new year here ! Happy new Year to you Robert !

J
You can lean only on what resists you...
Nobody's Hero
Valued Contributor

Re: Linux/shmmax

And the same to you Jerome. Is there an easy command to recompile the kernel? I mean besides running xconfig?
UNIX IS GOOD
Jerome Henry
Honored Contributor

Re: Linux/shmmax

Nope.
But you can add a script at boot time to echo the right value to shmmax file, it's easier than a full recompilation.
Just write a script called say myshmmax, which containt the echo command (echo you value > /proc/sys/kernel/shmmax).
Add it to /etc/rc.d/init.d
Link it in rc5.d or rc3.d with S'anumber'myshmmax, where 'anumber' is an available number you won't see used in rc3.d or rc5.d.
Thanks for your wishes !

J
You can lean only on what resists you...
Vitaly Karasik_1
Honored Contributor

Re: Linux/shmmax

I recommend to use sysctl interface instead of adding "echo xyq >/proc/..."; see "man sysctl" for more.

Regarding kernel compilation for changing kernel params - we don't need this for 2.4 kernel; RH and Oracle don't recommend do it now.


Rgds,
Vitaly
Don_89
Trusted Contributor

Re: Linux/shmmax

I support Oracle 8i & 9i on AS 2.1 for about 11 servers. Its alot easier to modify the /etc/sysctl.conf file than re-compile the kernel.. Here is what mine looks like

# Disables packet forwarding
net.ipv4.ip_forward = 0
# Enables source route verification
net.ipv4.conf.default.rp_filter = 1
net.ipv4.ip_local_port_range = 1024 65000
# Disables the magic-sysrq key
kernel.sysrq = 0
#Oracle 9i release 2 parameters
kernel.sem= 250 32000 100 128
fs.file-max=65536
kernel.shmmax=2147483648
kernel.shmmni=4096
kernel.shmall=2097152
fs.aio-max-size=2147483648


You don't even have to reboot, just do a sysctl -p

One other thing, when setting up a server for Oracle, I always use Oracle's Pre-Flight check script which verify's everything is setup correct in the environment before installation is attempted.. I've included it..
Rahul Dixit
New Member

Re: Linux/shmmax

Hey Dan ,
Can you please tell me what the
Oracle's Pre-Flight check script and how do you run it? Thanks in advance.
RahulD.