Commit 4e1bf2bb authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-28537 Unused or useless InnoDB counters num_index_pages_written, num_non_index_pages_written

The counters were added in commit 5e55d1ce
and any code to update them was
inadvertently removed in commit 2e814d47
when applying InnoDB changes from MySQL 5.7.

Let us remove these counters that never reported anything useful. If such
statistics are really needed in a special case, they can be obtained by
instrumenting the code by some means, such as eBPF or a source code patch.
parent 730eb1c4
...@@ -71,8 +71,6 @@ buffer_pool_bytes_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL ...@@ -71,8 +71,6 @@ buffer_pool_bytes_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL
buffer_pool_pages_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Buffer pages currently free (innodb_buffer_pool_pages_free) buffer_pool_pages_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Buffer pages currently free (innodb_buffer_pool_pages_free)
buffer_pages_created buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages created (innodb_pages_created) buffer_pages_created buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages created (innodb_pages_created)
buffer_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages written (innodb_pages_written) buffer_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages written (innodb_pages_written)
buffer_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of index pages written (innodb_index_pages_written)
buffer_non_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of non index pages written (innodb_non_index_pages_written)
buffer_pages_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages read (innodb_pages_read) buffer_pages_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages read (innodb_pages_read)
buffer_pages0_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of page 0 read (innodb_pages0_read) buffer_pages0_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of page 0 read (innodb_pages0_read)
buffer_index_sec_rec_cluster_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads triggered cluster read buffer_index_sec_rec_cluster_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads triggered cluster read
......
...@@ -36,8 +36,6 @@ buffer_pool_bytes_dirty disabled ...@@ -36,8 +36,6 @@ buffer_pool_bytes_dirty disabled
buffer_pool_pages_free disabled buffer_pool_pages_free disabled
buffer_pages_created disabled buffer_pages_created disabled
buffer_pages_written disabled buffer_pages_written disabled
buffer_index_pages_written disabled
buffer_non_index_pages_written disabled
buffer_pages_read disabled buffer_pages_read disabled
buffer_pages0_read disabled buffer_pages0_read disabled
buffer_index_sec_rec_cluster_reads disabled buffer_index_sec_rec_cluster_reads disabled
......
...@@ -1142,10 +1142,6 @@ static SHOW_VAR innodb_status_variables[]= { ...@@ -1142,10 +1142,6 @@ static SHOW_VAR innodb_status_variables[]= {
/* Status variables for page compression */ /* Status variables for page compression */
{"page_compression_saved", {"page_compression_saved",
(char*) &export_vars.innodb_page_compression_saved, SHOW_LONGLONG}, (char*) &export_vars.innodb_page_compression_saved, SHOW_LONGLONG},
{"num_index_pages_written",
(char*) &export_vars.innodb_index_pages_written, SHOW_LONGLONG},
{"num_non_index_pages_written",
(char*) &export_vars.innodb_non_index_pages_written, SHOW_LONGLONG},
{"num_pages_page_compressed", {"num_pages_page_compressed",
(char*) &export_vars.innodb_pages_page_compressed, SHOW_LONGLONG}, (char*) &export_vars.innodb_pages_page_compressed, SHOW_LONGLONG},
{"num_page_compressed_trim_op", {"num_page_compressed_trim_op",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Copyright (c) 2010, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2010, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc. Copyright (c) 2012, Facebook Inc.
Copyright (c) 2013, 2020, MariaDB Corporation. Copyright (c) 2013, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by the
...@@ -174,8 +174,6 @@ enum monitor_id_t { ...@@ -174,8 +174,6 @@ enum monitor_id_t {
MONITOR_OVLD_BUF_POOL_PAGES_FREE, MONITOR_OVLD_BUF_POOL_PAGES_FREE,
MONITOR_OVLD_PAGE_CREATED, MONITOR_OVLD_PAGE_CREATED,
MONITOR_OVLD_PAGES_WRITTEN, MONITOR_OVLD_PAGES_WRITTEN,
MONITOR_OVLD_INDEX_PAGES_WRITTEN,
MONITOR_OVLD_NON_INDEX_PAGES_WRITTEN,
MONITOR_OVLD_PAGES_READ, MONITOR_OVLD_PAGES_READ,
MONITOR_OVLD_PAGES0_READ, MONITOR_OVLD_PAGES0_READ,
MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS, MONITOR_OVLD_INDEX_SEC_REC_CLUSTER_READS,
......
...@@ -109,10 +109,6 @@ struct srv_stats_t ...@@ -109,10 +109,6 @@ struct srv_stats_t
/** Number of bytes saved by page compression */ /** Number of bytes saved by page compression */
ulint_ctr_64_t page_compression_saved; ulint_ctr_64_t page_compression_saved;
/* Number of index pages written */
ulint_ctr_64_t index_pages_written;
/* Number of non index pages written */
ulint_ctr_64_t non_index_pages_written;
/* Number of pages compressed with page compression */ /* Number of pages compressed with page compression */
ulint_ctr_64_t pages_page_compressed; ulint_ctr_64_t pages_page_compressed;
/* Number of TRIM operations induced by page compression */ /* Number of TRIM operations induced by page compression */
...@@ -1030,10 +1026,6 @@ struct export_var_t{ ...@@ -1030,10 +1026,6 @@ struct export_var_t{
int64_t innodb_page_compression_saved;/*!< Number of bytes saved int64_t innodb_page_compression_saved;/*!< Number of bytes saved
by page compression */ by page compression */
int64_t innodb_index_pages_written; /*!< Number of index pages
written */
int64_t innodb_non_index_pages_written; /*!< Number of non index pages
written */
int64_t innodb_pages_page_compressed;/*!< Number of pages int64_t innodb_pages_page_compressed;/*!< Number of pages
compressed by page compression */ compressed by page compression */
int64_t innodb_page_compressed_trim_op;/*!< Number of TRIM operations int64_t innodb_page_compressed_trim_op;/*!< Number of TRIM operations
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc. Copyright (c) 2012, Facebook Inc.
Copyright (c) 2013, 2018, MariaDB Corporation. Copyright (c) 2013, 2022, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -280,18 +280,6 @@ static monitor_info_t innodb_counter_info[] = ...@@ -280,18 +280,6 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_EXISTING | MONITOR_DEFAULT_ON), MONITOR_EXISTING | MONITOR_DEFAULT_ON),
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_WRITTEN}, MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_WRITTEN},
{"buffer_index_pages_written", "buffer",
"Number of index pages written (innodb_index_pages_written)",
static_cast<monitor_type_t>(
MONITOR_EXISTING | MONITOR_DEFAULT_ON),
MONITOR_DEFAULT_START, MONITOR_OVLD_INDEX_PAGES_WRITTEN},
{"buffer_non_index_pages_written", "buffer",
"Number of non index pages written (innodb_non_index_pages_written)",
static_cast<monitor_type_t>(
MONITOR_EXISTING | MONITOR_DEFAULT_ON),
MONITOR_DEFAULT_START, MONITOR_OVLD_NON_INDEX_PAGES_WRITTEN},
{"buffer_pages_read", "buffer", {"buffer_pages_read", "buffer",
"Number of pages read (innodb_pages_read)", "Number of pages read (innodb_pages_read)",
static_cast<monitor_type_t>( static_cast<monitor_type_t>(
...@@ -1732,16 +1720,6 @@ srv_mon_process_existing_counter( ...@@ -1732,16 +1720,6 @@ srv_mon_process_existing_counter(
value = stat.n_pages_written; value = stat.n_pages_written;
break; break;
/* innodb_index_pages_written, the number of index pages written */
case MONITOR_OVLD_INDEX_PAGES_WRITTEN:
value = srv_stats.index_pages_written;
break;
/* innodb_non_index_pages_written, the number of non index pages written */
case MONITOR_OVLD_NON_INDEX_PAGES_WRITTEN:
value = srv_stats.non_index_pages_written;
break;
/* innodb_pages_read */ /* innodb_pages_read */
case MONITOR_OVLD_PAGES_READ: case MONITOR_OVLD_PAGES_READ:
buf_get_total_stat(&stat); buf_get_total_stat(&stat);
......
...@@ -1575,8 +1575,6 @@ srv_export_innodb_status(void) ...@@ -1575,8 +1575,6 @@ srv_export_innodb_status(void)
export_vars.innodb_available_undo_logs = srv_available_undo_logs; export_vars.innodb_available_undo_logs = srv_available_undo_logs;
export_vars.innodb_page_compression_saved = srv_stats.page_compression_saved; export_vars.innodb_page_compression_saved = srv_stats.page_compression_saved;
export_vars.innodb_index_pages_written = srv_stats.index_pages_written;
export_vars.innodb_non_index_pages_written = srv_stats.non_index_pages_written;
export_vars.innodb_pages_page_compressed = srv_stats.pages_page_compressed; export_vars.innodb_pages_page_compressed = srv_stats.pages_page_compressed;
export_vars.innodb_page_compressed_trim_op = srv_stats.page_compressed_trim_op; export_vars.innodb_page_compressed_trim_op = srv_stats.page_compressed_trim_op;
export_vars.innodb_pages_page_decompressed = srv_stats.pages_page_decompressed; export_vars.innodb_pages_page_decompressed = srv_stats.pages_page_decompressed;
......
...@@ -53,8 +53,6 @@ buffer_pool_bytes_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL ...@@ -53,8 +53,6 @@ buffer_pool_bytes_dirty buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL
buffer_pool_pages_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Buffer pages currently free (innodb_buffer_pool_pages_free) buffer_pool_pages_free buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled value Buffer pages currently free (innodb_buffer_pool_pages_free)
buffer_pages_created buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages created (innodb_pages_created) buffer_pages_created buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages created (innodb_pages_created)
buffer_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages written (innodb_pages_written) buffer_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages written (innodb_pages_written)
buffer_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of index pages written (innodb_index_pages_written)
buffer_non_index_pages_written buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of non index pages written (innodb_non_index_pages_written)
buffer_pages_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages read (innodb_pages_read) buffer_pages_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of pages read (innodb_pages_read)
buffer_pages0_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of page 0 read (innodb_pages0_read) buffer_pages0_read buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of page 0 read (innodb_pages0_read)
buffer_index_sec_rec_cluster_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads triggered cluster read buffer_index_sec_rec_cluster_reads buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled status_counter Number of secondary record reads triggered cluster read
......
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