Oracle Database 11g new feature – Automatic Memory Management

Automatic Memory Management was a new feature introduced in 10g. With 10g release oracle has come up with anew parameter called sga_target which was used to automatically manage the memeory inside SGA.
The components which were managed by sga_target are db_cache_size, shared_pool_size, large_pool_size, java_pool_size and streams_pool_size

With 11g, Oracle went a step further to manage both SGA as well as PGA automatically. Oracle database 11g introduced 2 new parameters – memory_target and memory_max_target

The memory_target Parameter

The memory_target parameter is somewhat a combination of the sga_target parameter value and the pga_aggregate_target parameter, representing the total amount of memory that Oracle has to allocate between the various SGA and PGA structures. The memory_target parameter is dynamic and can be changed up to and including the value of memory_max_target, which we discuss next.

The memory_max_target Parameter

The memory_max_target parameter allows you to dynamically change the value of the parameter memory_target within the confines of memory_max_target. Thus you can adjust the total amount of memory available to the database as a whole at any time.

NOTE: The memory_target and memory_max_target parameters cannot be used when LOCK_SGA has been set. Also memory_target and memory_max_target cannot be used in conjunction with huge pages on Linux.

Following fig show the hierarchy of memory parameters and components that it tunes. This fig is taken from Robert Freeman book – Oracle database 11g: New features for Administrator.

Also below fig from same book show the effect of setting memroy_target, memroy_max_target and sga_target.

While setting these new parameters (memroy_target and max_memory_target), one has to be careful. A general advice would be to set sga_target and pga_aggregate_target to a minimum fixed value and set memrory_target. Oracle will automatically increase sga_target and pga_aggregate_target to the desired level.

If you are upgrading the existing 10g database to 11g and want to keep the current value of sga_target and pga_aggregate_target, than make sure you set the value of memroy_target >= (sga_target + pga_aggregate_target).

With new hirarchy in memeory management, Oracle has also introduced new memroy advisory. You can view V$MEMORY_TARGET_ADVICE view to get advice on the optimal value of memroy_target parameter. This view will show advisory data only after you set memory_target parameter.

Hope this helps !!

Advertisements

Checking Database Growth Trend

One of the simple way to find the growth of the database is using v$datafile view. following is the simple query and its output which gives the growth trend in month and year

</code>

SQL>select to_char(CREATION_TIME,'RRRR') year, to_char(CREATION_TIME,'MM') month, round(sum(bytes)/1024/1024/1024) GB
 2  from   v$datafile
 3  group by  to_char(CREATION_TIME,'RRRR'),   to_char(CREATION_TIME,'MM')
 4  order by   1, 2;

YEAR MO         GB
---- -- ----------
2004 10         14
2004 11         66
2004 12         47
2005 01         15
2005 02         14
2005 03         34
2005 04         14
2005 05         30
2005 06          5
2005 07          3
2005 08          9

YEAR MO         GB
---- -- ----------
2005 10          4
2005 12         20
2006 01         11
2006 02         15
2006 03         14
2006 04         16
2006 05         13
2006 06          0
2006 07          4
2006 08         17
2006 09          5

YEAR MO         GB
---- -- ----------
2006 10          6
2006 11          0
2006 12         30
2007 01          4
2007 02          4
2007 03          6
2007 04          6
2007 05         12
2007 06         15
2007 07         62
2007 08         29

YEAR MO         GB
---- -- ----------
2007 09         18
2007 11         20
2007 12          8
2008 03          8
2008 05          4
2008 08         11
2008 09         14
2008 10          4
2008 11         36
2008 12         49
2009 01          8

YEAR MO         GB
---- -- ----------
2009 02         38
2009 03         35
2009 04         54
2009 05         73
2009 08          1
2009 09         12
2009 10         78
2009 11        105
2009 12        113
2010 01        109
2010 02         79

YEAR MO         GB
---- -- ----------
2010 03         84
2010 05        243
2010 06        225
2010 07        244
2010 08        152
2010 09         40
2010 10        176
2010 11         76
2010 12        107

64 rows selected.

<code>

2010 in review

The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

Healthy blog!

The Blog-Health-o-Meter™ reads Wow.

Crunchy numbers

Featured image

The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 260,000 times in 2010. If it were an exhibit at The Louvre Museum, it would take 11 days for that many people to see it.

 

In 2010, there were 23 new posts, growing the total archive of this blog to 158 posts. There was 1 picture uploaded, taking a total of 45kb.

The busiest day of the year was November 15th with 1,174 views. The most popular post that day was Uploading excel sheet using Oracle Application Express (APEX).

Where did they come from?

The top referring sites in 2010 were forums.oracle.com, google.co.in, en.wordpress.com, google.com, and zimbio.com.

Some visitors came searching, mostly for ora-04091, fndcpass, ora-12705: cannot access nls data files or invalid environment specified, oracle 9i architecture diagram, and oracle architecture.

Attractions in 2010

These are the posts and pages that got the most views in 2010.

1

Uploading excel sheet using Oracle Application Express (APEX) May 2008
87 comments

2

Reducing datafile size to recover free space – Oracle Database 10g February 2008
14 comments

3

Setting up Oracle DataGuard for 10g June 2007
28 comments

4

Upgrading to Oracle Database 11g September 2007
23 comments

5

OPATCH Utility (Oracle RDBMS Patching) August 2008
13 comments

Categories Uncategorized