Bacula-users

Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)

2009-06-18 11:52:11
Subject: Re: [Bacula-users] Performance with MySQL queries since 3.0.0 (Dir inserting attributes hang)
From: Michel Meyers <steltek AT tcnnet DOT com>
To: Martin Simmons <martin AT lispworks DOT com>
Date: Thu, 18 Jun 2009 17:11:04 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Simmons wrote:
>>>>>> On Wed, 17 Jun 2009 13:48:58 +0200, Tom Sommer said:
>> Martin Simmons wrote:
>>>>>>>> On Tue, 16 Jun 2009 15:05:18 +0200, Tom Sommer said:
>>>>>>>>             
>>>> Hi,
>>>>
>>>> I have a somewhat pressing problem with the performance of my Bacula
>>>> installation.
>>>>
>>>> My MySQL database currently holds 247,342,127 (36GB) records in the File
>>>> table, and 78,576,199 (10GB) records in the Filename table.
>>>>
>>>> Since 3.0.0, but even more since 3.0.1, I have a problem with queries
>>>> being really slow. Basically when doing a full backup of a server
>>>> (mailserver, LOTS of small files), I can have my MySQL hanging for up to
>>>> 24+ hours on queries like this:
>>>>
>>>> INSERT INTO Filename( Name )
>>>> SELECT a.Name
>>>> FROM (
>>>>
>>>> SELECT DISTINCT Name
>>>> FROM batch
>>>> ) AS a
>>>> WHERE NOT
>>>> EXISTS (
>>>>
>>>> SELECT Name
>>>> FROM Filename AS f
>>>> WHERE f.Name = a.Name
>>>> )
[...]
>>> Sorry, I don't know how to optimize it.
>>>
>>> These queries are part of the new "batch insert" code.  You can turn that 
>>> off
>>> by passing --disable-batch-insert to configure when building Bacula.
>>>   
>> what does this mean in practice? 1 query per file? or?
> 
> The non-batch approach makes several queries per file.

But it will do so as it backs up the files, as opposed to the batch
approach where it collects all the queries and does them at the end of
the job, right?

- - Michel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)

iEYEARECAAYFAko6WQgACgkQ2Vs+MkscAyWeTQCglDfuICz6cZ1eYz06yIl8VzDS
jw8An1Xoa1cje6vI2ChFttOqjvG5FzQa
=KKVz
-----END PGP SIGNATURE-----


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
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>