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

2010-04-21 Thread Matija Nalis
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Restore hanging on Building directory tree

2010-04-20 Thread Jason Hill

Hey folks,

I am at my wit's end on this one, and I am hoping someone has had this
problem already.

I am running the following:

RHEL 5.5 (client, or workstation)
Bacula 5.0.1
MySQL 5.1


My problem is that when I attempt a restore for a large backup bacula
hangs on the Building directory tree

Small jobs work fine:

Select FileSet resource (1-3): 2
+---+---+--+-+-++
| JobId | Level | JobFiles | JobBytes| StartTime   | VolumeName |
+---+---+--+-+-++
|12 | F |4,162 | 372,107,804 | 2010-04-03 23:25:47 | AAC160L4   |
|   181 | D |   31 | 201,287,905 | 2010-04-17 23:05:03 | AAC167L4   |
|   194 | I |4 |  22,730,288 | 2010-04-18 23:05:02 | AAC167L4   |
|   223 | I |   14 |  23,426,282 | 2010-04-20 07:51:31 | AAC167L4   |
+---+---+--+-+-++
You have selected the following JobIds: 12,181,194,223

Building directory tree for JobId(s) 12,181,194,223 ...  
+++
3,991 files inserted into the tree.

You are now entering file selection mode where you add (mark) and
remove (unmark) files to be restored. No files are initially added, unless
you used the all keyword on the command line.
Enter done to leave this mode.

cwd is: /
-

That's a pretty instantaneous response, too.

But a large job:

Select FileSet resource (1-3): 3
+---+---+--+---+-++
| JobId | Level | JobFiles | JobBytes  | StartTime   | VolumeName |
+---+---+--+---+-++
|13 | F |  282,147 | 7,383,585,276 | 2010-04-03 23:27:03 | AAC160L4   |
|   182 | D |5,757 |   501,566,013 | 2010-04-17 23:05:27 | AAC167L4   |
|   195 | I |  318 |53,711,571 | 2010-04-18 23:05:14 | AAC167L4   |
|   224 | I |1,270 |   276,193,575 | 2010-04-20 07:52:10 | AAC167L4   |
+---+---+--+---+-++
You have selected the following JobIds: 13,182,195,224

Building directory tree for JobId(s) 13,182,195,224 ...  
-

And then it sits there, for hours and hours before I finally have to stop
the director.  

I thought it might be a mysql problem, but when I strace mysql there are
no queries happening.

When I installed everything, I installed mysql, then installed bacula,
and had no errors or problems.

My config for mysql:

CC=gcc -Wl,-rpath,/usr/local/openssl/lib
CFLAGS=-fPIC
CXX=gcc -Wl,-rpath,/usr/local/openssl/lib
CXXFLAGS=-I/usr/local/openssl/include -O3 -felide-constructors -fno-exceptions 
-fno-rtti

--enable-assembler
--enable-thread-safe-client
--mandir=/usr/local/mysql/man
--prefix=/usr/local/mysql
--with-plugins=innobase,innodb_plugin
--with-ssl=/usr/local/openssl
--with-vio


And my config for bacula:

./configure --enable-smartalloc --enable-conio --with-openssl=/usr/local/openssl
 --with-mysql=/usr/local/mysql --prefix=/usr/local/bacula --with-working-dir=/us
r/local/bacula/working --with-subsys-dir=/usr/local/bacula/working --with-pid-di
r=/usr/local/bacula/pids --mandir=/usr/local/bacula/man


Thanks in advance for any assistance!

Jason

--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


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

2010-04-20 Thread Matija Nalis
On Tue, Apr 20, 2010 at 10:38:27AM -0600, Jason Hill wrote:
 I am at my wit's end on this one, and I am hoping someone has had this
 problem already.
 
 I am running the following:
 
 RHEL 5.5 (client, or workstation)
 Bacula 5.0.1
 MySQL 5.1
 
 
 My problem is that when I attempt a restore for a large backup bacula
 hangs on the Building directory tree

Yes. See:
http://wiki.bacula.org/doku.php?id=faq#restore_takes_a_long_time_to_retrieve_sql_results_from_mysql_catalog

(or http://tinyurl.com/y6334ht if your MUA breaks the link)


--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


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

2010-04-20 Thread Jason Hill
---

Matija,

Thanks for the reply!

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)

(Apologies for the wide lines...)

Jason

 On Tue, Apr 20, 2010 at 10:38:27AM -0600, Jason Hill wrote:
  I am at my wit's end on this one, and I am hoping someone has had this
  problem already.
  
  I am running the following:
  
  RHEL 5.5 (client, or workstation)
  Bacula 5.0.1
  MySQL 5.1
  
  
  My problem is that when I attempt a restore for a large backup bacula
  hangs on the Building directory tree
 
 Yes. See:
 http://wiki.bacula.org/doku.php?id=faq#restore_takes_a_long_time_to_retrieve_
 sql_results_from_mysql_catalog
 
 (or http://tinyurl.com/y6334ht if your MUA breaks the link)
 

---

 Jason

--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users