Oracle learning-in-depth analysis of Buffer Cache

Source: Internet
Author: User

Oracle learning-in-depth analysis of Buffer Cache

Oracle learning-in-depth analysis of Buffer Cache

Server process and database buffer cache:

When the server needs a block, it needs to read the block in series steps:

1. First, the server uses the hash function to check whether the required block can be obtained from the buffer cache. If a buffer is found, move it to the other end of the LRU list far away from the end of the LRU. This is logical reading because no actual I/O occurs. If no buffer is found in the buffer cache, the Server process (Server) must read the data file.


2. Before reading data files, the server process searches for the LRU list to obtain the idle buffer zone. All the buffers modified by the server process are placed in the checkpoint queue. To write data to the disk during the checkpoint.

3. If the checkpoint size exceeds the threshold, the server sends a signal to notify DBWn to refresh the dirty data buffer in the cache. If the server cannot find the idle buffer within the search threshold, it will send a signal to notify DBWn to refresh.

4. After the idle buffer zone is found, the server reads the block from the data file to the idle buffer zone in the cache of the database buffer zone. The Oracle server process moves the buffer to the position far from the end of the LRU list.

5. If the block reading is inconsistent, the server will reconstruct the earlier version of the block from the current block and rollback segment.

How Does Oracle force refresh Buffer Cache?

Difference between Buffer cache and page cache

Performance of Buffer cache in Linux

Oracle buffer cache Research

Oracle Buffer Cache optimization ideas and

DBWn process and database buffer cache:

DBWn writes dirty data blocks to data files to ensure that the server has idle blocks and manages the buffer cache. DBWn responds to different events in the instance:

1. Checkpoint Queue Exceeds Threshold: if the server process finds that the size of the Checkpoint Queue Exceeds its Threshold, it will send a signal to notify DBWn to refresh. DBWn writes all the buffers in the checkpoint queue.

When the checkpoint queue is 25% full, DBWn write operations are triggered:

SQL> desc x $ kvit

Name Null? Type

-----------------------------------------------------------------------------

Addr raw (8)

INDX NUMBER

INST_ID NUMBER

KVITVAL NUMBER

KVITTAG VARCHAR2 (64)

KVITDSC VARCHAR2 (64)

SQL> col KVITTAG for a20

SQL> col KVITDSC for a50

SQL> set linesize 120

SQL> select KVITTAG, KVITVAL, KVITDSC, INST_ID from x $ kvit where KVITTAG = 'kcbldq ';

Kvittag kvitval kvitdsc INST_ID

--------------------------------------------------------------------------------------

Kcbldq 25 large dirty queue if kcbclw reaches this 1

 

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page

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.