Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3ed384ba
Commit
3ed384ba
authored
Aug 26, 2015
by
Jan Lindström
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #94 from ericherman/evict_table_metric
Evict table metric
parents
cf154cc9
f66ef6a0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
4 deletions
+40
-4
storage/innobase/include/srv0mon.h
storage/innobase/include/srv0mon.h
+2
-0
storage/innobase/srv/srv0mon.cc
storage/innobase/srv/srv0mon.cc
+10
-0
storage/innobase/srv/srv0srv.cc
storage/innobase/srv/srv0srv.cc
+8
-2
storage/xtradb/include/srv0mon.h
storage/xtradb/include/srv0mon.h
+2
-0
storage/xtradb/srv/srv0mon.cc
storage/xtradb/srv/srv0mon.cc
+10
-0
storage/xtradb/srv/srv0srv.cc
storage/xtradb/srv/srv0srv.cc
+8
-2
No files found.
storage/innobase/include/srv0mon.h
View file @
3ed384ba
...
@@ -378,6 +378,8 @@ enum monitor_id_t {
...
@@ -378,6 +378,8 @@ 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_ACTIVE
,
MONITOR_SRV_DICT_LRU_EVICT_COUNT_IDLE
,
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
,
...
...
storage/innobase/srv/srv0mon.cc
View file @
3ed384ba
...
@@ -1196,6 +1196,16 @@ static monitor_info_t innodb_counter_info[] =
...
@@ -1196,6 +1196,16 @@ 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_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_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"
,
{
"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
,
...
...
storage/innobase/srv/srv0srv.cc
View file @
3ed384ba
...
@@ -2274,6 +2274,7 @@ srv_master_do_active_tasks(void)
...
@@ -2274,6 +2274,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. */
...
@@ -2334,7 +2335,9 @@ srv_master_do_active_tasks(void)
...
@@ -2334,7 +2335,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_ACTIVE
,
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
);
}
}
...
@@ -2366,6 +2369,7 @@ srv_master_do_idle_tasks(void)
...
@@ -2366,6 +2369,7 @@ srv_master_do_idle_tasks(void)
/*==========================*/
/*==========================*/
{
{
ullint
counter_time
;
ullint
counter_time
;
ulint
n_evicted
=
0
;
++
srv_main_idle_loops
;
++
srv_main_idle_loops
;
...
@@ -2403,7 +2407,9 @@ srv_master_do_idle_tasks(void)
...
@@ -2403,7 +2407,9 @@ srv_master_do_idle_tasks(void)
}
}
srv_main_thread_op_info
=
"enforcing dict cache limit"
;
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_INC_TIME_IN_MICRO_SECS
(
MONITOR_SRV_DICT_LRU_MICROSECOND
,
counter_time
);
MONITOR_SRV_DICT_LRU_MICROSECOND
,
counter_time
);
...
...
storage/xtradb/include/srv0mon.h
View file @
3ed384ba
...
@@ -379,6 +379,8 @@ enum monitor_id_t {
...
@@ -379,6 +379,8 @@ 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_ACTIVE
,
MONITOR_SRV_DICT_LRU_EVICT_COUNT_IDLE
,
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
,
...
...
storage/xtradb/srv/srv0mon.cc
View file @
3ed384ba
...
@@ -1196,6 +1196,16 @@ static monitor_info_t innodb_counter_info[] =
...
@@ -1196,6 +1196,16 @@ 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_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_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"
,
{
"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
,
...
...
storage/xtradb/srv/srv0srv.cc
View file @
3ed384ba
...
@@ -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_ACTIVE
,
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
);
}
}
...
@@ -2973,6 +2976,7 @@ srv_master_do_idle_tasks(void)
...
@@ -2973,6 +2976,7 @@ srv_master_do_idle_tasks(void)
/*==========================*/
/*==========================*/
{
{
ullint
counter_time
;
ullint
counter_time
;
ulint
n_evicted
=
0
;
++
srv_main_idle_loops
;
++
srv_main_idle_loops
;
...
@@ -3010,7 +3014,9 @@ srv_master_do_idle_tasks(void)
...
@@ -3010,7 +3014,9 @@ srv_master_do_idle_tasks(void)
}
}
srv_main_thread_op_info
=
"enforcing dict cache limit"
;
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_INC_TIME_IN_MICRO_SECS
(
MONITOR_SRV_DICT_LRU_MICROSECOND
,
counter_time
);
MONITOR_SRV_DICT_LRU_MICROSECOND
,
counter_time
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment