MySQL 9.1.0
Source Code Documentation
|
Functions | |
bool | initialize (ulint n_pages_last) |
Initialize flush parameters for current iteration. More... | |
void | set_average () |
Set average LSN and page flush speed across multiple iterations. More... | |
ulint | get_pct_for_dirty () |
Calculates if flushing is required based on number of dirty pages in the buffer pool. More... | |
ulint | get_pct_for_lsn (lsn_t age) |
Calculates if flushing is required based on redo generation rate. More... | |
ulint | set_flush_target_by_lsn (bool sync_flush, lsn_t sync_flush_limit_lsn) |
Set page flush target based on LSN change and checkpoint age. More... | |
ulint | set_flush_target_by_page (ulint n_pages_lsn) |
Set page flush target based on dirty pages in buffer pool. More... | |
ulint | page_recommendation (ulint last_pages_in, bool is_sync_flush, lsn_t sync_flush_limit_lsn) |
This function is called approximately once every second by the page_cleaner thread, unless it is sync flushing mode, in which case it is called every small round. More... | |
Variables | |
std::chrono::steady_clock::time_point | cur_iter_time |
Time stamp of current iteration. More... | |
lsn_t | cur_iter_lsn = 0 |
LSN at current iteration. More... | |
ulint | cur_iter_pages_dirty = 0 |
Number of dirty pages in flush list in current iteration. More... | |
ulint | cur_iter_dirty_pct = 0 |
Dirty page percentage in buffer pool. More... | |
std::chrono::steady_clock::time_point | prev_iter_time |
Time stamp of previous iteration. More... | |
ulint | prev_iter_pages_dirty = 0 |
Number of dirty pages in flush list at previous iteration. More... | |
ulint | prev_iter_pages_flushed = 0 |
Actual number of pages flushed by last iteration. More... | |
lsn_t | lsn_avg_rate = 0 |
Average redo generation rate. More... | |
ulint | page_avg_rate = 0 |
Average page flush rate. More... | |
lsn_t | prev_lsn = 0 |
LSN when last average rates are computed. More... | |
std::chrono::steady_clock::time_point | prev_time |
Time stamp when last average rates are computed. More... | |
ulint | n_iterations = 0 |
Number of iteration till average rates are computed. More... | |
ulint | sum_pages = 0 |
Pages flushed till last average rates are computed. More... | |
ulint Adaptive_flush::get_pct_for_dirty | ( | ) |
Calculates if flushing is required based on number of dirty pages in the buffer pool.
Calculates if flushing is required based on redo generation rate.
age | in: current age of LSN. |
bool Adaptive_flush::initialize | ( | ulint | n_pages_last | ) |
Initialize flush parameters for current iteration.
[in] | n_pages_last | number of pages flushed in last iteration |
ulint Adaptive_flush::page_recommendation | ( | ulint | last_pages_in, |
bool | is_sync_flush, | ||
lsn_t | sync_flush_limit_lsn | ||
) |
This function is called approximately once every second by the page_cleaner thread, unless it is sync flushing mode, in which case it is called every small round.
Based on various factors it decides if there is a need to do flushing.
last_pages_in | the number of pages flushed by the last flush_list flushing |
is_sync_flush | true iff this is sync flush mode |
sync_flush_limit_lsn | low limit for oldest_modification if is_sync_flush is true |
void Adaptive_flush::set_average | ( | ) |
Set average LSN and page flush speed across multiple iterations.
Set page flush target based on LSN change and checkpoint age.
[in] | sync_flush | true iff this is sync flush mode |
[in] | sync_flush_limit_lsn | low limit for oldest_modification if sync_flush is true |
Set page flush target based on dirty pages in buffer pool.
Set only if the target are is found to be higher than the target evaluated based on LSN.
[in] | n_pages_lsn | number of pages estimated and set based on LSN |
ulint Adaptive_flush::cur_iter_dirty_pct = 0 |
Dirty page percentage in buffer pool.
lsn_t Adaptive_flush::cur_iter_lsn = 0 |
LSN at current iteration.
ulint Adaptive_flush::cur_iter_pages_dirty = 0 |
Number of dirty pages in flush list in current iteration.
std::chrono::steady_clock::time_point Adaptive_flush::cur_iter_time |
Time stamp of current iteration.
lsn_t Adaptive_flush::lsn_avg_rate = 0 |
Average redo generation rate.
ulint Adaptive_flush::n_iterations = 0 |
Number of iteration till average rates are computed.
ulint Adaptive_flush::page_avg_rate = 0 |
Average page flush rate.
ulint Adaptive_flush::prev_iter_pages_dirty = 0 |
Number of dirty pages in flush list at previous iteration.
ulint Adaptive_flush::prev_iter_pages_flushed = 0 |
Actual number of pages flushed by last iteration.
std::chrono::steady_clock::time_point Adaptive_flush::prev_iter_time |
Time stamp of previous iteration.
lsn_t Adaptive_flush::prev_lsn = 0 |
LSN when last average rates are computed.
std::chrono::steady_clock::time_point Adaptive_flush::prev_time |
Time stamp when last average rates are computed.
ulint Adaptive_flush::sum_pages = 0 |
Pages flushed till last average rates are computed.