Commit f61cec71 authored by unknown's avatar unknown

buf0lru.c:

  Start InnoDB Monitor if 80 % of the buffer pool occupied by adaptive has or lock heaps; do not print the same warning more than 1 time


innobase/buf/buf0lru.c:
  Start InnoDB Monitor if 80 % of the buffer pool occupied by adaptive has or lock heaps; do not print the same warning more than 1 time
parent a65aea9d
...@@ -216,7 +216,7 @@ buf_LRU_get_free_block(void) ...@@ -216,7 +216,7 @@ buf_LRU_get_free_block(void)
buf_block_t* block = NULL; buf_block_t* block = NULL;
ibool freed; ibool freed;
ulint n_iterations = 1; ulint n_iterations = 1;
ibool mon_value_was = 0; /* remove bug */ ibool mon_value_was = FALSE;
ibool started_monitor = FALSE; ibool started_monitor = FALSE;
loop: loop:
mutex_enter(&(buf_pool->mutex)); mutex_enter(&(buf_pool->mutex));
...@@ -235,12 +235,14 @@ buf_LRU_get_free_block(void) ...@@ -235,12 +235,14 @@ buf_LRU_get_free_block(void)
} else if (!recv_recovery_on && UT_LIST_GET_LEN(buf_pool->free) } else if (!recv_recovery_on && UT_LIST_GET_LEN(buf_pool->free)
+ UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->max_size / 5) { + UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->max_size / 5) {
if (!srv_print_innodb_monitor) {
/* Over 80 % of the buffer pool is occupied by lock heaps /* Over 80 % of the buffer pool is occupied by lock
or the adaptive hash index. This may be a memory leak! */ heaps or the adaptive hash index. This may be a memory
leak! */
ut_print_timestamp(stderr); ut_print_timestamp(stderr);
fprintf(stderr, fprintf(stderr,
" InnoDB: WARNING: over 4 / 5 of the buffer pool is occupied by\n" " InnoDB: WARNING: over 4 / 5 of the buffer pool is occupied by\n"
"InnoDB: lock heaps or the adaptive hash index! Check that your\n" "InnoDB: lock heaps or the adaptive hash index! Check that your\n"
"InnoDB: transactions do not set too many row locks.\n" "InnoDB: transactions do not set too many row locks.\n"
...@@ -248,10 +250,11 @@ buf_LRU_get_free_block(void) ...@@ -248,10 +250,11 @@ buf_LRU_get_free_block(void)
"InnoDB: the buffer pool bigger?\n" "InnoDB: the buffer pool bigger?\n"
"InnoDB: Starting the InnoDB Monitor to print diagnostics, including\n" "InnoDB: Starting the InnoDB Monitor to print diagnostics, including\n"
"InnoDB: lock heap and hash index sizes.\n", "InnoDB: lock heap and hash index sizes.\n",
buf_pool->curr_size / (1024 * 1024 / UNIV_PAGE_SIZE)); buf_pool->curr_size / (1024 * 1024 / UNIV_PAGE_SIZE));
srv_print_innodb_monitor = TRUE;
srv_print_innodb_monitor = TRUE;
os_event_set(srv_lock_timeout_thread_event);
}
} else if (!recv_recovery_on && UT_LIST_GET_LEN(buf_pool->free) } else if (!recv_recovery_on && UT_LIST_GET_LEN(buf_pool->free)
+ UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->max_size / 4) { + UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->max_size / 4) {
...@@ -318,6 +321,7 @@ buf_LRU_get_free_block(void) ...@@ -318,6 +321,7 @@ buf_LRU_get_free_block(void)
mon_value_was = srv_print_innodb_monitor; mon_value_was = srv_print_innodb_monitor;
started_monitor = TRUE; started_monitor = TRUE;
srv_print_innodb_monitor = TRUE; srv_print_innodb_monitor = TRUE;
os_event_set(srv_lock_timeout_thread_event);
} }
/* No free block was found: try to flush the LRU list */ /* No free block was found: try to flush the LRU list */
......
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