buf0buf.c:
When calculating the buf pool dirty pages ratio, add also free pages to the LRU list length: no need to active flushing if there are lots of free pages in the buffer pool innobase/buf/buf0buf.c: When calculating the buf pool dirty pages ratio, add also free pages to the LRU list length: no need to active flushing if there are lots of free pages in the buffer pool
This commit is contained in:
parent
e4a95f2914
commit
bdf002d963
@ -1845,7 +1845,8 @@ buf_get_modified_ratio_pct(void)
|
|||||||
mutex_enter(&(buf_pool->mutex));
|
mutex_enter(&(buf_pool->mutex));
|
||||||
|
|
||||||
ratio = (100 * UT_LIST_GET_LEN(buf_pool->flush_list))
|
ratio = (100 * UT_LIST_GET_LEN(buf_pool->flush_list))
|
||||||
/ (1 + UT_LIST_GET_LEN(buf_pool->LRU));
|
/ (1 + UT_LIST_GET_LEN(buf_pool->LRU)
|
||||||
|
+ UT_LIST_GET_LEN(buf_pool->free));
|
||||||
|
|
||||||
/* 1 + is there to avoid division by zero */
|
/* 1 + is there to avoid division by zero */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user