Hi,

On 2/14/2006 6:50 PM, Sebastian Stark wrote:
I noticed that when doing a backup mysql seems to be using most of the time doing SELECTs:

yangtse ~ % /usr/local/mysql/bin/mysqladmin -u root processlist
+------+------+-----------+--------+---------+------+-------------- +----------------------------------------------------------------------- ----------+ | Id | User | Host | db | Command | Time | State | Info | +------+------+-----------+--------+---------+------+-------------- +----------------------------------------------------------------------- ----------+ | 7224 | root | localhost | bacula | Query | 0 | Sending data | SELECT FilenameId FROM Filename WHERE Name='trainNeckarArray.sh.o1087190.27859' | | 7347 | root | localhost | | Query | 0 | | show processlist | +------+------+-----------+--------+---------+------+-------------- +----------------------------------------------------------------------- ----------+


When I show the processlist several times in a row it is nearly always SELECTing some filename in the Filename table.

That's expected - it selects to find out if the filename has to be inserted. By the way - is there a portable way of having unique file names, and, in case of inserting a duplicate one, failing in a way that allows Bacula to process the FilenameId? This might save some time. Unfortunately, I suspect stored procedures won't work because of major differences between SQLite, PostgreSQL and MySQL.

Mysql is using ~100% CPU so this seems to be the bottleneck in this case. An index in the Name column does exist. The Filename table is not extremely big, roughly at ~500MB with ~1 million rows.

I'm getting backup rates at ~15M/s but I would expect ~30M/s (dir, sd and fd on same machine backing up to LTO-2 drive). This is bacula version 1.38.5.

Does someone have an idea how to speed things up?

How about adding an index? I've got one on the Filename column.

Arno


-Sebastian


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


--
IT-Service Lehmann                    [EMAIL PROTECTED]
Arno Lehmann                  http://www.its-lehmann.de


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to