9 Replies Latest reply: Jul 28, 2011 9:14 AM by Yann Allandit RSS

    Oracle 11g shmmax and shmal values

    Viktor
      Hi,

      we have successfully upgraded our Oracle Database from 10.2.0.4 to 11.2.0.2.
      We also tried to adjust the shmall and shmmax values.
      But after the adjustment the Oracle Database didn't start anymore with the error: ORA-27102: out of memory

      After a research in google we find some formulas how to calculate the values but they are all different so we don't know which we should use.
      Maybe some of you can explain us how to calculate the values.

      Our configuration is:

      OS: Red Hat 5.6
      Memory: 16GB
      Swap: 12GB

      SGA settings:
      Total System Global Area 1.0656E+10 bytes
      Fixed Size 2235856 bytes
      Variable Size 2415919664 bytes
      Database Buffers 8220835840 bytes
      Redo Buffers 17076224 bytes


      The current shmall and shmmax values:
      # Controls the maximum shared segment size, in bytes
      kernel.shmmax = 68719476736

      # Controls the maximum number of shared memory segments, in pages
      kernel.shmall = 4294967296


      The formulas we found are:

      1. shmall = RAM / PAGE_SIZE
      shmmax = 1/2 RAM but not more than 4GB

      2. shmall = shmmax / PAGE_SIZE
      shmmax = 1/2 RAM but not more than 4GB

      3. shmall = sum of sizes of all SGAs on the server / PAGE_SIZE
      shmmax = largest single SGA on server
        • 1. Re: Oracle 11g shmmax and shmal values
          sb92075
          user13091776 wrote:
          Hi,

          we have successfully upgraded our Oracle Database from 10.2.0.4 to 11.2.0.2.
          We also tried to adjust the shmall and shmmax values.
          But after the adjustment the Oracle Database didn't start anymore with the error: ORA-27102: out of memory

          After a research in google we find some formulas how to calculate the values but they are all different so we don't know which we should use.
          Maybe some of you can explain us how to calculate the values.

          Our configuration is:

          OS: Red Hat 5.6
          Memory: 16GB
          Swap: 12GB

          SGA settings:
          Total System Global Area 1.0656E+10 bytes
          Fixed Size 2235856 bytes
          Variable Size 2415919664 bytes
          Database Buffers 8220835840 bytes
          Redo Buffers 17076224 bytes


          The current shmall and shmmax values:
          # Controls the maximum shared segment size, in bytes
          kernel.shmmax = 68719476736

          # Controls the maximum number of shared memory segments, in pages
          kernel.shmall = 4294967296


          The formulas we found are:

          1. shmall = RAM / PAGE_SIZE
          shmmax = 1/2 RAM but not more than 4GB

          2. shmall = shmmax / PAGE_SIZE
          shmmax = 1/2 RAM but not more than 4GB

          3. shmall = sum of sizes of all SGAs on the server / PAGE_SIZE
          shmmax = largest single SGA on server
          are any other Oracle DBs up & running now on this system?
          If so post results from SHOW SGA from every one
          • 2. Re: Oracle 11g shmmax and shmal values
            Viktor
            Hi,

            there are no other databases on the server.

            Maybe we have to add that we changed the values to:
            --> shmmax = 12884901888
            --> shmall = 3145728

            But after the change the database didn't start anymore with the error: ORA-27102: out of memory
            So we reverted the entries to the old value which are

            --> shmmax = 68719476736
            --> shmall = 4294967296
            • 3. Re: Oracle 11g shmmax and shmal values
              sb92075
              user13091776 wrote:
              Hi,

              there are no other databases on the server.

              Maybe we have to add that we changed the values to:
              --> shmmax = 12884901888
              --> shmall = 3145728

              But after the change the database didn't start anymore with the error: ORA-27102: out of memory
              So we reverted the entries to the old value which are

              --> shmmax = 68719476736
              --> shmall = 4294967296
              use what works.
              • 4. Re: Oracle 11g shmmax and shmal values
                PavanG
                The recommended values are below.

                kernel.shmall = physical RAM size / pagesize For most systems, this will be the value 2097152. See Note 301830.1 for more information.
                kernel.shmmax = 1/2 of physical RAM, but not greater than 4GB. This would be the value 2147483648 for a system with 4Gb of physical RAM.
                • 5. Re: Oracle 11g shmmax and shmal values
                  876087
                  Is this 4GB limitation of kernel.shmmax only for 32 Bit systems or also for 64 Bit?
                  • 6. Re: Oracle 11g shmmax and shmal values
                    blockdump
                    Hi,

                    are you using any of these database parameters lock_sga , memory_max_target, memory_target ?

                    regards
                    guenter
                    • 7. Re: Oracle 11g shmmax and shmal values
                      Viktor
                      Hi,

                      we don't use any of this parameters.

                      regards

                      Viktor
                      • 8. Re: Oracle 11g shmmax and shmal values
                        sb92075
                        Viktor wrote:
                        Hi,

                        we don't use any of this parameters.

                        regards

                        Viktor
                        why do you refuse to use values that do not throw error & actually work?
                        • 9. Re: Oracle 11g shmmax and shmal values
                          Yann Allandit
                          The "kernel.shmmax = 1/2 of physical RAM, but not greater than 4GB. This would be the value 2147483648 for a system with 4Gb of physical RAM" is not valid for 64 bits system (even if it appears in Oracle recommendation).
                          Look at the tpc benchmark results and you will see much bigger values.

                          A basic rule of thumbs is 0.8 of the RAM (and a shmall set accordingly).
                          FY shmall is define in number of block size (4K on Linux)