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
parent 5359d046
...@@ -1845,7 +1845,8 @@ buf_get_modified_ratio_pct(void) ...@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment