Re: ASMM question

From: Ind-dba <oraclearora_at_googlemail.com>
Date: Tue, 8 Apr 2008 05:55:46 -0700 (PDT)
Message-ID: <41c9ee79-b500-400e-91e7-058a2a689f3c@s39g2000prd.googlegroups.com>


On Apr 7, 10:15 pm, joel garry <joel-ga..._at_home.com> wrote:
> On Apr 5, 12:58 am, Ind-dba <oraclear..._at_googlemail.com> wrote:
>
>
>
> > On Apr 4, 2:59 am, Chuck <skilover_nos..._at_bluebottle.com> wrote:
>
> > > Mark D Powell wrote:
> > > > On Apr 2, 11:58 am, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:
> > > >> On Apr 2, 10:56 am, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:
>
> > > >>> On Apr 2, 10:49 am, Chuck <skilover_nos..._at_bluebottle.com> wrote:
> > > >>>> sga_target_size = 4g
> > > >>>> sga_max_size = 6g
> > > >>>> When the instance starts, how much memory will it try to allocate? 6g or
> > > >>>> 4g?
> > > >>>> If I run "show sga" on the instance it says total sga size is 6g. If I
> > > >>>> run "ipcs -ma" on the o/s (solaris 10) it shows the shared memory
> > > >>>> segment as being only 4g.
> > > >>>> I'm a little confused as to what's really being allocated as there seems
> > > >>>> to be some contradiction here.
> > > >>>> TIA.
> > > >>> ipcs reports what is actually allocated, which is the
> > > >>> sga_target_size. sga_max_size is your 'wiggle room' for dynamic
> > > >>> adjustments.
> > > >>> David Fitzjarrell
> > > >> To add to my last post, show sga reports the maximum size the SGA can
> > > >> attain, not the actual sga allocation. I expect that if you look at v
> > > >> $sgastat you'll find it agrees with the sga_target_size setting, not
> > > >> with the sga_max_size value.
>
> > > >> David Fitzjarrell- Hide quoted text -
>
> > > >> - Show quoted text -
>
> > > > Be advised that this feature is platform dependend and on some
> > > > platforms the full amount of shared memory still has to be acquired on
> > > > startup. On these platforms the sga_target should = the sga_max.
>
> > > > Check your platform specific documentation.
>
> > > > HTH -- Mark D Powell --
>
> > > Thanks all- Hide quoted text -
>
> > > - Show quoted text -
>
> > At the time of startup, "always" memory equal to sga_max_size (nearly)
> > is acquired. I believe, its not platform dependent.The only platform
> > dependency is size of one shared memory segment. On all platforms,
> > oracle doesnt transact with OS for memory after startup. It can only
> > exchange memory between different caches.. But it can never allocate
> > say 4g based on sga_target and expany to 8g (based on sga_max_size).
> > That is why sga_max_size is fixed parameter and sga_target is dynamic.
>
> > Oracle documentation: The maximum amount of memory usable by the
> > instance is determined at instance startup by the initialization
> > parameter SGA_MAX_SIZE.
>
> > Proof:
>
> Er, saying you believe something across platforms and then showing the
> proof on one platform is kind of silly. Some platforms handle shared
> memory quite differently.
>
> I haven't been following the details for recent versions, but in the
> past Mark was certainly correct, mostly an issue on 32 bit OS's. You
> can poke about on metalink and see old notes about windowing on hp-ux,
> changing sgabeg on solaris, pre_page_sga, tech explanation of
> semaphores and shared memory and how some platforms use them
> differently. Note:341782.1 for linux, you can't say there is only one
> answer there. Note:470742.1 for example, shows a difference with
> dispatchers.
>
> I would recommend reading the tech explanations to anyone not familiar
> with that stuff (Note:153961.1, Note:15566.1 etc.). The
> granularization is explained in Note:148495.1.
>
>
>
> > bash-3.00$ uname -a
> > SunOS oracle-edu 5.10 Generic_125101-02 i86pc i386 i86pc
> > SQL> sho sga
>
> > Total System Global Area 922746880 bytes
> > Fixed Size 2271688 bytes
> > Variable Size 375621176 bytes
> > Database Buffers 490733568 bytes
> > Redo Buffers 54120448 bytes
>
> > bash-3.00$ ipcs -ma
> > IPC status from <running system> as of Sat Apr 5 00:52:16 PDT 2008
> > T ID KEY MODE OWNER GROUP CREATOR
> > CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
> > Shared Memory:
> > m 1912602676 0x5c6c2c28 --rw-r----- oracle dba oracle
> > dba 26 12288 3498 13703 0:51:47 0:51:47 2:24:56
> > m 1912602675 0 --rw-r----- oracle dba oracle
> > dba 26 142606336 3498 13703 0:51:47 0:51:30 2:24:56
> > m 1912602674 0 --rw-r----- oracle dba oracle
> > dba 26 192937984 3498 13703 0:51:47 0:51:30 2:24:56
> > m 1912602673 0 --rw-r----- oracle dba oracle
> > dba 26 138412032 3498 13703 0:51:47 0:51:30 2:24:56
> > m 637534256 0 --rw-r----- oracle dba oracle
> > dba 26 138412032 3498 13703 0:51:47 0:51:30 2:24:55
> > m 637534255 0 --rw-r----- oracle dba oracle
> > dba 26 310378496 3498 13703 0:51:47 0:51:30 2:24:55
>
> > add: 142606336 + 192937984 + 138412032+138412032+310378496 =
> > 922746880 (which is = sga_max_size sga_max_size = 880M).
>
> > You can test this by extending or shrinking sga_targert and checking
> > the size of shared memory segments using ipcs. I believe, it wont
> > change.
>
> jg
> --
> @home.com is bogus.http://www.darkreading.com/document.asp?doc_id=150292&WT.svl=news1_1

Er, saying you believe something across platforms and then showing the proof on one platform is kind of silly. Some platforms handle shared memory quite differently.
[Sachin]: The idea to show example was the gentleman who initiated this thread expressed his concern on solaris 10 and fortunately i have solaris 10 in my environment. So I gave this illustration on solaris 10. I agree with you on saying some platform handle shared memory differenty. But I never said against that. What I wanted to say is - under no circumstance, Oracle (not sure abt 11g) will transact (release old or allocate new) shared memory after startup of the database.

I haven't been following the details for recent versions, but in the past Mark was certainly correct, mostly an issue on 32 bit OS's.

[Sachin]: That is the restriction of 32 bit OS to allocate more memory thnn 2^32 bytes of memory. And since sgabeg (memory address of begining of SGA in oracle) is fixed and can be manuplated with, there is a restriction on size of SGA on 32 bit OS. But using some tricks, we can increase the amount of memory that can be used as SGA. But this has nothing to do with this gentleman's question. After Startup, Oracle cannot take up or release any memory.

  You can poke about on metalink and see old notes about windowing on hp-ux,
changing sgabeg on solaris, pre_page_sga, tech explanation of semaphores and shared memory and how some platforms use them differently. Note:341782.1 for linux, you can't say there is only one answer there. Note:470742.1 for example, shows a difference with dispatchers.

[Sachin]: These are good notes and i also recommend others to read.

I would recommend reading the tech explanations to anyone not familiar with that stuff (Note:153961.1, Note:15566.1 etc.). The granularization is explained in Note:148495.1. [Sachin]: These also are good notes and I also recommend users to read (if they have not read them in past) Received on Tue Apr 08 2008 - 07:55:46 CDT

Original text of this message