Database Reference
In-Depth Information
Chapter 4
Memory Structures
In this chapter, we'll look at Oracle's three major memory structures:
System Global Area (SGA) : This is a large, shared memory segment that virtually all Oracle
processes will access at one point or another.
Process (or Program) Global Area (PGA) : This is memory that is private to a single process or
thread; it is not accessible from other processes/threads.
User Global Area (UGA) : This is memory associated with your session. It is located either in
the SGA or the PGA, depending whether you are connected to the database using a shared
server (it will be in the SGA), or a dedicated server (it will be in the PGA).
In earlier releases of Oracle, shared server was referred to as Multi-Threaded Server or MTS. In this topic, we
will always use the term shared server .
Note
When we discuss memory management in Oracle, we have five modes to investigate:
Automatic memory management (AMM) , for the SGA and PGA, available only in Oracle 11 g
and above, the DBA sets just one parameter—the MEMORY_TARGET parameter—to allow the
database to determine how to size all of the memory regions.
Automatic shared memory management (ASMM) , for the SGA, where the DBA sets a target
size for the SGA (via SGA_TARGET ).
Manual shared memory management , for the SGA, the DBA manually sizes individual
memory areas of the SGA (via DB_CACHE_SIZE , SHARED_POOL_SIZE , and so on).
Automatic PGA memory management , for the PGA, the DBA sets a target size for the PGA (via
PGA_AGGREGATE_TARGET ).
Manual PGA memory management , for the PGA, the DBA manually sizes individual
memory areas of the PGA (via SORT_AREA_SIZE , HASH_AREA_SIZE , and so on). Oracle strongly
recommends not using this method, but we will discuss it to provide a foundation for other
memory management concepts.
Looking at the prior bulleted list, which memory management method should you use? In an ideal environment,
everybody would be using automatic memory management, right? Just set one parameter ( MEMORY_TARGET ) and
you're done. However, in the real world it's not so black and white. Sometimes there are aspects of your environment
where you know best what the target sizes of memory should be, and therefore decide to use one of the less
automated memory management methods. This chapter's purpose is to help you become versed in all aspects of
Oracle memory so that you can make intelligent decisions regarding how to enable memory management.
 
 
Search WWH ::




Custom Search