1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-27917 Some redo log diagnostics is always reported as 0

The InnoDB monitor counter log_sys.n_log_ios was almost removed
in commit 685d958e38 (MDEV-14425).
This counter was rather meaningless already since
commit 30ea63b7d2
introduced a redo log group commit mechanism, and on the persistent
memory interface there are no file system calls that could be counted.

The only case when log_sys.n_log_ios was updated is when the log file
was being read during crash recovery.

Some related output in log_print() as well as the
information_schema.innodb_metrics counter log_num_log_io are best removed.
This commit is contained in:
Marko Mäkelä
2022-02-22 18:56:21 +02:00
parent 30b036d729
commit 934b2d605e
9 changed files with 0 additions and 70 deletions

View File

@ -180,7 +180,6 @@ log_lsn_current recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0
log_lsn_checkpoint_age recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Current LSN value minus LSN at last checkpoint
log_lsn_buf_pool_oldest recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value The oldest modified block LSN in the buffer pool
log_max_modified_age_async recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Maximum LSN difference; when exceeded, start asynchronous preflush
log_num_log_io recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Number of log I/Os
log_waits recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of log waits due to small log buffer (innodb_log_waits)
log_write_requests recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of log write requests (innodb_log_write_requests)
log_writes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of log writes (innodb_log_writes)

View File

@ -146,7 +146,6 @@ log_lsn_current disabled
log_lsn_checkpoint_age disabled
log_lsn_buf_pool_oldest disabled
log_max_modified_age_async disabled
log_num_log_io disabled
log_waits disabled
log_write_requests disabled
log_writes disabled

View File

@ -99,11 +99,6 @@ void
log_print(
/*======*/
FILE* file); /*!< in: file where to print */
/**********************************************************************//**
Refreshes the statistics used to print per-second averages. */
void
log_refresh_stats(void);
/*===================*/
/** Offsets of a log file header */
/* @{ */
@ -240,16 +235,6 @@ public:
/** Log file */
log_file_t log;
/** The fields involved in the log buffer flush @{ */
ulint n_log_ios; /*!< number of log i/os initiated thus
far */
ulint n_log_ios_old; /*!< number of log i/o's at the
previous printout */
time_t last_printout_time;/*!< when log_print was last time
called */
/* @} */
/** Fields involved in checkpoints @{ */
lsn_t log_capacity; /*!< capacity of the log; if
the checkpoint age exceeds this, it is

View File

@ -304,7 +304,6 @@ enum monitor_id_t {
MONITOR_LSN_CHECKPOINT_AGE,
MONITOR_OVLD_BUF_OLDEST_LSN,
MONITOR_OVLD_MAX_AGE_ASYNC,
MONITOR_LOG_IO,
MONITOR_OVLD_LOG_WAITS,
MONITOR_OVLD_LOG_WRITE_REQUEST,
MONITOR_OVLD_LOG_WRITES,

View File

@ -126,12 +126,7 @@ void log_t::create()
max_buf_free= buf_size / LOG_BUF_FLUSH_RATIO - LOG_BUF_FLUSH_MARGIN;
set_check_flush_or_checkpoint();
n_log_ios_old= n_log_ios;
last_printout_time= time(NULL);
last_checkpoint_lsn= FIRST_LSN;
n_log_ios= 0;
n_log_ios_old= 0;
log_capacity= 0;
max_modified_age_async= 0;
max_checkpoint_age= 0;
@ -1007,9 +1002,6 @@ log_print(
/*======*/
FILE* file) /*!< in: file where to print */
{
double time_elapsed;
time_t current_time;
log_sys.latch.rd_lock(SRW_LOCK_CALL);
const lsn_t lsn= log_sys.get_lsn();
@ -1027,40 +1019,9 @@ log_print(
pages_flushed,
lsn_t{log_sys.last_checkpoint_lsn});
current_time = time(NULL);
time_elapsed = difftime(current_time,
log_sys.last_printout_time);
if (time_elapsed <= 0) {
time_elapsed = 1;
}
fprintf(file,
ULINTPF " pending chkp writes\n"
ULINTPF " log i/o's done, %.2f log i/o's/second\n",
log_sys.n_pending_checkpoint_writes,
log_sys.n_log_ios,
static_cast<double>(
log_sys.n_log_ios - log_sys.n_log_ios_old)
/ time_elapsed);
log_sys.n_log_ios_old = log_sys.n_log_ios;
log_sys.last_printout_time = current_time;
log_sys.latch.rd_unlock();
}
/**********************************************************************//**
Refreshes the statistics used to print per-second averages. */
void
log_refresh_stats(void)
/*===================*/
{
log_sys.n_log_ios_old = log_sys.n_log_ios;
log_sys.last_printout_time = time(NULL);
}
/** Shut down the redo log subsystem. */
void log_t::close()
{

View File

@ -3546,7 +3546,6 @@ static bool recv_scan_log(bool last_phase)
if (source_offset + size > log_sys.file_size)
size= static_cast<size_t>(log_sys.file_size - source_offset);
log_sys.n_log_ios++;
if (dberr_t err= log_sys.log.read(source_offset,
{log_sys.buf + recv_sys.len, size}))
{

View File

@ -800,11 +800,6 @@ static monitor_info_t innodb_counter_info[] =
MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT),
MONITOR_DEFAULT_START, MONITOR_OVLD_MAX_AGE_ASYNC},
{"log_num_log_io", "recovery", "Number of log I/Os",
static_cast<monitor_type_t>(
MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT),
MONITOR_DEFAULT_START, MONITOR_LOG_IO},
{"log_waits", "recovery",
"Number of log waits due to small log buffer (innodb_log_waits)",
static_cast<monitor_type_t>(
@ -1706,10 +1701,6 @@ srv_mon_process_existing_counter(
value = log_sys.get_lsn();
break;
case MONITOR_LOG_IO:
value = log_sys.n_log_ios;
break;
case MONITOR_OVLD_CHECKPOINTS:
value = log_sys.next_checkpoint_no;
break;

View File

@ -711,8 +711,6 @@ static void srv_refresh_innodb_monitor_stats(time_t current_time)
btr_cur_n_non_sea_old = btr_cur_n_non_sea;
#endif /* BTR_CUR_HASH_ADAPT */
log_refresh_stats();
buf_refresh_io_stats();
srv_n_rows_inserted_old = srv_stats.n_rows_inserted;

View File

@ -162,7 +162,6 @@ log_lsn_current recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0
log_lsn_checkpoint_age recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Current LSN value minus LSN at last checkpoint
log_lsn_buf_pool_oldest recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value The oldest modified block LSN in the buffer pool
log_max_modified_age_async recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Maximum LSN difference; when exceeded, start asynchronous preflush
log_num_log_io recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 value Number of log I/Os
log_waits recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of log waits due to small log buffer (innodb_log_waits)
log_write_requests recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of log write requests (innodb_log_write_requests)
log_writes recovery 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL 0 status_counter Number of log writes (innodb_log_writes)