diff options
author | heikki@hundin.mysql.fi <> | 2003-05-17 16:23:46 +0300 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2003-05-17 16:23:46 +0300 |
commit | 526bb7dc7b750ad9dd4273d48eab223770efe73b (patch) | |
tree | 0050cbf0b223f0cc794e1e0e2debc4f1ec526b94 /innobase/buf | |
parent | 5359d046083ddf0318c725780b61baa1a1aaed62 (diff) | |
download | mariadb-git-526bb7dc7b750ad9dd4273d48eab223770efe73b.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
Diffstat (limited to 'innobase/buf')
-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 */ |