7 Replies Latest reply: Apr 21, 2013 12:27 AM by user62721 RSS

    SGA granule size

    Roger25
      If SGA_MAX_SIZE <= 128 mb, granule size will be 4 mb
      If SGA_MAX_SIZE > 128 mb, granule size will be 16 mb
      My SGA size is 360M
       
      SQL> show parameter SGA_MAX_SIZE
       
      NAME                                 TYPE        VALUE
      ------------------------------------ ----------- ------------------------------
      sga_max_size                         big integer 360M
       
      SQL> 
      Then why the size of a granule is 4MB?
      SQL> SELECT COMPONENT, GRANULE_SIZE/(1024*1024) "GRANULE_SIZE(Mb)" FROM V$SGA_DYNAMIC_COMPONENTS;
       
      COMPONENT                                                        GRANULE_SIZE(Mb)
      ---------------------------------------------------------------- ----------------
      shared pool                                                                     4
      large pool                                                                      4
      java pool                                                                       4
      streams pool                                                                    4
      DEFAULT buffer cache                                                            4
      KEEP buffer cache                                                               4
      RECYCLE buffer cache                                                            4
      DEFAULT 2K buffer cache                                                         4
      DEFAULT 4K buffer cache                                                         4
      DEFAULT 8K buffer cache                                                         4
      DEFAULT 16K buffer cache                                                        4
      DEFAULT 32K buffer cache                                                        4
      Shared IO Pool                                                                  4
      ASM Buffer Cache                                                                4
       
      14 rows selected
       
      SQL> 
      Shouldn't have been 16?...
        • 1. Re: SGA granule size
          Aman....
          Roger25 wrote:
          If SGA_MAX_SIZE <= 128 mb, granule size will be 4 mb
          If SGA_MAX_SIZE > 128 mb, granule size will be 16 mb
          My SGA size is 360M
          SQL> show parameter SGA_MAX_SIZE
          
          NAME                                 TYPE        VALUE
          ------------------------------------ ----------- ------------------------------
          sga_max_size                         big integer 360M
          What's your db version? For 11g, till 1gb of the SGA, it would be 4mb only.
          http://docs.oracle.com/cd/E11882_01/server.112/e25494/memory004.htm#ADMIN11205

          Aman....
          Then why the size of a granule is 4MB?
          SQL> SELECT COMPONENT, GRANULE_SIZE/(1024*1024) "GRANULE_SIZE(Mb)" FROM V$SGA_DYNAMIC_COMPONENTS;

          COMPONENT GRANULE_SIZE(Mb)
          ---------------------------------------------------------------- ----------------
          shared pool 4
          large pool 4
          java pool 4
          streams pool 4
          DEFAULT buffer cache 4
          KEEP buffer cache 4
          RECYCLE buffer cache 4
          DEFAULT 2K buffer cache 4
          DEFAULT 4K buffer cache 4
          DEFAULT 8K buffer cache 4
          DEFAULT 16K buffer cache 4
          DEFAULT 32K buffer cache 4
          Shared IO Pool 4
          ASM Buffer Cache 4

          14 rows selected

          SQL>
          Shouldn't have been 16?...
          What's the db version? For 11g, it would be 4mb till 1gb of the SGA.

          http://docs.oracle.com/cd/E11882_01/server.112/e25494/memory004.htm#ADMIN11205

          Aman....
          • 2. Re: SGA granule size
            Roger25
            11.2.0.3
            Thanks.
            • 3. Re: SGA granule size
              user62721
              Hi,

              your doc. is for 9i
              for 10g and forward
              If SGA_MAX_SIZE <= 1GB, granule size will be 4 mb
              If SGA_MAX_SIZE > 1GB, granule size will be 16 mb
              HTH
              • 4. Re: SGA granule size
                JohnWatson
                user12045475 wrote:
                Hi,

                your doc. is for 9i
                for 10g and forward
                If SGA_MAX_SIZE <= 1GB, granule size will be 4 mb
                If SGA_MAX_SIZE > 1GB, granule size will be 16 mb
                HTH
                This is not correct. You need to test for your release and platform.
                orcl> SELECT COMPONENT, GRANULE_SIZE/(1024*1024) "GRANULE_SIZE(Mb)" FROM V$SGA_DYNAMIC_COMPONENTS;
                
                COMPONENT                                                        GRANULE_SIZE(Mb)
                ---------------------------------------------------------------- ----------------
                shared pool                                                                     8
                large pool                                                                      8
                java pool                                                                       8
                streams pool                                                                    8
                DEFAULT buffer cache                                                            8
                KEEP buffer cache                                                               8
                RECYCLE buffer cache                                                            8
                DEFAULT 2K buffer cache                                                         8
                DEFAULT 4K buffer cache                                                         8
                DEFAULT 8K buffer cache                                                         8
                DEFAULT 16K buffer cache                                                        8
                DEFAULT 32K buffer cache                                                        8
                Shared IO Pool                                                                  8
                ASM Buffer Cache                                                                8
                
                14 rows selected.
                
                orcl> sho parameter sga_max_size
                
                NAME                                 TYPE        VALUE
                ------------------------------------ ----------- ------------------------------
                sga_max_size                         big integer 1104M
                orcl> select * from v$version;
                
                BANNER
                --------------------------------------------------------------------------------
                Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
                PL/SQL Release 11.2.0.3.0 - Production
                CORE    11.2.0.3.0      Production
                TNS for 32-bit Windows: Version 11.2.0.3.0 - Production
                NLSRTL Version 11.2.0.3.0 - Production
                
                orcl>
                • 5. Re: SGA granule size
                  user62721
                  Ok thanks from what SGA size we get 16MB ?
                  • 6. Re: SGA granule size
                    Roger25
                    From 1GB, as you said above

                    If SGA_MAX_SIZE > 1GB, granule size will be 16 mb

                    However, the doc says:

                    Granule size is determined by total SGA size. On most platforms, the size of a granule is 4 MB if the total SGA size is less than 1 GB, and granule size is 16MB for larger SGAs. Some platform dependencies arise. For example, on 32-bit Windows, the granule size is 8 M for SGAs larger than 1 GB.
                    • 7. Re: SGA granule size
                      user62721
                      8MB is only for WIN32, ok thanks