MySql 5.7 - Poor Performance PURGE BINARY LOGS
I just completed an upgrade from MySql 5.6.22 to MySql 5.7.11. Since upgrading we are experiencing very poor performance when purging binary logs. Our server is configured with expire_logs_days to 4, max_binlog_size to 1073741824 (1GB). A query to SHOW BINARY LOGS shows that we have 72 binary log files. If I do a PURGE BINARY LOGS TO 'file.00001' and only remove the earliest file the query takes approximately 60 seconds to complete. The same query on 5.6.22 was almost instant (0.02 seconds). I enabled profiling and ran the statement and the results are below. This is without any other queries being performed on this server.
mysql> show profile;
+--------------------+-----------+
| Status | Duration |
+--------------------+-----------+
| starting | 61.612292 |
| query end | 0.000010 |
| closing tables | 0.000004 |
| freeing items | 0.000022 |
| logging slow query | 0.000002 |
| logging slow query | 0.000056 |
| cleaning up | 0.000015 |
+--------------------+-----------+
I am trying to debug what could be causing this but not having much luck. An iostat while running the purge appears that the whole 1GB binary log file is being read. Anyone have suggestions on how to do further tracing to determine the cause of this?
Subject
Views
Written By
Posted
MySql 5.7 - Poor Performance PURGE BINARY LOGS
2669
March 23, 2016 08:08PM
1135
March 26, 2016 11:58PM
1138
March 29, 2016 09:44AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.