Memory Allocation in Oracle

Posted on 2011-03-01
Medium Priority
Last Modified: 2013-11-11
My Oracle 11201 Logical datagurd (prd800d) database on IBM AIX plateform, initially had 16GB Memory and the Paging size was set to 20GB.
We had serious and frequent performance issues and consequently an additional 24GB of memory was added. We now have 40GB memory and the paging size is still at 20GB
Below is the out put from sho SGA command.
SQL> sho sga

Total System Global Area   1.2527E+10 bytes
Fixed Size                                2218400 bytes
Variable Size                     4798285408 bytes
Database Buffers              7717519360 bytes
Redo Buffers                           8704000 bytes

Below is the info from the init.ora file.
prd200l is the Primary Database
prd800d is the Logical Dataguard.

prd200l.__oracle_base='/a0221/oracle'#ORACLE_BASE set from environment
prd800d.__oracle_base='/a0223/oracle'#ORACLE_BASE set from environment

My question is what parameters should I modify so that Oracle can take full advantage of the additional memory. Will that adjustment require a database bounce??

Question by:KamalAgnihotri
  • 3
  • 2
  • 2

Assisted Solution

MarioAlcaide earned 332 total points
ID: 35006749
The following link will be very useful for you:


However in Oracle 11g you can use the new parameter MEMORY_TARGET
LVL 78

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 668 total points
ID: 35006820
In addition of the information above I would suggest the online docs.


The parameters you provided starting with an '_' are dynamic and should not be manually adjusted.

Starting with 11g, for Automatic Memory Management you only need two parameters:  MEMORY_MAX_TARGET and MEMORY_TARGET.  All other memory related values should be set to 0.

Author Comment

ID: 35008283
Hi Mario/Slight,

I read the two documents. They are good but, I can not apply any thing from those to my situation.
question is, with 40GB memory, how can I be sure that components like paging space, sga size, pga size etc are optimal. Below is the output of V$pgastat.
select name, value from v$pgastat;
NAME                                                VALUE
----------------------------------------       ----------------
aggregate PGA target parameter              2,080,374,784
aggregate PGA auto target                        1,505,581,056
global memory bound                                    208,035,840
total PGA inuse                                             407,623,680
total PGA allocated                                       740,851,712
maximum PGA allocated                            1,248,052,224
total freeable PGA memory                           294,256,640
process count                                                              53
max processes count                                                  57
PGA memory freed back to OS                2,464,022,528
total PGA used for auto workareas                            0
maximum PGA used for auto workareas    456,233,984
total PGA used for manual workareas                        0
maximum PGA used for manual workareas                 0
over allocation count                                                    0
bytes processed                                     7,814,804,480
extra bytes read/written                          2,638,743,552
cache hit percentage                                                 75
recompute count (total)                                        7,422

19 rows selected.


Kamal Agnihotri
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35009345
>>are optimal.

We cannot answer that for you.  There is no magic setting that works for everyone.  You need to look at the server, the database and the apps that use the database.

Tuning for a high throughput OLTP database is different from a DSS/Datawarehouse.

The rule is: Give Oracle as much of the available memory as possible where nothing swaps to disk.

The values form the views don't help much.  It's the spfile parameters and how you have it set up that drives everything.

As I said in the previous post:  if you unset all memory related parameters in the spfile and set the two mentioned, you're done.  Oracle will take care of the rest.

You then monitor performance and see if you need to override some of Oracle's management of memory.

Author Comment

ID: 35012691
I guess you are refering to MEMORY_MAX_TARGET and MEMORY_TARGET
So for a server that has 40GB memory, what should be allocated to MEMORY_MAX_TARGET  and how much to MEMORY_TARGET


Kamal Agnihotri

Expert Comment

ID: 35012747
Kamal: that depends on your server load, but in general you could reserve 35Gb to your MEMORY_MAX_TARGET, and 25 Gb to MEMORY_TARGET.

But that depends on what other process are running on your server etc.
LVL 78

Accepted Solution

slightwv (䄆 Netminder) earned 668 total points
ID: 35013161
>>So for a server that has 40GB memory, what should be allocated to MEMORY_MAX_TARGET  and how much to MEMORY_TARGET

Again, we cannot answer that.  If you have 1000 dedicated server connections in an OLTP system, the server processes will use a lot of memory.

3 dedicated server connections use a lot less.

You need to look at what is considered 'normal' for your system.  Look at memory usage.  If you have a lot free, give it to Oracle and monitor to ensure you don't swap to disk.

The 35G suggestion above might be OK.  I might go with 30G for MAX and 20 for Target but I don't know your system.  Those numbers could be WAY OFF.

Target can be changed dynamically if it is off.

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to recover a database from a user managed backup

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question