SGA_TARGET & SGA_MAX_SIZE not equal [message #561847] |
Wed, 25 July 2012 13:11 |
|
BeefStu
Messages: 208 Registered: October 2011
|
Senior Member |
|
|
I have the following setup
SQL> show parameter sga;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 3G
sga_target big integer 2G
from what I read I beleive this will initially grab 2GB of memory on startup and will grab up to to 3GB of memory total for the SGA. The "total" memory can be allocated to different peices of the SGA when needed but will never exceed 3GB.
Is this correct or would these settngs infringe on any available memory on a system that is already tight on memory?
Secondly, what happens if both these values are set to the same value?
Thanks to all who answer
|
|
|
|
|
Re: SGA_TARGET & SGA_MAX_SIZE not equal [message #561851 is a reply to message #561847] |
Wed, 25 July 2012 13:30 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
The behaviour is very much platform specific, with many variations. I think that some platforms take the max_size, and swap out anything not used, for instance. It doesn't work at all with Linux if you have huge pages configured. With Solaris, you have to configure your project to use dynamic intimate shared memory.
I would love to see a conprehensive description of the behaviour on different platforms. If anyone wants to contribute detail, we can write it up, take the paper to Open World, and be famous.
--
Update:
Oh no! I didn't read the question properly! The above is relevant to 11g memory_target only.
I'm looking for an emoticon for "want to dig a hole and bury myself before getting flamed"
My only consolation is that the Black Swan made the same mistake.
[Updated on: Wed, 25 July 2012 13:46] Report message to a moderator
|
|
|
|
Re: SGA_TARGET & SGA_MAX_SIZE not equal [message #561853 is a reply to message #561852] |
Wed, 25 July 2012 14:04 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
There is no benefit I can see as on most platforms max size is allocated at instance startup even if you don't use the difference with target.
On some latest os versions, Oracle is able to allocate only the target as the os allows it to allocate more afterwards but this was not the case on any os when 10g(R2) was released.
Regards
Michel
[Updated on: Wed, 25 July 2012 14:05] Report message to a moderator
|
|
|
Re: SGA_TARGET & SGA_MAX_SIZE not equal [message #561854 is a reply to message #561852] |
Wed, 25 July 2012 14:05 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
The whole point is that you set them to different values. Set the target to what you think you need, and the max to a higher value so that you can raise the target later if necessary. The target is a dynamic parameter, the max is static.
|
|
|
|
|