drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
buf_pool_struct Struct Reference

The buffer pool structure. More...

#include <buf0buf.h>

Collaboration diagram for buf_pool_struct:
[legend]

Public Attributes

General fields
mutex_t mutex
mutex_t zip_mutex
ulint instance_no
ulint old_pool_size
ulint curr_pool_size
ulint LRU_old_ratio
ulint n_chunks
buf_chunk_t * chunks
ulint curr_size
hash_table_t * page_hash
hash_table_t * zip_hash
ulint n_pend_reads
ulint n_pend_unzip
time_t last_printout_time
buf_buddy_stat_t buddy_stat [BUF_BUDDY_SIZES_MAX+1]
buf_pool_stat_t stat
buf_pool_stat_t old_stat

Page flushing algorithm fields

mutex_t flush_list_mutex
ibool init_flush [BUF_FLUSH_N_TYPES]
ulint n_flush [BUF_FLUSH_N_TYPES]
os_event_t no_flush [BUF_FLUSH_N_TYPES]
ib_rbt_t * flush_rbt
ulint freed_page_clock
ulint LRU_flush_ended
 UT_LIST_BASE_NODE_T (buf_page_t) flush_list

LRU replacement algorithm fields

buf_page_t * LRU_old
ulint LRU_old_len
 UT_LIST_BASE_NODE_T (buf_page_t) free
 UT_LIST_BASE_NODE_T (buf_page_t) LRU
 UT_LIST_BASE_NODE_T (buf_block_t) unzip_LRU

Buddy allocator fields

The buddy allocator is used for allocating compressed page frames and buf_page_t descriptors of blocks that exist in the buffer pool only in compressed form.

buf_page_t watch [BUF_POOL_WATCH_SIZE]
 UT_LIST_BASE_NODE_T (buf_page_t) zip_clean
 UT_LIST_BASE_NODE_T (buf_page_t) zip_free[BUF_BUDDY_SIZES_MAX]

Detailed Description

The buffer pool structure.

NOTE! The definition appears here only for other modules of this directory (buf) to see it. Do not use from outside!

Definition at line 1594 of file buf0buf.h.

Member Function Documentation

◆ UT_LIST_BASE_NODE_T() [1/6]

buf_pool_struct::UT_LIST_BASE_NODE_T ( buf_block_t )

base node of the unzip_LRU list

◆ UT_LIST_BASE_NODE_T() [2/6]

buf_pool_struct::UT_LIST_BASE_NODE_T ( buf_page_t )

base node of the modified block list

◆ UT_LIST_BASE_NODE_T() [3/6]

buf_pool_struct::UT_LIST_BASE_NODE_T ( buf_page_t )

base node of the free block list

◆ UT_LIST_BASE_NODE_T() [4/6]

buf_pool_struct::UT_LIST_BASE_NODE_T ( buf_page_t )

base node of the LRU list

◆ UT_LIST_BASE_NODE_T() [5/6]

buf_pool_struct::UT_LIST_BASE_NODE_T ( buf_page_t )

unmodified compressed pages

◆ UT_LIST_BASE_NODE_T() [6/6]

buf_pool_struct::UT_LIST_BASE_NODE_T ( buf_page_t )

buddy free lists

Member Data Documentation

◆ buddy_stat

buf_buddy_stat_t buf_pool_struct::buddy_stat[BUF_BUDDY_SIZES_MAX+1]

Statistics of buddy system, indexed by block size

Definition at line 1635 of file buf0buf.h.

◆ chunks

buf_chunk_t* buf_pool_struct::chunks

buffer pool chunks

Definition at line 1618 of file buf0buf.h.

◆ curr_pool_size

ulint buf_pool_struct::curr_pool_size

Current pool size in bytes

Definition at line 1607 of file buf0buf.h.

◆ curr_size

ulint buf_pool_struct::curr_size

current pool size in pages

Definition at line 1619 of file buf0buf.h.

◆ flush_list_mutex

mutex_t buf_pool_struct::flush_list_mutex

mutex protecting the flush list access. This mutex protects flush_list, flush_rbt and bpage::list pointers when the bpage is on flush_list. It also protects writes to bpage::oldest_modification

Definition at line 1647 of file buf0buf.h.

◆ flush_rbt

ib_rbt_t* buf_pool_struct::flush_rbt

a red-black tree is used exclusively during recovery to speed up insertions in the flush_list. This tree contains blocks in order of oldest_modification LSN and is kept in sync with the flush_list. Each member of the tree MUST also be on the flush_list. This tree is relevant only in recovery and is set to NULL once the recovery is over. Protected by flush_list_mutex

Definition at line 1667 of file buf0buf.h.

◆ freed_page_clock

ulint buf_pool_struct::freed_page_clock

a sequence number used to count the number of buffer blocks removed from the end of the LRU list; NOTE that this counter may wrap around at 4 billion! A thread is allowed to read this for heuristic purposes without holding any mutex or latch

Definition at line 1681 of file buf0buf.h.

◆ init_flush

ibool buf_pool_struct::init_flush[BUF_FLUSH_N_TYPES]

this is TRUE when a flush of the given type is being initialized

Definition at line 1657 of file buf0buf.h.

◆ instance_no

ulint buf_pool_struct::instance_no

Array index of this buffer pool instance

Definition at line 1604 of file buf0buf.h.

◆ last_printout_time

time_t buf_pool_struct::last_printout_time

when buf_print_io was last time called

Definition at line 1632 of file buf0buf.h.

◆ LRU_flush_ended

ulint buf_pool_struct::LRU_flush_ended

when an LRU flush ends for a page, this is incremented by one; this is set to zero when a buffer block is allocated

Definition at line 1690 of file buf0buf.h.

◆ LRU_old

buf_page_t* buf_pool_struct::LRU_old

pointer to the about buf_LRU_old_ratio/BUF_LRU_OLD_RATIO_DIV oldest blocks in the LRU list; NULL if LRU length less than BUF_LRU_OLD_MIN_LEN; NOTE: when LRU_old != NULL, its length should always equal LRU_old_len

Definition at line 1704 of file buf0buf.h.

◆ LRU_old_len

ulint buf_pool_struct::LRU_old_len

length of the LRU list from the block to which LRU_old points onward, including that block; see buf0lru.c for the restrictions on this value; 0 if LRU_old == NULL; NOTE: LRU_old_len must be adjusted whenever LRU_old shrinks or grows!

Definition at line 1711 of file buf0buf.h.

◆ LRU_old_ratio

ulint buf_pool_struct::LRU_old_ratio

Reserve this much of the buffer pool for "old" blocks

Definition at line 1608 of file buf0buf.h.

◆ mutex

mutex_t buf_pool_struct::mutex

Buffer pool mutex of this instance

Definition at line 1598 of file buf0buf.h.

◆ n_chunks

ulint buf_pool_struct::n_chunks

number of buffer pool chunks

Definition at line 1617 of file buf0buf.h.

◆ n_flush

ulint buf_pool_struct::n_flush[BUF_FLUSH_N_TYPES]

this is the number of pending writes in the given flush type

Definition at line 1660 of file buf0buf.h.

◆ n_pend_reads

ulint buf_pool_struct::n_pend_reads

number of pending read operations

Definition at line 1628 of file buf0buf.h.

◆ n_pend_unzip

ulint buf_pool_struct::n_pend_unzip

number of pending decompressions

Definition at line 1630 of file buf0buf.h.

◆ no_flush

os_event_t buf_pool_struct::no_flush[BUF_FLUSH_N_TYPES]

this is in the set state when there is no flush batch of the given type running

Definition at line 1663 of file buf0buf.h.

◆ old_pool_size

ulint buf_pool_struct::old_pool_size

Old pool size in bytes

Definition at line 1606 of file buf0buf.h.

◆ old_stat

buf_pool_stat_t buf_pool_struct::old_stat

old statistics

Definition at line 1639 of file buf0buf.h.

◆ page_hash

hash_table_t* buf_pool_struct::page_hash

hash table of buf_page_t or buf_block_t file pages, buf_page_in_file() == TRUE, indexed by (space_id, offset)

Definition at line 1620 of file buf0buf.h.

◆ stat

buf_pool_stat_t buf_pool_struct::stat

current statistics

Definition at line 1638 of file buf0buf.h.

◆ watch

buf_page_t buf_pool_struct::watch[BUF_POOL_WATCH_SIZE]

Sentinel records for buffer pool watches. Protected by buf_pool->mutex.

Definition at line 1734 of file buf0buf.h.

◆ zip_hash

hash_table_t* buf_pool_struct::zip_hash

hash table of buf_block_t blocks whose frames are allocated to the zip buddy system, indexed by block->frame

Definition at line 1624 of file buf0buf.h.

◆ zip_mutex

mutex_t buf_pool_struct::zip_mutex

Zip mutex of this buffer pool instance, protects compressed only pages (of type buf_page_t, not buf_block_t

Definition at line 1600 of file buf0buf.h.


The documentation for this struct was generated from the following file: