
I've posted the question on the bacula-users list too but everyone is asleep there I think. My Bacula installation has suddenly slowed to a crawl and I've tracked it down (I think) to temporary table inserts. I've switched Bacula to use attribute spooling so it's fairly obvious that the backup job runs really fast (to the limit of USB2 connected backup medium) but then at the end of the job when it inserts the records into the database it almost stops. The backup job took about 2 minutes to copy a few GB of data but the database operation is still running a few hours later - it is making progress just slowly. It seems that Bacula has created a temporary table called batch and is inserting records into that, and then at the end I think it inserts the records into the main job table. The system load is ~1.15, and mysqld is highest on the list of processes but is only 1-2%, which I assume means that the cpu is being blocked somewhere due to IO (?). Disk write performance inside the VM where Bacula and mysql runs is around 90MB/second, which is more than sufficient to insert a few hundred thousand rows. iostat while all this is going on shows pretty much nothing happening. I think this has happened before but then came good before I got time to look at it properly. Can anyone please recommend how I can figure out where it's all going wrong? I've used the general log in mysql to determine that it's only the INSERT operations running, and iostat and strace to look for anything obviously loaded, but have come up empty. Thanks James