Commit df32920b authored by Eric Herman's avatar Eric Herman

Add eviction count for table cache lru cleanup (xtradb)

parent 4f4373fe
...@@ -379,6 +379,7 @@ enum monitor_id_t { ...@@ -379,6 +379,7 @@ enum monitor_id_t {
MONITOR_SRV_MEM_VALIDATE_MICROSECOND, MONITOR_SRV_MEM_VALIDATE_MICROSECOND,
MONITOR_SRV_PURGE_MICROSECOND, MONITOR_SRV_PURGE_MICROSECOND,
MONITOR_SRV_DICT_LRU_MICROSECOND, MONITOR_SRV_DICT_LRU_MICROSECOND,
MONITOR_SRV_DICT_LRU_EVICT_COUNT,
MONITOR_SRV_CHECKPOINT_MICROSECOND, MONITOR_SRV_CHECKPOINT_MICROSECOND,
MONITOR_OVLD_SRV_DBLWR_WRITES, MONITOR_OVLD_SRV_DBLWR_WRITES,
MONITOR_OVLD_SRV_DBLWR_PAGES_WRITTEN, MONITOR_OVLD_SRV_DBLWR_PAGES_WRITTEN,
......
...@@ -1196,6 +1196,11 @@ static monitor_info_t innodb_counter_info[] = ...@@ -1196,6 +1196,11 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_NONE, MONITOR_NONE,
MONITOR_DEFAULT_START, MONITOR_SRV_DICT_LRU_MICROSECOND}, MONITOR_DEFAULT_START, MONITOR_SRV_DICT_LRU_MICROSECOND},
{"innodb_dict_lru_count", "server",
"Number of tables evicted from DICT LRU list",
MONITOR_NONE,
MONITOR_DEFAULT_START, MONITOR_SRV_DICT_LRU_EVICT_COUNT},
{"innodb_checkpoint_usec", "server", {"innodb_checkpoint_usec", "server",
"Time (in microseconds) spent by master thread to do checkpoint", "Time (in microseconds) spent by master thread to do checkpoint",
MONITOR_NONE, MONITOR_NONE,
......
...@@ -2881,6 +2881,7 @@ srv_master_do_active_tasks(void) ...@@ -2881,6 +2881,7 @@ srv_master_do_active_tasks(void)
{ {
ib_time_t cur_time = ut_time(); ib_time_t cur_time = ut_time();
ullint counter_time = ut_time_us(NULL); ullint counter_time = ut_time_us(NULL);
ulint n_evicted = 0;
/* First do the tasks that we are suppose to do at each /* First do the tasks that we are suppose to do at each
invocation of this function. */ invocation of this function. */
...@@ -2941,7 +2942,9 @@ srv_master_do_active_tasks(void) ...@@ -2941,7 +2942,9 @@ srv_master_do_active_tasks(void)
if (cur_time % SRV_MASTER_DICT_LRU_INTERVAL == 0) { if (cur_time % SRV_MASTER_DICT_LRU_INTERVAL == 0) {
srv_main_thread_op_info = "enforcing dict cache limit"; srv_main_thread_op_info = "enforcing dict cache limit";
srv_master_evict_from_table_cache(50); n_evicted = srv_master_evict_from_table_cache(50);
MONITOR_INC_VALUE(
MONITOR_SRV_DICT_LRU_EVICT_COUNT, n_evicted);
MONITOR_INC_TIME_IN_MICRO_SECS( MONITOR_INC_TIME_IN_MICRO_SECS(
MONITOR_SRV_DICT_LRU_MICROSECOND, counter_time); MONITOR_SRV_DICT_LRU_MICROSECOND, counter_time);
} }
......
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