Oracle Memory Structure

Source: Internet
Author: User
When the instance starts, the Oracle database allocates a memory area and starts background processes. The OLAP page pool is also stored in UGA. This pool manages OLAP data pages, which are associated with data blocks.

When the instance starts, the Oracle database allocates a memory area and starts background processes. The OLAP page pool is also stored in UGA. This pool manages OLAP data pages, which are associated with data blocks.

14. Oracle memory structure 14-1 Introduction to Oracle Memory Structure

When the instance starts, the Oracle database allocates a memory area and starts background processes. The memory area stores the following information:

14-1-1 Basic Memory Structure

The basic memory structure in Oracle databases includes:

  • System global zone (SGA)
  • SGA is a group of shared memory structures, also known as SGA components. It contains the data and control information of the Oracle database instance. SGA is shared by all services and background processes. The sample data is stored in the cache data block and the shared SQL area in SGA.

  • Program global zone (PGA)
  • A pga is an exclusive memory area. The Oracle process uses it to store data and control information in a proprietary manner. When the Oracle process starts, the PGA is created by the Oracle database.

  • User global zone (UGA)
  • UGA memory allocation is related to user sessions.

  • Software code area
  • Part of the memory in this area, which is used to store the code that is being executed or can be executed. The code of the Oracle database is stored. Of course, this is different from that of common user programs. They are placed in a more proprietary and protected place.

    4-1 describes the relationship between Memory Structures

    14-1-2 Oracle database memory management

    Memory Management includes maintaining the memory structure of Oracle instances to an optimal size for databases that change on demand. Oracle databases manage memory according to memory-related initialization parameters. Basic memory management operations include the following:

  • Automatic Memory Management
  • You can specify a target size for the instance memory. When SGA and PGA need to re-allocate memory as needed, the database instance will automatically adjust according to your target memory size.

  • Automatic shared memory management
  • This management mode is only partially automated. You can set a target size for the SGA and a total size for the PGA (or a single management PGA ).

  • Manual Memory Management
  • You can set initialization parameters to manage SGA and PGA respectively.

    If you use DBCA to create a database and select Basic installation, the default mode is automatic memory management.

    14-2 Overview of user global zones (UGA)

    UGA is the session memory, which is allocated for session variables. Session variables are the information required for login information and other database sessions. In essence, UGA stores the session status. 4-2 describes UGA.

    If a session loads a PL/SQL package to the memory, then the UGA contains the package status, which contains the variable values of all packages at a specific time. When a package's subroutine changes a variable, the package's status changes. By default, the package variables are unique and retained during the session lifecycle.

    The OLAP page pool is also stored in UGA. This pool manages OLAP data pages, which are equivalent to data blocks. A page pool is allocated when an OLAP session starts. When the session ends, the page pool is released. An OLAP session is automatically opened regardless of whether the user queries a multi-dimensional object.

    In a database session, UGA must be available. For this reason, when a shared service connection is used, UGA cannot be stored in PGA because PGA is a specified single process. Therefore, when a shared service connection is used, UGA is stored in SGA so that any shared service process can access it. When a private service connection is used, UGA is stored in PGA.

    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.