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,9 +235,11 @@ loop: ...@@ -235,9 +235,11 @@ loop:
} 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,
...@@ -251,7 +253,8 @@ loop: ...@@ -251,7 +253,8 @@ loop:
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 @@ loop: ...@@ -318,6 +321,7 @@ loop:
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