Improve InnoDB purge: reduce context switching, better work distribution
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.
Showing
This diff is collapsed.
Please register or sign in to comment