Bacula-users

Re: [Bacula-users] Restore hanging on "Building directory tree"

2010-04-21 04:43:05
Subject: Re: [Bacula-users] Restore hanging on "Building directory tree"
From: Matija Nalis <mnalis+bacula AT CARNet DOT hr>
To: Jason Hill <Jason AT Colorado DOT EDU>
Date: Wed, 21 Apr 2010 10:40:41 +0200
On Tue, Apr 20, 2010 at 01:09:45PM -0600, Jason Hill wrote:
> I read through that, and looked at my indexes on the File table and it
> doesn't appear as if I have superfluous indexes.  The doc mentions:
> 
> "you need to drop all the indexes from File table except the primary
> key and indexes on (`JobId`,`PathId`,`FilenameId`) and (`JobId`)"
> 
> However, unless I am missing something, those are all my indexes:
> 
> 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         |    
>  9241817 |     NULL | NULL   |      | BTREE      |         |
> | File  |          1 | JobId    |            1 | JobId       | A         |    
>  9241817 |     NULL | NULL   |      | BTREE      |         |
> | File  |          1 | JobId_2  |            1 | JobId       | A         |    
>  9241817 |     NULL | NULL   |      | BTREE      |         |
> | File  |          1 | JobId_2  |            2 | PathId      | A         |    
>  9241817 |     NULL | NULL   |      | BTREE      |         |
> | File  |          1 | JobId_2  |            3 | FilenameId  | A         |    
>  9241817 |     NULL | NULL   |      | BTREE      |         |
> +-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
> 5 rows in set (0.00 sec)

Yes, that sounds like correct indexes for File table, but Cardinality
is strange. You should probably run "analyze table" (if InnoDB) or
"optimize table" (if MyISAM).

Also refering to your original mail, you should note that as MySQL im
multithreaded, strace(8) won't tell you much unless you run it with
'-f'. The best way to check if there are queries running (and in what
state) is to run "show processlist" mysql query.

If the slowness is due to mysql queries running, you can try playing
with mysql variables (some are mentioned on wiki) or you should
switch to PostgreSQL which is (or so it seems) much better optimized
for bacula.


------------------------------------------------------------------------------
_______________________________________________
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>