mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 03:21:53 +01:00
branches/zip: Split the source-only configuration parameter
buf_buddy_min_n_frames into two, also buf_buddy_max_n_frames. Set the default values in such a way that a strict LRU policy will apply for replacing compressed or uncompressed page frames in the buffer pool. These parameters have not yet been exposed to the MySQL layer.
This commit is contained in:
parent
53b86f0dd1
commit
051ee49116
2 changed files with 18 additions and 8 deletions
|
@ -30,10 +30,15 @@ Protected by buf_pool->mutex. */
|
|||
ib_uint64_t buf_buddy_relocated[BUF_BUDDY_SIZES + 1];
|
||||
|
||||
/** Preferred minimum number of frames allocated from the buffer pool
|
||||
to the buddy system. When this number is exceeded, the buddy allocator
|
||||
will not try to free clean compressed-only pages in order to satisfy
|
||||
an allocation request. Protected by buf_pool->mutex. */
|
||||
ulint buf_buddy_min_n_frames = ULINT_UNDEFINED;
|
||||
to the buddy system. Unless this number is exceeded or the buffer
|
||||
pool is scarce, the LRU algorithm will not free compressed-only pages
|
||||
in order to satisfy an allocation request. Protected by buf_pool->mutex. */
|
||||
ulint buf_buddy_min_n_frames = 0;
|
||||
/** Preferred maximum number of frames allocated from the buffer pool
|
||||
to the buddy system. Unless this number is exceeded, the buddy allocator
|
||||
will not try to free clean compressed-only pages before falling back
|
||||
to the LRU algorithm. Protected by buf_pool->mutex. */
|
||||
ulint buf_buddy_max_n_frames = ULINT_UNDEFINED;
|
||||
|
||||
/**************************************************************************
|
||||
Get the offset of the buddy of a compressed page frame. */
|
||||
|
@ -278,7 +283,7 @@ buf_buddy_alloc_clean(
|
|||
ut_ad(mutex_own(&buf_pool->mutex));
|
||||
ut_ad(!mutex_own(&buf_pool->zip_mutex));
|
||||
|
||||
if (buf_buddy_n_frames > buf_buddy_min_n_frames) {
|
||||
if (buf_buddy_n_frames < buf_buddy_max_n_frames) {
|
||||
|
||||
goto free_LRU;
|
||||
}
|
||||
|
|
|
@ -54,10 +54,15 @@ buf_buddy_free(
|
|||
Protected by buf_pool->mutex. */
|
||||
extern ulint buf_buddy_n_frames;
|
||||
/** Preferred minimum number of frames allocated from the buffer pool
|
||||
to the buddy system. When this number is exceeded, the buddy allocator
|
||||
will not try to free clean compressed-only pages in order to satisfy
|
||||
an allocation request. Protected by buf_pool->mutex. */
|
||||
to the buddy system. Unless this number is exceeded or the buffer
|
||||
pool is scarce, the LRU algorithm will not free compressed-only pages
|
||||
in order to satisfy an allocation request. Protected by buf_pool->mutex. */
|
||||
extern ulint buf_buddy_min_n_frames;
|
||||
/** Preferred maximum number of frames allocated from the buffer pool
|
||||
to the buddy system. Unless this number is exceeded, the buddy allocator
|
||||
will not try to free clean compressed-only pages before falling back
|
||||
to the LRU algorithm. Protected by buf_pool->mutex. */
|
||||
extern ulint buf_buddy_max_n_frames;
|
||||
/** Counts of blocks allocated from the buddy system.
|
||||
Protected by buf_pool->mutex. */
|
||||
extern ulint buf_buddy_used[BUF_BUDDY_SIZES + 1];
|
||||
|
|
Loading…
Add table
Reference in a new issue