A test to understand what is primary and secondary LRU (Oracle Cuug)

Source: Internet
Author: User

LRU is an important linked list in buffer cache, its function I no longer detailed, already has a lot of relevant information. This is mainly discussed with you the main LRU, auxiliary LRU role.

Let's look at a test first.

Step 1: Environment introduction

Let's look at the size of the buffer cache:

Sql> Show SGA

Total System Global area 1073741824 bytes

Fixed Size 1284344 bytes

Variable Size 960497416 bytes

Database buffers 104857600 bytes

Redo buffers 7102464 bytes

Buffer Cache Size 100M.

Take a look at the test table size:

Sql> Set Linesize 1000

Sql> Col segment_name for A30

Sql> sql> Select segment_name,bytes/1024/1024 from dba_segments where segment_name= ' a3_70m ';

Segment_name bytes/1024/1024

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

a3_70m 80

Sql> sql> Select segment_name,bytes/1024/1024 from dba_segments where segment_name= ' a4_70m ';

Segment_name bytes/1024/1024

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

a4_70m 80

Two test tables, a3_70m, a4_70m, each size 80M. Originally wanted to build their two size to 70M, so the name with the suffix _70m, but built a little bit, however, this has no

That will not affect our test results.

Step 2: Refresh buffer cache pool, observe the length of LRU chain

Sql> alter system flush Buffer_cache;

Sql> Select Cnum_set,cnum_repl,anum_repl,cnum_write, anum_write from X$kcbwds;

Cnum_set Cnum_repl Anum_repl cnum_write anum_write

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

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

6238 6238 6219 0 0

6237 6237 6224 0 0

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

Cnum_set Cnum_repl Anum_repl cnum_write anum_write

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

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

0 0 0 0 0

Rows selected.

This view returns 16 rows, but only two rows have data. The other lines are 0, what's the reason?

Check the select name from V$latch_children where name = ' Cache buffers LRU chain '; You know, I have a total of 16 cache buffers LRU

Chain Latch, but only two were used.

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.