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 commit685d958e38
(MDEV-14425). This counter was rather meaningless already since commit30ea63b7d2
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:
@ -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_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_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_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_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_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)
|
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)
|
||||||
|
@ -146,7 +146,6 @@ log_lsn_current disabled
|
|||||||
log_lsn_checkpoint_age disabled
|
log_lsn_checkpoint_age disabled
|
||||||
log_lsn_buf_pool_oldest disabled
|
log_lsn_buf_pool_oldest disabled
|
||||||
log_max_modified_age_async disabled
|
log_max_modified_age_async disabled
|
||||||
log_num_log_io disabled
|
|
||||||
log_waits disabled
|
log_waits disabled
|
||||||
log_write_requests disabled
|
log_write_requests disabled
|
||||||
log_writes disabled
|
log_writes disabled
|
||||||
|
@ -99,11 +99,6 @@ void
|
|||||||
log_print(
|
log_print(
|
||||||
/*======*/
|
/*======*/
|
||||||
FILE* file); /*!< in: file where to 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 */
|
/** Offsets of a log file header */
|
||||||
/* @{ */
|
/* @{ */
|
||||||
@ -240,16 +235,6 @@ public:
|
|||||||
/** Log file */
|
/** Log file */
|
||||||
log_file_t log;
|
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 @{ */
|
/** Fields involved in checkpoints @{ */
|
||||||
lsn_t log_capacity; /*!< capacity of the log; if
|
lsn_t log_capacity; /*!< capacity of the log; if
|
||||||
the checkpoint age exceeds this, it is
|
the checkpoint age exceeds this, it is
|
||||||
|
@ -304,7 +304,6 @@ enum monitor_id_t {
|
|||||||
MONITOR_LSN_CHECKPOINT_AGE,
|
MONITOR_LSN_CHECKPOINT_AGE,
|
||||||
MONITOR_OVLD_BUF_OLDEST_LSN,
|
MONITOR_OVLD_BUF_OLDEST_LSN,
|
||||||
MONITOR_OVLD_MAX_AGE_ASYNC,
|
MONITOR_OVLD_MAX_AGE_ASYNC,
|
||||||
MONITOR_LOG_IO,
|
|
||||||
MONITOR_OVLD_LOG_WAITS,
|
MONITOR_OVLD_LOG_WAITS,
|
||||||
MONITOR_OVLD_LOG_WRITE_REQUEST,
|
MONITOR_OVLD_LOG_WRITE_REQUEST,
|
||||||
MONITOR_OVLD_LOG_WRITES,
|
MONITOR_OVLD_LOG_WRITES,
|
||||||
|
@ -126,12 +126,7 @@ void log_t::create()
|
|||||||
max_buf_free= buf_size / LOG_BUF_FLUSH_RATIO - LOG_BUF_FLUSH_MARGIN;
|
max_buf_free= buf_size / LOG_BUF_FLUSH_RATIO - LOG_BUF_FLUSH_MARGIN;
|
||||||
set_check_flush_or_checkpoint();
|
set_check_flush_or_checkpoint();
|
||||||
|
|
||||||
n_log_ios_old= n_log_ios;
|
|
||||||
last_printout_time= time(NULL);
|
|
||||||
|
|
||||||
last_checkpoint_lsn= FIRST_LSN;
|
last_checkpoint_lsn= FIRST_LSN;
|
||||||
n_log_ios= 0;
|
|
||||||
n_log_ios_old= 0;
|
|
||||||
log_capacity= 0;
|
log_capacity= 0;
|
||||||
max_modified_age_async= 0;
|
max_modified_age_async= 0;
|
||||||
max_checkpoint_age= 0;
|
max_checkpoint_age= 0;
|
||||||
@ -1007,9 +1002,6 @@ log_print(
|
|||||||
/*======*/
|
/*======*/
|
||||||
FILE* file) /*!< in: file where to print */
|
FILE* file) /*!< in: file where to print */
|
||||||
{
|
{
|
||||||
double time_elapsed;
|
|
||||||
time_t current_time;
|
|
||||||
|
|
||||||
log_sys.latch.rd_lock(SRW_LOCK_CALL);
|
log_sys.latch.rd_lock(SRW_LOCK_CALL);
|
||||||
|
|
||||||
const lsn_t lsn= log_sys.get_lsn();
|
const lsn_t lsn= log_sys.get_lsn();
|
||||||
@ -1027,40 +1019,9 @@ log_print(
|
|||||||
pages_flushed,
|
pages_flushed,
|
||||||
lsn_t{log_sys.last_checkpoint_lsn});
|
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();
|
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. */
|
/** Shut down the redo log subsystem. */
|
||||||
void log_t::close()
|
void log_t::close()
|
||||||
{
|
{
|
||||||
|
@ -3546,7 +3546,6 @@ static bool recv_scan_log(bool last_phase)
|
|||||||
if (source_offset + size > log_sys.file_size)
|
if (source_offset + size > log_sys.file_size)
|
||||||
size= static_cast<size_t>(log_sys.file_size - source_offset);
|
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,
|
if (dberr_t err= log_sys.log.read(source_offset,
|
||||||
{log_sys.buf + recv_sys.len, size}))
|
{log_sys.buf + recv_sys.len, size}))
|
||||||
{
|
{
|
||||||
|
@ -800,11 +800,6 @@ static monitor_info_t innodb_counter_info[] =
|
|||||||
MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT),
|
MONITOR_EXISTING | MONITOR_DISPLAY_CURRENT),
|
||||||
MONITOR_DEFAULT_START, MONITOR_OVLD_MAX_AGE_ASYNC},
|
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",
|
{"log_waits", "recovery",
|
||||||
"Number of log waits due to small log buffer (innodb_log_waits)",
|
"Number of log waits due to small log buffer (innodb_log_waits)",
|
||||||
static_cast<monitor_type_t>(
|
static_cast<monitor_type_t>(
|
||||||
@ -1706,10 +1701,6 @@ srv_mon_process_existing_counter(
|
|||||||
value = log_sys.get_lsn();
|
value = log_sys.get_lsn();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MONITOR_LOG_IO:
|
|
||||||
value = log_sys.n_log_ios;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MONITOR_OVLD_CHECKPOINTS:
|
case MONITOR_OVLD_CHECKPOINTS:
|
||||||
value = log_sys.next_checkpoint_no;
|
value = log_sys.next_checkpoint_no;
|
||||||
break;
|
break;
|
||||||
|
@ -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;
|
btr_cur_n_non_sea_old = btr_cur_n_non_sea;
|
||||||
#endif /* BTR_CUR_HASH_ADAPT */
|
#endif /* BTR_CUR_HASH_ADAPT */
|
||||||
|
|
||||||
log_refresh_stats();
|
|
||||||
|
|
||||||
buf_refresh_io_stats();
|
buf_refresh_io_stats();
|
||||||
|
|
||||||
srv_n_rows_inserted_old = srv_stats.n_rows_inserted;
|
srv_n_rows_inserted_old = srv_stats.n_rows_inserted;
|
||||||
|
@ -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_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_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_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_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_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)
|
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)
|
||||||
|
Reference in New Issue
Block a user