diff options
author | unknown <heikki@hundin.mysql.fi> | 2003-04-24 21:51:00 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2003-04-24 21:51:00 +0300 |
commit | 73b49b70ca0d8d7700bee66183b96ab4fda8ef26 (patch) | |
tree | 8af8e1fb9e288a22a14889af8468ae003f1ba407 | |
parent | 1e8414803c0e3583ec729954236c3498d739d26a (diff) | |
download | mariadb-git-73b49b70ca0d8d7700bee66183b96ab4fda8ef26.tar.gz |
srv0srv.c:
Make buffer pool flush batches bigger as that may save some time if fsync is very inefficient
innobase/srv/srv0srv.c:
Make buffer pool flush batches bigger as that may save some time if fsync is very inefficient
-rw-r--r-- | innobase/srv/srv0srv.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index ccb3755b252..f360cf25900 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -2780,9 +2780,6 @@ loop: mutex_exit(&kernel_mutex); - /* We run purge and a batch of ibuf_contract every 10 seconds, even - if the server were active: */ - for (i = 0; i < 10; i++) { n_ios_old = log_sys->n_log_ios + buf_pool->n_pages_read + buf_pool->n_pages_written; @@ -2867,7 +2864,7 @@ loop: if (n_pend_ios < 3 && (n_ios - n_ios_very_old < 200)) { srv_main_thread_op_info = (char*) "flushing buffer pool pages"; - buf_flush_batch(BUF_FLUSH_LIST, 50, ut_dulint_max); + buf_flush_batch(BUF_FLUSH_LIST, 100, ut_dulint_max); srv_main_thread_op_info = (char*) "flushing log"; log_flush_up_to(ut_dulint_max, LOG_WAIT_ONE_GROUP); @@ -2926,7 +2923,13 @@ background_loop: /* Flush a few oldest pages to make the checkpoint younger */ - n_pages_flushed = buf_flush_batch(BUF_FLUSH_LIST, 10, ut_dulint_max); + if (srv_fast_shutdown && srv_shutdown_state > 0) { + n_pages_flushed = buf_flush_batch(BUF_FLUSH_LIST, 100, + ut_dulint_max); + } else { + n_pages_flushed = buf_flush_batch(BUF_FLUSH_LIST, 10, + ut_dulint_max); + } srv_main_thread_op_info = (char*)"making checkpoint"; @@ -2993,7 +2996,8 @@ background_loop: } mutex_exit(&kernel_mutex); - srv_main_thread_op_info = (char*) "waiting for buffer pool flush to end"; + srv_main_thread_op_info = + (char*) "waiting for buffer pool flush to end"; buf_flush_wait_batch_end(BUF_FLUSH_LIST); srv_main_thread_op_info = (char*)"making checkpoint"; |