In-depth analysis of Oracle memory
2014-08-28 13:52
501 查看
1. The structure of Oracle memory
.PGA (Process Global Area)
SGA (System Global Area)
2. Database buffer cache
Organization of the Database Buffer CacheThe write list : holds dirty buffers, which contain data that has been modified but has not yet been written to disk
The least recently used(LRU) list : holds free buffers, pinned buffers, and dirty buffers that have not yet been moved to the write list.
When an Oracle Database process accesses a buffer, the process moves the buffer to the most recently used (MRU) end of the LRU list.
MRU end ---> LRU list <--- LUR end
The first time an Oracle Database user process requires a particular piece of data, it searches for the data in the database buffer cache.
---- If the process finds the data already in the cache (a cache hit), it can read the data directly from memory.
---- If the process cannot find the data in the cache (a cache miss), it must copy the data block from a datafile on disk into a buffer in the cache.
Before reading a data block into the cache, the process searched the LRU list, starting at the LRU end of the list. The process searches either until it finds a free buffer or until it has searched the threshold limit of buffers.
---- If the user process finds a dirty buffer, it moves the buffer to the write list and continues to search. When the process finds a free buffer, it reads the data block from disk into the buffer and moves the buffer to the MRU end.
---- If the user process searches the threshold limit, the process stops searching the LRU list and signals DBW process to write some of the dirty buffers to disk.
Touch Count
Each buffer has an associated touch count, which might be increased if a buffer is accessed.
Buffers with a high touch count should stay in the buffer cache, while buffers with a low touch count should age out in order to make room for other buffers.
The LRU Algorithm and Full Table Scans
When the user process is performing a full table scan, it reads the blocks of the table into buffers and puts them on the LRU end (instead of the MRU end). This is because a fully scanned table usually is needed only briefly, so the blocks should
be moved out quickly to leave more frequently used blocks in the cache.
3. Different pools in the buffer cache
Keep poolRecycle pool
Default pool
x$kcbwbpd
相关文章推荐
- Sequence of shopping carts in-depth analysis with R(1)
- An in depth analysis of ASProtect 2.22 by zyzygy
- The first in-depth technical analysis of VP8
- Sequence of shopping carts in-depth analysis with R(2) – Clustering
- Sequence of shopping carts in-depth analysis with R(3)– Sequence of events
- Oracle 10.2 流复制问题(四)—— ORA-01341: LOGMINER OUT-OF-MEMORY in Oracle Streams
- [转] Lateral SQL Injection:A New Class of Vulnerability in Oracle
- Some Samples Of Oracle Function In Order To Relax Java Program.
- Do you know the sizes of these things in real memory?
- Memory space manipulating in Java(Section three:Basic Knowledge of Java Process Heap )
- (Reprint)Simulating the sequence of Oracle in Sql Server by leveraging the identity
- Response-Time Analysis Made Easy in Oracle Database 10g 数据库反应时间测定方法
- shining cento in book reading: handle out of memory problem for new operator -by register a global SetNewHandler
- Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
- Oracle错误:ORA-27121: unable to determine size of shared memory segment
- Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
- Eclipse 报 “Exception in thread "main" java.lang.OutOfMemoryError: Java heap space ”错误的解决办法
- 深入研究 STL Deque 容器-An In-Depth Study of the STL Deque Container (By Nitron)
- javax.management.MalformedObjectNameException: Invalid character '' in value part of property ,Oracle 驱动包的错误
- Mac OS X:Analysis of the Use of the Boot Server Discovery Protocol in NetBoot