summaryrefslogtreecommitdiff
path: root/storage/innobase/srv/srv0mon.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-03-09 08:29:38 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-03-09 09:05:26 +0200
commit78284a4c115f26643e3af510fe9160fd44c39799 (patch)
treec5bd848a70b4249760893bab0a6ba1fdddf09b1b /storage/innobase/srv/srv0mon.cc
parentd317350a76ecdacad4594b14d608455181bea2d9 (diff)
downloadmariadb-git-78284a4c115f26643e3af510fe9160fd44c39799.tar.gz
MDEV-25085: Simplify instrumentation for LRU eviction
Let us add the status variable innodb_buffer_pool_pages_LRU_freed to monitor the number of pages that were freed by a buffer pool LRU eviction scan, without flushing. Also, let us simplify the monitor interface: MONITOR_LRU_BATCH_FLUSH_COUNT, MONITOR_LRU_BATCH_FLUSH_PAGES, MONITOR_LRU_BATCH_EVICT_COUNT, MONITOR_LRU_BATCH_EVICT_PAGES: Remove. MONITOR_LRU_BATCH_FLUSH_TOTAL_PAGE: Track buf_lru_flush_page_count (innodb_buffer_pool_pages_LRU_flushed). MONITOR_LRU_BATCH_EVICT_TOTAL_PAGE: Track buf_lru_freed_page_count (buffer_pool_pages_LRU_freed). Reviewed by: Vladislav Vaintroub
Diffstat (limited to 'storage/innobase/srv/srv0mon.cc')
-rw-r--r--storage/innobase/srv/srv0mon.cc38
1 files changed, 14 insertions, 24 deletions
diff --git a/storage/innobase/srv/srv0mon.cc b/storage/innobase/srv/srv0mon.cc
index 3126c098ba9..b10c07a192f 100644
--- a/storage/innobase/srv/srv0mon.cc
+++ b/storage/innobase/srv/srv0mon.cc
@@ -495,34 +495,16 @@ static monitor_info_t innodb_counter_info[] =
/* Cumulative counter for LRU batch pages flushed */
{"buffer_LRU_batch_flush_total_pages", "buffer",
"Total pages flushed as part of LRU batches",
- MONITOR_SET_OWNER, MONITOR_LRU_BATCH_FLUSH_COUNT,
- MONITOR_LRU_BATCH_FLUSH_TOTAL_PAGE},
-
- {"buffer_LRU_batches_flush", "buffer",
- "Number of LRU batches",
- MONITOR_SET_MEMBER, MONITOR_LRU_BATCH_FLUSH_TOTAL_PAGE,
- MONITOR_LRU_BATCH_FLUSH_COUNT},
-
- {"buffer_LRU_batch_flush_pages", "buffer",
- "Pages queued as an LRU batch",
- MONITOR_SET_MEMBER, MONITOR_LRU_BATCH_FLUSH_TOTAL_PAGE,
- MONITOR_LRU_BATCH_FLUSH_PAGES},
+ static_cast<monitor_type_t>(
+ MONITOR_EXISTING | MONITOR_DEFAULT_ON),
+ MONITOR_DEFAULT_START, MONITOR_LRU_BATCH_FLUSH_TOTAL_PAGE},
/* Cumulative counter for LRU batch pages flushed */
{"buffer_LRU_batch_evict_total_pages", "buffer",
"Total pages evicted as part of LRU batches",
- MONITOR_SET_OWNER, MONITOR_LRU_BATCH_EVICT_COUNT,
- MONITOR_LRU_BATCH_EVICT_TOTAL_PAGE},
-
- {"buffer_LRU_batches_evict", "buffer",
- "Number of LRU batches",
- MONITOR_SET_MEMBER, MONITOR_LRU_BATCH_EVICT_TOTAL_PAGE,
- MONITOR_LRU_BATCH_EVICT_COUNT},
-
- {"buffer_LRU_batch_evict_pages", "buffer",
- "Pages queued as an LRU batch",
- MONITOR_SET_MEMBER, MONITOR_LRU_BATCH_EVICT_TOTAL_PAGE,
- MONITOR_LRU_BATCH_EVICT_PAGES},
+ static_cast<monitor_type_t>(
+ MONITOR_EXISTING | MONITOR_DEFAULT_ON),
+ MONITOR_DEFAULT_START, MONITOR_LRU_BATCH_EVICT_TOTAL_PAGE},
{"buffer_LRU_single_flush_failure_count", "Buffer",
"Number of times attempt to flush a single page from LRU failed",
@@ -1575,6 +1557,14 @@ srv_mon_process_existing_counter(
value = srv_stats.non_index_pages_written;
break;
+ case MONITOR_LRU_BATCH_FLUSH_TOTAL_PAGE:
+ value = buf_lru_flush_page_count;
+ break;
+
+ case MONITOR_LRU_BATCH_EVICT_TOTAL_PAGE:
+ value = buf_lru_freed_page_count;
+ break;
+
/* innodb_pages_read */
case MONITOR_OVLD_PAGES_READ:
value = buf_pool.stat.n_pages_read;