Find the answer to your Linux question:
Results 1 to 6 of 6
I have installed Oracle 9i on RedHat 9. Current value of 'shmmax' is 33554432. Some people recommend value of appr. 50% of the RAM. I tried to change the value ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2003
    Posts
    10

    How can I change 'shmmax'


    I have installed Oracle 9i on RedHat 9.

    Current value of 'shmmax' is 33554432.

    Some people recommend value of appr. 50% of the RAM.

    I tried to change the value of 'shmmax' in two ways:

    1. cat 268435456 > /proc/sys/kernel/shmmax
    2. sysctl -w kernel.shmmax=268435456

    After restarting the machine the value of 'shmmax' is 33554432 again ?!?

    How can I permanently change 'shmmax'?

    Thanks!

  2. #2
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    I think you're referring to the swap file size. I've never heard anything said about changing the size of /dev/shm before.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  3. #3
    Just Joined!
    Join Date
    Jun 2004
    Posts
    13
    no i've already done that...
    Some progd need a lot of SHM...

    For me I did it each reboot
    But i know that there is a /etc.sysctl.conf
    I think you can add the line in this file to be set automatically

    Tell me please the result of your experiments

  4. #4
    Just Joined!
    Join Date
    Feb 2003
    Posts
    10
    As root I edited /etc/sysctl.conf by adding following line at the end of the file:

    kernel.shmmax = 268435456

    After rebooting the machine I found the same value (268435456) in /proc/sys/kernel/shmmax

    So, I guess the things go as follows:

    "/proc/sys/kernel/shmmax" reads the value from the "/etc/sysctl.conf"

    If there's nothing about SHMMAX excplicitly in "/etc/sysctl.conf" then I guess "/proc/sys/kernel/shmmax" accepts the 33554432 which could be the default, I suppose.

    That's Ok.

    Now, there's a problem. After I did all this I am having troubles with logging on XWindows as 'oracle' user ?!?

    I tried to log on to XWindows as root, it hazitates a bit and then lets me in. But as 'oracle' I just can't go in there.

    The system is up, I can log into it from another machine through SSH connection, I can even start XWindows and log in as 'root', but not as 'oracle'

    What is going on ?

  5. #5
    Just Joined!
    Join Date
    Oct 2004
    Posts
    49
    next time you can do something like:

    sysctl -w kernel.shmmax=<value> to write in sysctl.conf
    sysctl -p /etc/sysctl.conf to read/reload the values from sysctl.conf

    i dont think reboot is required by reading sysctl man page and i
    sysctl is used to modify kernel parameters at runtime.
    now about that logging i dunno... what you've done does not mix with users so maybe you do something more while getting your hands dirty.

  6. #6
    Just Joined!
    Join Date
    Feb 2003
    Posts
    10
    Hi!

    RomKnight was right! It was something I did before the 'SHMMAX' thing.

    It's the "$DISPLAY" environment variable for the 'oracle' user. I tried to set it trying to do something else. Nevermind.

    Now:

    - Machine boots with no problems.
    - Oracle database is up and running after reboot
    - I can log in toXWindows as any user, incl. 'oracle' user

    The way to modify 'SHMMAX' and to keep the setting is to modify
    '/etc/sysctl.conf' by explicitly putting into it the following line
    kernel.shmmax = <value>

    You can check the /var/log/boot.log file and see something like this:

    Date Time MachineName sysctl: kernel.shmmax = 268435456

    That's it!

    Thanks everyone, bye!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •