Hello Kern,

Just created http://bugs.bacula.org/view.php?id=2049
It includes a storage daemon debug trace file and a patch which
fixed the problem for me.  In fact i revered one line in reserve.c
back to version 5.2.13

diff --git a/bacula/src/stored/reserve.c b/bacula/src/stored/reserve.c
index 5f696a3..30719a7 100644
--- a/bacula/src/stored/reserve.c
+++ b/bacula/src/stored/reserve.c
@@ -445,7 +445,7 @@ bool find_suitable_device_for_job(JCR *jcr, RCTX &rctx)
                }
                if (vol->dev->is_autochanger()) {
                   Dmsg1(dbglvl, "vol=%s is in changer\n", vol->vol_name);
-                  if (!is_vol_in_autochanger(rctx, vol) || 
vol->dev->autoselect) {
+                  if (!is_vol_in_autochanger(rctx, vol) || 
!vol->dev->autoselect) {
                      continue;
                   }
                } else if (strcmp(device_name, vol->dev->device->hdr.name) != 
0) {


Do you remember why this line was changed?  or was it a typo?

In the meantime i recompiled latest git version including my patch
and tested it,  it works now as in 5.2.x.

The next thing i will test is the parallel copy,  i monitored
copy jobs but they did not write in parallel.  I do have
Maximum Concurrent Jobs > 2 on both storage devices (File,QTM-Tape).
Seems there is another reason why these devices are blocked.

Running Jobs:
Console connected at 12-Apr-14 09:24
 JobId  Type Level     Files     Bytes  Name              Status
======================================================================
616115  Copy Full          0         0  CopyDiskToTape    is running
616116  Back Incr          0         0  Backup-leodolter  is running
616117  Copy Full          0         0  CopyDiskToExtClone is waiting on 
Storage "File"
616118  Back Incr          0         0  Backup-leodolter  is waiting on Storage 
"QTM-Tape"
====

Best regards
Ulrich

On Wed, 2014-04-09 at 21:08 +0200, Kern Sibbald wrote:
> Hello,
> 
> See my comments below ...
> 
> On 04/09/2014 01:46 PM, Ulrich Leodolter wrote:
> > Hello,
> >
> > i am testing one the new bacula 7.x features:
> >
> > *Migration/Copy/VirtualFull Performance Enhancements*
> >
> > The Bacula Storage daemon now permits multiple jobs to simultaneously read 
> > the same disk Volume,
> > which gives substantial performance enhancements when running Migration, 
> > Copy, or VirtualFull jobs
> > that read disk Volumes. Our testing shows that when running multiple 
> > simultaneous jobs,
> > the jobs can finish up to ten times faster with this version of Bacula.
> > This is built-in to the Storage daemon, so it happens automatically and 
> > transparently .
> >
> >
> > i our setup we have 2 CopyDiskToTape which go into different pools on Tape 
> > storage.
> > our storage is a 2-drive autochanger device.
> >
> > before the copy jobs are started, each drive has mounted a volume of the 
> > destination pools.
> >
> > the problem is that both copy jobs only look at drive index 0
> > and premounted volumes are always swapped (mounted/unmounted) at drive 0.
> >
> >
> > we have a second bacula installation running 5.2.13
> > which has more or less the same setup and hardware.
> > on this installation parallel copy jobs runs can run without
> > swapping volumes on autochanger drive 0.
> > to overcome the exclusive read-lock limitation in this bacula version
> > we have defined two file storage devices which point to the
> > same location.  our sql selects the copy jobs in opposite order
> > for the two jobs,  so we can minimize the number of conflicts
> > when one file volume is already locked.
> 
> Unfortunately, I don't understand well enough what the real problem is. 
> It sounds like you are saying there is a problem on one bacula
> installation and not on the other, which would imply that there is
> something in the conf that is triggering the problem.
> 
> I am also not sure what the problem is of swapping volumes.  With the
> current algorithm (rather primitive) when no jobs are running Bacula
> will always look a the drives in the order they are in the conf file or
> perhaps it is in alphabetic order, so it will always look at a
> particular drive first. If that drive is not being used, the job will be
> assigned that drive.
> 
> A better behavior might be to search for an empty drive and always start
> with that one, but that will not be an ideal solution as at some point
> all the drives will have a volume in them so some volume needs to be
> swapped.
> 
> I have been meaning to work on improving the tape usage algorithm, in
> particular putting in a better round robin scheme than currently exists,
> but unfortunately there always seem to be more urgent tasks, and the
> list of things to do is getting larger rather than smaller, so I am
> probably not being very optimistic here.
> 
> If there is a definitive bug her rather than an inefficiency, and it can
> be clearly described I might be able to fix it.
> 
> >
> >
> > my question:
> >
> > has there something changed in bacula 7.x how bacula determines
> > if a volume is already mounted for an autochanger device ?
> No, nothing has changed.  If a volume is premounted and a job wants to
> use it, Bacula should notice that and select that drive, because part of
> the current algorithm is to look at all pre-mounted volumes to see if
> one can be used. If that is not the case, and you are talking about a
> single job (no other jobs contending for the same resources), I would
> like to see a detailed analysis what is going wrong, because I could
> probably fix it.
> >
> > why does bacula not use a premounted volume at drive index 1 ?
> Good question.  I would need to know the exact conditions before I could
> answer, but most likely Bacula sees that drive index 0 is available and
> takes it, and then asks for a tape and gets a different one.  If it
> swaps the Volume from drive 1 onto drive 0 and drive 1 is not being
> used, then the current algorithm is not working correctly, but to fix it
> I would need a reproducible case.
> 
> Best regards,
> Kern
> >
> >
> > Best regards
> > Ulrich
> >
> >
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Put Bad Developers to Shame
> > Dominate Development with Jenkins Continuous Integration
> > Continuously Automate Build, Test & Deployment 
> > Start a new project now. Try Jenkins in the cloud.
> > http://p.sf.net/sfu/13600_Cloudbees
> > _______________________________________________
> > Bacula-devel mailing list
> > Bacula-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/bacula-devel
> >
> 
> 



------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to