Home » RDBMS Server » Performance Tuning » SGA "usage"
SGA "usage" [message #457868] Wed, 26 May 2010 04:21 Go to next message
firefly
Messages: 53
Registered: March 2009
Location: Europe
Member
If I have my SGA MAX & TARGET to e.g 10G set how can I tell the amount of SGA actually being used? My understanding is that the 10G will be reserved by the O/S, but how do I know how much of it is being used?
Re: SGA "usage" [message #457881 is a reply to message #457868] Wed, 26 May 2010 04:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
select * from V$SGAINFO;
select * from V$SGA_DYNAMIC_COMPONENTS;

Regards
Michel
Re: SGA "usage" [message #457885 is a reply to message #457881] Wed, 26 May 2010 04:52 Go to previous messageGo to next message
firefly
Messages: 53
Registered: March 2009
Location: Europe
Member
Thanks for that..I can scehdule a job to run this every few mins during or our nightly load but is there any way to view this info for last night? I have Grid Control with the Perf mgt pack..?

Re: SGA "usage" [message #457887 is a reply to message #457885] Wed, 26 May 2010 04:55 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
SQL> select view_name from dba_views where view_name like 'DBA_HIST_SGA%';
VIEW_NAME
------------------------------
DBA_HIST_SGA
DBA_HIST_SGASTAT
DBA_HIST_SGA_TARGET_ADVICE

Try to investigate the other views in this way.

Regards
Michel
Re: SGA "usage" [message #457901 is a reply to message #457887] Wed, 26 May 2010 05:46 Go to previous messageGo to next message
firefly
Messages: 53
Registered: March 2009
Location: Europe
Member
Thanks for that but am a little confused:

My SGA MAX & TARGET is actually set to 24G

When I run SELECT sum(value/1024/1024/1024) FROM DBA_HIST_SGA where snap_id=17583 (for my snapshot) I also get 24G. Does this mean that all of my SGA was being utilised?

When I run select sum(bytes/1024/1024/1024) from DBA_HIST_SGASTAT where snap_id=17583 (for the same snapshot) I only get 16GB. Can you hepl explain this?

Finally, when I run select sum(bytes/1024/1024/1024) from V$SGASTAT right now I get 31G even though as mentioned my sga max & target is only 24G.

Can you pls shed some light?

Thanks
Re: SGA "usage" [message #457912 is a reply to message #457901] Wed, 26 May 2010 06:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
1/ The view also contains "free memory" statistics
2/ Some parts are not included in this view
3/ There are inconsistencies in these views, this is well-known, you should search on Google

Regards
Michel
Re: SGA "usage" [message #457913 is a reply to message #457912] Wed, 26 May 2010 06:52 Go to previous messageGo to next message
firefly
Messages: 53
Registered: March 2009
Location: Europe
Member
Hi Michel,

SELECT name, value/1024/1024/1024 FROM DBA_HIST_SGA where snap_id=17583

which ones are "free memory" stats?


NAME VALUE/1024/1024/1024
---------------------------------------------------------------- --------------------
Database Buffers 14.765625
Fixed Size .001958385
Redo Buffers .013664246
Variable Size 9.21875237
Re: SGA "usage" [message #457915 is a reply to message #457913] Wed, 26 May 2010 06:55 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
It is included in variable size.

Regards
Michel
Re: SGA "usage" [message #460791 is a reply to message #457915] Mon, 14 June 2010 17:17 Go to previous message
mikerault
Messages: 21
Registered: June 2010
Location: Alpharetta, Ga
Junior Member
The shared pool, large pool and streams pool will all have free memory components. As an aside, you should not have sga_target and sga_max_size set equal to each other. Oracle will allocate all memory configured in sga_target and then Oracle ends up robbing other components when memory is needed. It is considered a good practice to set floor values for your major components (see the list above) and then allow the sga_target to calculate and set the sga_max_size to some percentage above that, I usually use 25%. This also applies in Oracle11g with the memory_target and memory_max_size settings with the exception that you must also include the pga_aggregate_target setting. If you look at the v$sga_resize_ops view and see all actions are DEFERRED then this is probably an indication you are thrashing memory.

Mike
Previous Topic: Alternative to REPLACE function?
Next Topic: Avoiding bind variable from a sql in java code
Goto Forum:
  


Current Time: Fri Nov 22 07:02:46 CST 2024