mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
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
1 changed files with 2 additions and 1 deletions
|
|
@ -1845,7 +1845,8 @@ buf_get_modified_ratio_pct(void)
|
|||
mutex_enter(&(buf_pool->mutex));
|
||||
|
||||
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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue