EPrints and MySQL 8

From EPrints Documentation
Revision as of 10:51, 6 June 2023 by Drn@ecs.soton.ac.uk (talk | contribs) (Added info about innodb_flush_log_at_trx_commit)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Various changes have been made to MySQL between version 5.7 and 8 and these can have some impact on EPrints.

By default EPrints now uses InnoDB as its table engine. As EPrints can make a lot of transactions to update a eprint record whilst in the workflow, as well as complex background tasks this means the default configuration of MySQL makes EPrints rather slower than before. This can be fixed by adding the following line to /etc/mysql/mysql.conf.d/mysqld.cnf:

innodb_flush_log_at_trx_commit=2

What this change does is ensure the logs are flushed once a second rather than after each transaction commit. This is not ideal as your bin logs could potential miss transactions if the database was to crash but does significantly improve the performance of EPrints. Further investigation is required to determine how serious an impact lost transactions from the bin logs would be for EPrints. At worse this would likely affect only a small number of eprints.