mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
buf0buf.c, srv0srv.h, buf0buf.h, srv0srv.c:
Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker innobase/srv/srv0srv.c: Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker innobase/include/buf0buf.h: Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker innobase/include/srv0srv.h: Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker innobase/buf/buf0buf.c: Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker
This commit is contained in:
parent
18409f75dc
commit
1d64ab5e47
4 changed files with 118 additions and 28 deletions
|
|
@ -1832,6 +1832,28 @@ buf_get_n_pending_ios(void)
|
|||
+ buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE]);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Returns the ratio in percents of modified pages in the buffer pool /
|
||||
database pages in the buffer pool. */
|
||||
|
||||
ulint
|
||||
buf_get_modified_ratio_pct(void)
|
||||
/*============================*/
|
||||
{
|
||||
ulint ratio;
|
||||
|
||||
mutex_enter(&(buf_pool->mutex));
|
||||
|
||||
ratio = (100 * UT_LIST_GET_LEN(buf_pool->flush_list))
|
||||
/ (1 + UT_LIST_GET_LEN(buf_pool->LRU));
|
||||
|
||||
/* 1 + is there to avoid division by zero */
|
||||
|
||||
mutex_exit(&(buf_pool->mutex));
|
||||
|
||||
return(ratio);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Prints info of the buffer i/o. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue