• Vladislav Vaintroub's avatar
    Improve InnoDB purge: reduce context switching, better work distribution · 8c547853
    Vladislav Vaintroub authored
    Before this patch, InnoDB purge submitted innodb_purge_threads-1 tasks,
    even if there was insufficient work for all. For example,
    with innodb_purge_threads at the default (4) and updates on a single table, only one thread could work,
    yet three tasks were submitted. This caused unnecessary wakeups and context
    switches.
    
    The patch modifies trx_purge_attach_undo_recs() to create as many work
    items as necessary. The purge coordinator now processes more tasks itself,
    which reduces context switching and improves efficiency.
    8c547853
srv0srv.cc 54.5 KB