Appendix C: Configuring MySQL for Relaxed Durability
This appendix describes how to configure MySQL to improve its performance and thus, the License Manager performance. This configuration is optional, but may be useful if performance becomes an issue.
The default MySQL configuration is ACID-compliant - that is, it satisfies the requirements for Atomicity, Consistency, Isolation and Durability. To ensure the durability requirement, MySQL enforces a sync to disk after each SQL transaction.
With a high server load, this requirement has a strong impact on performance. You can consider configuring MySQL to relax the durability requirement, to have only one sync to disk per second. The consequence of relaxing the durability requirement is as follows:
>Negative impact: In the event the MySQL server fails, the database may lose transactions that occurred during the last second. For example, a license detach may be not recorded, and the user may get a free detach.
>Positive impact: Transactions that require a write to the database may complete up to 10 times faster.
To test the relaxed durability configuration at runtime:
> Run the following SQL snipset:
SET GLOBAL innodb_flush_log_at_trx_commit=0; SET GLOBAL sync_binlog=0;
To restore the default configuration:
>Run:
SET GLOBAL innodb_flush_log_at_trx_commit=1; SET GLOBAL sync_binlog=1;
To make the relaxed durability configuration permanent:
1.Add the following to /etc/mysql/mysql.cnf:
[mysqld] innodb_flush_log_at_trx_commit=0 sync_binlog=0
2.Restart MySQL with:
sudo systemctl restart mysql