diff options
author | unknown <heikki@hundin.mysql.fi> | 2003-05-03 19:44:46 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2003-05-03 19:44:46 +0300 |
commit | 1d64ab5e4705207196d6ff34f866a1070d49f108 (patch) | |
tree | 090aa4a3684b09f490196ae728350fb47902b311 /innobase/buf/buf0buf.c | |
parent | 18409f75dc3dc5f36fc0a60d6f3eea83f20ee434 (diff) | |
download | mariadb-git-1d64ab5e4705207196d6ff34f866a1070d49f108.tar.gz |
buf0buf.c, srv0srv.h, buf0buf.h, srv0srv.c:
Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker
innobase/srv/srv0srv.c:
Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker
innobase/include/buf0buf.h:
Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker
innobase/include/srv0srv.h:
Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker
innobase/buf/buf0buf.c:
Clean up the working of the main thread; add a tunable parameter srv_max_buf_pool_modified_pct which can be used to make the flush phase in shutdown quicker
Diffstat (limited to 'innobase/buf/buf0buf.c')
-rw-r--r-- | innobase/buf/buf0buf.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c index 42799da9d7c..944a5ef60d0 100644 --- a/innobase/buf/buf0buf.c +++ b/innobase/buf/buf0buf.c @@ -1833,6 +1833,28 @@ buf_get_n_pending_ios(void) } /************************************************************************* +Returns the ratio in percents of modified pages in the buffer pool / +database pages in the buffer pool. */ + +ulint +buf_get_modified_ratio_pct(void) +/*============================*/ +{ + ulint ratio; + + mutex_enter(&(buf_pool->mutex)); + + ratio = (100 * UT_LIST_GET_LEN(buf_pool->flush_list)) + / (1 + UT_LIST_GET_LEN(buf_pool->LRU)); + + /* 1 + is there to avoid division by zero */ + + mutex_exit(&(buf_pool->mutex)); + + return(ratio); +} + +/************************************************************************* Prints info of the buffer i/o. */ void |