Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16580

Remove unused monitor counters from InnoDB

Details

    Description

      Approximated list is here:

      MONITOR_MODULE_ICP
      MONITOR_MODULE_DDL_STATS
      MONITOR_OLVD_SYSTEM_ROW_READ
      MONITOR_OLVD_SYSTEM_ROW_INSERTED
      MONITOR_OLVD_SYSTEM_ROW_DELETED
      MONITOR_OLVD_SYSTEM_ROW_UPDATED
      MONITOR_OLVD_ROW_READ
      MONITOR_OLVD_ROW_INSERTED
      MONITOR_OLVD_ROW_DELETED
      MONITOR_OLVD_ROW_UPDTATED
      MONITOR_MODULE_DML_STATS
      MONITOR_OVLD_SRV_DBLWR_WRITES
      MONITOR_OVLD_SRV_DBLWR_PAGES_WRITTEN
      MONITOR_OVLD_SRV_PAGE_SIZE
      MONITOR_OVLD_RWLOCK_S_SPIN_WAITS
      MONITOR_OVLD_RWLOCK_X_SPIN_WAITS
      MONITOR_OVLD_RWLOCK_S_SPIN_ROUNDS
      MONITOR_OVLD_RWLOCK_X_SPIN_ROUNDS
      MONITOR_OVLD_RWLOCK_S_OS_WAITS
      MONITOR_OVLD_RWLOCK_X_OS_WAITS
      MONITOR_SRV_PURGE_MICROSECOND
      MONITOR_OVLD_SERVER_ACTIVITY
      MONITOR_MODULE_SERVER
      MONITOR_OVLD_IBUF_MERGE_PURGE
      MONITOR_OVLD_IBUF_MERGE_DISCARD_INSERT
      MONITOR_OVLD_IBUF_MERGE_DISCARD_DELETE
      MONITOR_OVLD_IBUF_MERGE_DISCARD_PURGE
      MONITOR_OVLD_IBUF_MERGES
      MONITOR_OVLD_IBUF_SIZE
      MONITOR_MODULE_FIL_SYSTEM
      MONITOR_OVLD_N_FILE_OPENED
      MONITOR_MODULE_IBUF_SYSTEM
      MONITOR_OVLD_IBUF_MERGE_INSERT
      MONITOR_OVLD_IBUF_MERGE_DELETE
      MONITOR_MODULE_ADAPTIVE_HASH
      MONITOR_OVLD_ADAPTIVE_HASH_SEARCH
      MONITOR_OVLD_ADAPTIVE_HASH_SEARCH_BTREE
      MONITOR_MODULE_INDEX
      MONITOR_MODULE_PAGE
      MONITOR_OVLD_LOG_WAITS
      MONITOR_OVLD_LOG_WRITE_REQUEST
      MONITOR_OVLD_LOG_WRITES
      MONITOR_OVLD_BUF_OLDEST_LSN
      MONITOR_OVLD_MAX_AGE_ASYNC
      MONITOR_OVLD_MAX_AGE_SYNC
      MONITOR_OVLD_LSN_FLUSHDISK
      MONITOR_OVLD_LSN_CHECKPOINT
      MONITOR_OVLD_LSN_CURRENT
      MONITOR_MODULE_RECOVERY
      MONITOR_MODULE_PURGE
      MONITOR_RSEG_CUR_SIZE
      MONITOR_RSEG_HISTORY_LEN
      MONITOR_TRX_ROLLBACK_ACTIVE
      MONITOR_OVLD_OS_LOG_FSYNC
      MONITOR_OVLD_OS_LOG_PENDING_FSYNC
      MONITOR_OVLD_OS_LOG_PENDING_WRITES
      MONITOR_MODULE_TRX
      MONITOR_OVLD_OS_LOG_WRITTEN
      MONITOR_OVLD_OS_FILE_READ
      MONITOR_OVLD_OS_FILE_WRITE
      MONITOR_OVLD_OS_FSYNC
      MONITOR_OVLD_PAGE_CREATED
      MONITOR_OVLD_PAGES_WRITTEN
      MONITOR_OVLD_PAGES_READ
      MONITOR_OVLD_BYTE_READ
      MONITOR_OVLD_BYTE_WRITTEN
      MONITOR_OVLD_BUF_POOL_PAGE_MISC
      MONITOR_OVLD_BUF_POOL_PAGES_DATA
      MONITOR_OVLD_BUF_POOL_BYTES_DATA
      MONITOR_OVLD_BUF_POOL_PAGES_DIRTY
      MONITOR_OVLD_BUF_POOL_BYTES_DIRTY
      MONITOR_OVLD_BUF_POOL_PAGES_FREE
      MONITOR_OVLD_BUF_POOL_READ_REQUESTS
      MONITOR_OVLD_BUF_POOL_WRITE_REQUEST
      MONITOR_OVLD_BUF_POOL_WAIT_FREE
      MONITOR_OVLD_BUF_POOL_READ_AHEAD
      MONITOR_OVLD_BUF_POOL_READ_AHEAD_EVICTED
      MONITOR_OVLD_BUF_POOL_PAGE_TOTAL
      MONITOR_OVLD_LOCK_MAX_WAIT_TIME
      MONITOR_OVLD_ROW_LOCK_WAIT
      MONITOR_OVLD_LOCK_AVG_WAIT_TIME
      MONITOR_MODULE_BUFFER
      MONITOR_OVLD_BUFFER_POOL_SIZE
      MONITOR_OVLD_BUF_POOL_READS
      MONITOR_OVLD_ROW_LOCK_CURRENT_WAIT
      MONITOR_OVLD_LOCK_WAIT_TIME
      MONITOR_OVLD_META_MEM_POOL
      MONITOR_MODULE_LOCK
      MONITOR_MODULE_METADATA
      

      Attachments

        Issue Links

          Activity

            Most of listed enum values actually used somewhere. Totally unused and safe for removal is MONITOR_TRX_ROLLBACK_ACTIVE - its value is always 0.
            Some of listed values are not tested:

            MONITOR_MODULE_SERVER
            MONITOR_MODULE_IBUF_SYSTEM
            MONITOR_MODULE_FIL_SYSTEM
            MONITOR_MODULE_ADAPTIVE_HASH
            MONITOR_MODULE_INDEX
            MONITOR_MODULE_PAGE
            MONITOR_MODULE_LOCK
            

            They should be at least mentioned in tests.

            A lot of monitors checked only in this test https://github.com/MariaDB/server/blob/10.4/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result

            And most of them have default values of 0. It can be time consuming to add tests for every monitor to see it non-zero. Thus, I propose just to remove totally unused one and mentions the rest in tests.

            kevg Eugene Kosov (Inactive) added a comment - Most of listed enum values actually used somewhere. Totally unused and safe for removal is MONITOR_TRX_ROLLBACK_ACTIVE - its value is always 0. Some of listed values are not tested: MONITOR_MODULE_SERVER MONITOR_MODULE_IBUF_SYSTEM MONITOR_MODULE_FIL_SYSTEM MONITOR_MODULE_ADAPTIVE_HASH MONITOR_MODULE_INDEX MONITOR_MODULE_PAGE MONITOR_MODULE_LOCK They should be at least mentioned in tests. A lot of monitors checked only in this test https://github.com/MariaDB/server/blob/10.4/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result And most of them have default values of 0. It can be time consuming to add tests for every monitor to see it non-zero. Thus, I propose just to remove totally unused one and mentions the rest in tests.

            Ideally, we should have actual test coverage of all the counters (that they are being incremented). This would also help the follow-up task MDEV-15706.

            I am reassigning the review, so that this can be pushed while I am on vacation.

            marko Marko Mäkelä added a comment - Ideally, we should have actual test coverage of all the counters (that they are being incremented). This would also help the follow-up task MDEV-15706 . I am reassigning the review, so that this can be pushed while I am on vacation.

            Adding this to some test will increase code coverage slightly:

            SET GLOBAL innodb_monitor_disable=module_purge;
            SET GLOBAL innodb_monitor_disable=module_log;
            SET GLOBAL innodb_monitor_disable=module_icp;
            SET GLOBAL innodb_monitor_disable=module_lock;
            SET GLOBAL innodb_monitor_disable=module_compress;
            SET GLOBAL innodb_monitor_disable=module_index;
            SET GLOBAL innodb_monitor_disable=module_adaptive_hash;
            SET GLOBAL innodb_monitor_disable=module_file;
            SET GLOBAL innodb_monitor_disable=module_ibuf_system;
            SET GLOBAL innodb_monitor_disable=module_innodb;
            

            kevg Eugene Kosov (Inactive) added a comment - Adding this to some test will increase code coverage slightly: SET GLOBAL innodb_monitor_disable=module_purge; SET GLOBAL innodb_monitor_disable=module_log; SET GLOBAL innodb_monitor_disable=module_icp; SET GLOBAL innodb_monitor_disable=module_lock; SET GLOBAL innodb_monitor_disable=module_compress; SET GLOBAL innodb_monitor_disable=module_index; SET GLOBAL innodb_monitor_disable=module_adaptive_hash; SET GLOBAL innodb_monitor_disable=module_file; SET GLOBAL innodb_monitor_disable=module_ibuf_system; SET GLOBAL innodb_monitor_disable=module_innodb;

            I filed the follow-up task MDEV-17732 for improving the coverage of the remaining counters.

            marko Marko Mäkelä added a comment - I filed the follow-up task MDEV-17732 for improving the coverage of the remaining counters.

            People

              thiru Thirunarayanan Balathandayuthapani
              kevg Eugene Kosov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.