• Marko Mäkelä's avatar
    MDEV-29401 InnoDB history list length increased in 10.6 compared to 10.5 · 4a668c18
    Marko Mäkelä authored
    The InnoDB buffer pool and locking were heavily refactored in
    MariaDB Server 10.6. Among other things, dict_sys.mutex was removed,
    and the contended lock_sys.mutex was replaced with a combination of
    lock_sys.latch and distributed latches in hash tables. Also, a
    default value was changed to innodb_flush_method=O_DIRECT to improve
    performance in write-heavy workloads.
    
    One thing where an adjustment was missing is around the parameters
    innodb_max_purge_lag (number of committed transactions waiting to
    be purged), and innodb_max_purge_lag_delay
    (maximum number of microseconds to delay a DML operation).
    
    purge_coordinator_state::do_purge(): Pass the history_size to trx_purge()
    and reset srv_dml_needed_delay if the history is empty.
    Keep executing the loop non-stop as long as srv_dml_needed_delay is set.
    
    trx_purge_dml_delay(): Made part of trx_purge().
    Set srv_dml_needed_delay=0 when nothing can be purged (!n_pages_handled).
    
    row_mysql_delay_if_needed(): Mimic the logic of
    innodb_max_purge_lag_wait_update().
    
    Reviewed by: Thirunarayanan Balathandayuthapani
    4a668c18
srv0mon.cc 62.9 KB