Results 1 to 5 of 5
  1. #1
    Join Date
    May 2006

    Unanswered: Kernel Parameters SHMMAX and SEMMNS


    I am working in Oracle 9i Rel.2.
    How do the kernel parameters like SHMMAX and SEMMNS affect the performance of the Database ?
    How do I set these parameters and on what ratios.
    My SGA is 538406552 then what must be the value set to SHMMAX and SEMMNS.

    If I set the values based on SGA, can I expect the performance to be improved, if so, can u pl. explain the reasons.


  2. #2
    Join Date
    May 2004
    Dominican Republic
    SHMMAX is a system-wide parameter that affects the way the kernel allocates new memory regions for segments within the OS. Typically, when you request a new memory region using a shmget() call, SHMMAX is the maximum number of bytes you can use. Same goes with SEMMNS, but this is just for semaphores. It could affect the DB performance in a way that it will possible degrade it if you set it too low (Oracle processes not being able to allocate larger memory regions).

    You set them depending on what Oracle says you should set them under your OS. In any case, SHMMAX should not be < SGA.

  3. #3
    Join Date
    May 2006

    kernel parameters

    Hello Sir,

    Thanks for the response. But what I wanted to understand is that the performance degrade, does it mean that the huge query when executed takes longer time to execute and if the parameters are set as Oracle says, will my performance problem be solved.

    In what way these parameters are related to the DB performance?

    Pl. advice me on this performance degrade.


  4. #4
    Join Date
    May 2004
    Dominican Republic
    You only have one option: increase it. If you lower it, I dont believe Oracle will let you ever start the DB. Your SGA upon startup will be equal to what you set SHMMAX. If you know and understand what SGA stands for, then you will understand how it affects Oracle performance. I suggest you read about SGA if you dont.

  5. #5
    Join Date
    Aug 2004
    Quote Originally Posted by JMartinez
    Your SGA upon startup will be equal to what you set SHMMAX.
    Well, not exactly JMartinez : SHMMAX is the maximum SGA size. That is : if you set a SGA size greater than SHMMAX, then your instance will not start at all. SHMMAX is the maximum size of one shared memory. It only impacts performance through the fact that it restricts SGA size, but in fact this size is restricted by your total RAM, so the real limitating ressource is RAM . Oracle recommends to set SHMMAX to half your total RAM amount.

    As for semaphores, I don't know the real impact, but I think allowing too few semaphores will limit your number of open sessions.

    BTW, you can monitor shared memories and semaphores with the ipcs command. On my machine this is the return of ipcs (-a stands for "display all") :

    [oracle@PH1 oracle]$ ipcs -a
    ------ Shared Memory Segments --------
    key        shmid      owner      perms      bytes      nattch     status
    0x985698bc 753666     oracle    640        132120576  13
    0x00000000 786435     oracle    640        1073741824 65
    0xde7f2ba8 819204     oracle    640        2097152    65
    ------ Semaphore Arrays --------
    key        semid      owner      perms      nsems
    0x11016565 0          root      204        2
    0x0000033d 32769      root      644        1
    0x358ec180 2719746    oracle    640        34
    0xa9c49c1c 2883587    oracle    640        204
    0x584d5300 2916356    oracle    666        1
    ------ Message Queues --------
    key        msqid      owner      perms      used-bytes   messages
    [oracle@PH1 oracle]$
    The 130Mo shared memory stands for the ASM instance, the 1 Go one stands for the Oracle instance, and I suspect the 2 Mo to be the LOG BUFFER one (not sure though).

    The recommended values for all system parameters are given in the Oracle install documentation corresponding to your OS. (eg for Linux x86-64 : Configuring Kernel Parameters on Linux x86-64)

    Note that these parameters should not be changed after install (except for SHMMAX if you change your RAM quantity) and are by no way "tuning parameters".

    HTH & Regards,

    ORA-000TK : No bind variable detected... Shared Pool Alert code 5 - Nuclear query ready .

Posting Permissions

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