diff options
author | unknown <heikki@hundin.mysql.fi> | 2003-05-17 16:23:46 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2003-05-17 16:23:46 +0300 |
commit | bdf002d9635e9be3fc853dd4ce1f3905dfa10569 (patch) | |
tree | 0050cbf0b223f0cc794e1e0e2debc4f1ec526b94 /innobase/buf/buf0buf.c | |
parent | e4a95f291454943f14b680fb8f0d0c43ea50ead7 (diff) | |
download | mariadb-git-bdf002d9635e9be3fc853dd4ce1f3905dfa10569.tar.gz |
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
Diffstat (limited to 'innobase/buf/buf0buf.c')
-rw-r--r-- | innobase/buf/buf0buf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c index c793c11f29e..e000d862403 100644 --- a/innobase/buf/buf0buf.c +++ b/innobase/buf/buf0buf.c @@ -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 */ |