MySQL 5.7 slow with Bacula 7.4
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bacula (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Nish Aravamudan |
Bug Description
[Impact]
* Bacula users migrating from earlier versions of MySQL e.g. 14.04 -> 16.04 experience a significant performance degradation if using the MySQL backend.
* The fix (from upstream) is to build bacula with the knowledge that MySQL is thread-safe.
[Test Case]
* Run the acl-xattr-test and action-
[Regression Potential]
* This fix is a performance consideration, and should not lead to any change in functionality.
---
This is not really a bug report, rather it is a performance concern.
I am running a standard Ubuntu 16.04 64 bit desktop installation. On this system, I have built a Bacula 7.4 and I have installed PostgreSQL and MySQL both are "out of the box".
PostgreSQL performs as expected with Bacula.
MySQL 5.7, however, is 10 times slower than PostgreSQL and *possibly* 100% slower than prior versions of MySQL. When MySQL is running, the disk is making a typical thrashing sound (i.e. lots of accesses). This is as if MySQL has by default fsync enabled after every database update.
Below, I show the first two Bacula regression tests for MySQL then for PostgreSQL.
The point here is that MySQL out of the box does not perform "well". Comparison between the two different versions run on different machines so may not be totally valid. On the other hand, a difference in speed of a factor of 10 between MySQL and Postgres is remarkable. Note only a part of the time is actually consumed by the database thus the real difference in the database speeds is larger.
I suggest that we cannot expect most users to be able to tune MySQL and that the out of the box performance ideally would be somewhat equivalent to PostgreSQL.
Ubuntu 16.04:
For MySQL 5.7 the tests take: 239 seconds and 822 seconds to run.
For Postgres 9.5 the tests take: 23 seconds and 81 seconds to run
Ubuntu 14.04 (a different machine from the above)
For MySQL 5.5 the tests take: 115 seconds and 393 seconds to run.
For Postgres 9.3 the tests take: 23 seconds and 76 seconds to run
MySQL 5.7 tests for Ubuntu 16.04:
Start non-root disk tests
=== Starting acl-xattr-test at 09:52:46 ===
===== acl-xattr-test OK 09:56:46 00:03:59 239s =====
=== Starting action-
===== action-
PostgreSQL tests:
Start non-root disk tests
=== Starting acl-xattr-test at 10:13:21 ===
===== acl-xattr-test OK 10:13:45 00:00:23 23s =====
=== Starting action-
===== action-
tags: | added: mysql-5.7-transition |
Changed in mysql-5.7 (Ubuntu): | |
assignee: | nobody → Lars Tangvald (lars-tangvald) |
Changed in bacula (Ubuntu): | |
status: | Triaged → In Progress |
Changed in bacula (Ubuntu): | |
status: | In Progress → Fix Released |
description: | updated |
Changed in bacula (Ubuntu): | |
assignee: | Nish Aravamudan (nacc) → nobody |
Changed in bacula (Ubuntu Xenial): | |
assignee: | nobody → Nish Aravamudan (nacc) |
status: | New → In Progress |
Changed in bacula (Ubuntu): | |
importance: | Undecided → Medium |
Changed in bacula (Ubuntu Xenial): | |
importance: | Undecided → Medium |
I'll use your tests to try to make a simple test case for this, and pass it on upstream.