Oracle Notes---The SGA cache area

Source: Internet
Author: User

SGA (System global Area), a share of the shared memory area that is shared by some of the associated processes of Oracle, is allocated in memory. such as Dbwn,pmon.
The SGA is divided into the following components:
1. Cache area
2. Redo Log Buffers
3. Shared Pool
4. Large Pool
5.java Pool
6. Flow Pool
7. Fixed SGA

Cache area
The cache area is primarily used to cache blocks of data that are read from a data file. When the user requests the data, Oracle retrieves it from the cache area, and if the corresponding data block is retrieved, then Oracle reads the data directly from the buffer cache. If there is no hit, the Oracle read process reads the corresponding block of data from the data file and adds the corresponding block of data to the buffer. There are three states of unused, clean and dirty blocks in the corresponding blocks in the cache in Oracle. Unused means that the corresponding zone does not cache any data, and the clean State refers to the consistent state of the data and data files in the cache in the zone, and the dirty state specifies that the cached data has been modified and inconsistent with the data in the data file. The data blocks that Oracle reads from the data file are displaced in a cache area that is in a clean state and unused state.
Oracle synchronizes the dirty data in the cache area and the data in the cold end to the data file at a specific point in time. Oracle uses the LRU (least recently) principle to differentiate whether the block is in the cold junction or hot side. Conditions that trigger DBWN to synchronize data files:
1. When the area in the cache is in a clean state or unused state, it is below a certain threshold value.
2. A checkpoint needs to be advanced. Switch log as well as alter SYSTEM checkpoint command
3. Data table space is Readonly,offline
In the buffer, Oracle uses the principle of LRU to identify whether the block is in cold junction or hot end. Use the access-to-touch to record the number of accesses to this area's data to distinguish whether the data is cold junction or hot. The data block of the value in the buffer can be in a reserved state for the user to access again. The implementation of the reservation state is also implemented by an access trigger, which normally triggers an access logger every 3 seconds.
Cache Pool:
There can be multiple types of cache pools in the cache area, with only one cache pool by default, and the corresponding default data block size for the configuration parameter file is set to the Db_block_size parameter. If the size of the block set when creating the Tablespace is different from the parameter set by the Db_block_size, then the corresponding cache pool in the parameter file needs to be set. Configured by the parameter db_nk_cache_size, n corresponds to the size unit of the corresponding block is KB. In addition to the above several cache pools there are keep pools and circular pools.
The Keep pool uses long-term data in the buffer to keep it from being swapped out.
Loop pool cache data blocks that are not being used frequently

Oracle Notes---The SGA cache area

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.