diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h index 89247917147..5964f2c4819 100644 --- a/storage/innobase/include/srv0mon.h +++ b/storage/innobase/include/srv0mon.h @@ -378,7 +378,8 @@ enum monitor_id_t { MONITOR_SRV_MEM_VALIDATE_MICROSECOND, MONITOR_SRV_PURGE_MICROSECOND, MONITOR_SRV_DICT_LRU_MICROSECOND, - MONITOR_SRV_DICT_LRU_EVICT_COUNT, + MONITOR_SRV_DICT_LRU_EVICT_COUNT_ACTIVE, + MONITOR_SRV_DICT_LRU_EVICT_COUNT_IDLE, MONITOR_SRV_CHECKPOINT_MICROSECOND, MONITOR_OVLD_SRV_DBLWR_WRITES, MONITOR_OVLD_SRV_DBLWR_PAGES_WRITTEN, diff --git a/storage/innobase/srv/srv0mon.cc b/storage/innobase/srv/srv0mon.cc index 7226139ebeb..d8254c2b8ed 100644 --- a/storage/innobase/srv/srv0mon.cc +++ b/storage/innobase/srv/srv0mon.cc @@ -1196,10 +1196,15 @@ static monitor_info_t innodb_counter_info[] = MONITOR_NONE, MONITOR_DEFAULT_START, MONITOR_SRV_DICT_LRU_MICROSECOND}, - {"innodb_dict_lru_count", "server", - "Number of tables evicted from DICT LRU list", + {"innodb_dict_lru_count_active", "server", + "Number of tables evicted from DICT LRU list in the active loop", MONITOR_NONE, - MONITOR_DEFAULT_START, MONITOR_SRV_DICT_LRU_EVICT_COUNT}, + MONITOR_DEFAULT_START, MONITOR_SRV_DICT_LRU_EVICT_COUNT_ACTIVE}, + + {"innodb_dict_lru_count_idle", "server", + "Number of tables evicted from DICT LRU list in the idle loop", + MONITOR_NONE, + MONITOR_DEFAULT_START, MONITOR_SRV_DICT_LRU_EVICT_COUNT_IDLE}, {"innodb_checkpoint_usec", "server", "Time (in microseconds) spent by master thread to do checkpoint", diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index b0b43953171..9dd062f3d37 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -2337,7 +2337,7 @@ srv_master_do_active_tasks(void) srv_main_thread_op_info = "enforcing dict cache limit"; n_evicted = srv_master_evict_from_table_cache(50); MONITOR_INC_VALUE( - MONITOR_SRV_DICT_LRU_EVICT_COUNT, n_evicted); + MONITOR_SRV_DICT_LRU_EVICT_COUNT_ACTIVE, n_evicted); MONITOR_INC_TIME_IN_MICRO_SECS( MONITOR_SRV_DICT_LRU_MICROSECOND, counter_time); } @@ -2369,6 +2369,7 @@ srv_master_do_idle_tasks(void) /*==========================*/ { ullint counter_time; + ulint n_evicted = 0; ++srv_main_idle_loops; @@ -2406,7 +2407,9 @@ srv_master_do_idle_tasks(void) } srv_main_thread_op_info = "enforcing dict cache limit"; - srv_master_evict_from_table_cache(100); + n_evicted = srv_master_evict_from_table_cache(100); + MONITOR_INC_VALUE( + MONITOR_SRV_DICT_LRU_EVICT_COUNT_IDLE, n_evicted); MONITOR_INC_TIME_IN_MICRO_SECS( MONITOR_SRV_DICT_LRU_MICROSECOND, counter_time);