RelationalDBDesign RelationalDBDesign 



OS Memory Usage   «Prev  Next»
Lesson 2Overview of Oracle RAM memory usage
ObjectiveExplain virtual memory.

Explain Virtual Memory

To best use available memory, you must be aware of at least three memory-related areas:
  1. The SGA
  2. Memory components on a server
  3. TNS connections

Memory and SGA

To properly manage RAM memory in the OS environment, you must tune numerous elements that make up the SGA, including the data pool, the shared pool, and the redo log buffer, as well other smaller memory components.
Roll your cursor over the following MouseOver to see pop-up explanations of the various parts of the SGA and their function in memory usage.

System Global
  1. The entire memory area comprising the library cache dictionary cache and other memory structures.
  2. The memory area used to process SQL and PL/SQL.
  3. The memory area used for managing data dictionary objects.
  4. The Oracle8 pool for managing large objects.
  5. The memory area responsible for locking (via semaphores) the serializable tasks.
  6. The fixed memory area for Oracle internal structures.
  7. The memory buffer used for redo log writing.
  8. The memory cache for data blocks.
  9. The memory for Oracle latches and enqueues.
  10. The memory area for all init.ora parameters.
  11. The memory used for all virtual circuit management.
  12. The memory area used for managing the extents of all sort operations.

Memory components on a server

There is a great deal of RAM memory allocated within Oracle. However, there are other memory components on a server. These include memory for the multi-threaded server (MTS) and for the user areas as determined by the sort_area_size. Some shops segregate memory usage by dedicating a server exclusively for the Oracle database.

TNS connections

Even with a dedicated server, you can still have TNS connections that consume memory. Each incoming dedicated TNS connection process will have memory allocated according to the size specified by the sort_area_size init.ora parameter. If you have hundreds of connections, this memory can become excessive and cause memory paging. Paging occurs when UNIX has more memory requests than physical RAM memory. In these cases, UNIX will swap memory onto a swap disk.
Note: If you experience excessive memory usage because of a large number of user connections, using the multi-threaded server (MTS) will greatly reduce this memory demand. The MTS uses dedicated dispatcher processes, thereby reducing the amount of memory required for each user connection. The next lesson looks at how virtual memory is managed in the OS environment.