Bacula-users

Re: [Bacula-users] Very slow interactive restore

2009-11-26 08:54:40
Subject: Re: [Bacula-users] Very slow interactive restore
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users <bacula-users AT lists.sourceforge DOT net>
Date: Thu, 26 Nov 2009 14:50:09 +0100
Hello,

26.11.2009 14:02, Christoph Litauer wrote:
> Arno Lehmann schrieb:
...
>>> Please post the result. Thanks in advance!
>> Sure...
>>
>>> mysql> EXPLAIN SELECT Path.Path, Filename.Name, File.FileIndex, File.JobId, 
>>> File.LStat FROM ( SELECT max(FileId) as FileId, PathId, FilenameId FROM ( 
>>> SELECT FileId, PathId, FilenameId FROM File WHERE JobId IN (11902)) AS F 
>>> GROUP BY PathId, FilenameId ) AS Temp JOIN Filename ON (Filename.FilenameId 
>>> = Temp.FilenameId) JOIN Path ON (Path.PathId = Temp.PathId) JOIN File ON 
>>> (File.FileId =Temp.FileId) WHERE File.FileIndex > 0 ORDER BY JobId, 
>>> FileIndex ASC;
>>> +----+-------------+------------+--------+---------------+---------+---------+-----------------+-------+---------------------------------+
>>> | id | select_type | table      | type   | possible_keys | key     | 
>>> key_len | ref             | rows  | Extra                           |
>>> +----+-------------+------------+--------+---------------+---------+---------+-----------------+-------+---------------------------------+
>>> |  1 | PRIMARY     | <derived2> | ALL    | NULL          | NULL    | NULL   
>>>  | NULL            | 60905 | Using temporary; Using filesort |
>>> |  1 | PRIMARY     | Path       | eq_ref | PRIMARY       | PRIMARY | 4      
>>>  | Temp.PathId     |     1 |                                 |
>>> |  1 | PRIMARY     | Filename   | eq_ref | PRIMARY       | PRIMARY | 4      
>>>  | Temp.FilenameId |     1 |                                 |
>>> |  1 | PRIMARY     | File       | eq_ref | PRIMARY       | PRIMARY | 8      
>>>  | Temp.FileId     |     1 | Using where                     |
>>> |  2 | DERIVED     | <derived3> | ALL    | NULL          | NULL    | NULL   
>>>  | NULL            | 60905 | Using temporary; Using filesort |
>>> |  3 | DERIVED     | File       | ref    | JobId,JobId_2 | JobId_2 | 4      
>>>  |                 | 52471 |                                 |
>>> +----+-------------+------------+--------+---------------+---------+---------+-----------------+-------+---------------------------------+
>>> 6 rows in set (6.99 secs)
>> This is a MyISAM catalog with 14776513 Files, 1163114 FileNames, and 
>> 198492 Paths. Machine is a Dual-Core Opteron with 2GB RAM and a decent 
>> disk subsystem. MySQL is not exactly configured for maximum performance.
> 
> Thanks a lot Arno. May I ask you too, how long an interactive restore of
> a big filesystem takes to build the directory tree?
> 

Sure... although the file system with the biggest number of files is 
not exactly *really* big...

You have selected the following JobIds: 11773,12087,12101,12115

Building directory tree for JobId(s) 11773,12087,12101,12115 ... 
+++++++++++++++++++++++++++++++++++++++++++++
55,732 files inserted into the tree.

TRhat's one full, one differential, and two incrementals.

Took less than a minute. MySQL shouldn't have anything useful for this 
query in its cache.

The DIR server, by the way, is only an Athlon 500 with 512 MB of RAM.

None of my customers where I could try this has a really big file 
system, so I can't try with a really large set of files that would 
definitely drive MySQL to do some real work.

Cheers,

Arno

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users