Bacula-users

[Bacula-users] Dead slow backups with bacula 5.0, mysql and accurate

2010-02-19 15:09:31
Subject: [Bacula-users] Dead slow backups with bacula 5.0, mysql and accurate
From: Steve Ellis <ellis AT brouhaha DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 19 Feb 2010 11:52:44 -0800
I don't know if this is specific to mysql or not.  My system:  Fedora 12 x86-64, Bacula 5.0.0 (installed from fedora's rawhide), mysql 5.1.42.  I've been happily running bacula 3.0.3 on this particular machine and config for several months without issue (and earlier bacula releases, but without Accurate for several years), but after trying an upgrade to 5.0, I've noticed that accurate backups are now dreadfully slow (at least a differential is, I assume the same applies to incrementals).  If I turn off Accurate, backups proceed fine, but with accurate on, mysqladmin processlist will eventually show this query taking hours (or perhaps days, I haven't waited that long):

+----+--------+-----------+--------+---------+------+-----------+------------------------------------------------------------------------------------------------------+
| Id | User   | Host      | db     | Command | Time | State     | Info                                                                                                 |
+----+--------+-----------+--------+---------+------+-----------+------------------------------------------------------------------------------------------------------+
| 9  | bacula | localhost | bacula | Query   | 349  | executing | SELECT Path.Path, Filename.Name, Temp.FileIndex, Temp.JobId, LStat, MD5 FROM ( SELECT FileId, Job.Jo |
| 18 | root   | localhost |        | Query   | 0    |           | show processlist                                                                                     |
+----+--------+-----------+--------+---------+------+-----------+------------------------------------------------------------------------------------------------------+
I've increased several things in my mysql config to try to make this better (although bacula 3.0.3 was fine with the old config), but that doesn't seem to be the issue.  I've checked  the mysql indices, and the typical ones seem to be what they should be (at least as far as I can tell), although I'm not familiar enough with the queries that Accurate does to know if I should be looking at other indices:

mysql> show index from File;
+-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name   | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| File  |          0 | PRIMARY    |            1 | FileId      | A         |    15848513 |     NULL | NULL   |      | BTREE      |         |
| File  |          1 | JobId      |            1 | JobId       | A         |         522 |     NULL | NULL   |      | BTREE      |         |
| File  |          1 | PathId     |            1 | PathId      | A         |      211313 |     NULL | NULL   |      | BTREE      |         |
| File  |          1 | FilenameId |            1 | FilenameId  | A         |      754691 |     NULL | NULL   |      | BTREE      |         |
| File  |          1 | JobId_2    |            1 | JobId       | A         |         522 |     NULL | NULL   |      | BTREE      |         |
| File  |          1 | JobId_2    |            2 | PathId      | A         |     1584851 |     NULL | NULL   |      | BTREE      |         |
| File  |          1 | JobId_2    |            3 | FilenameId  | A         |    15848513 |     NULL | NULL   |      | BTREE      |         |
+-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
7 rows in set (0.00 sec)

mysql> show index from Path;
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Path  |          0 | PRIMARY  |            1 | PathId      | A         |      207920 |     NULL | NULL   |      | BTREE      |         |
| Path  |          1 | Path     |            1 | Path        | A         |      207920 |      255 | NULL   |      | BTREE      |         |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
2 rows in set (0.00 sec)

mysql> show index from Filename;
+----------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table    | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+----------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Filename |          0 | PRIMARY  |            1 | FilenameId  | A         |      755229 |     NULL | NULL   |      | BTREE      |         |
| Filename |          1 | Name     |            1 | Name        | A         |      755229 |      255 | NULL   |      | BTREE      |         |
+----------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
2 rows in set (0.00 sec)

Is there more that I can do to help debug this?

Thanks!

-se
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>