On Mon, Aug 11, 2003 at 12:01:22PM -0400, Brian Cuttler wrote:
> Largestfit() isn't some balancing act between the estimate size
> and the capacity of the spool/holding area ?

No, it's not that smart.

> What is the algorithm for starting the dumps anyway ?

Here's the pseudocode (from driver.c:startaflush()):
        dp = NULL;
        switch (conf_taperalgo) {
            ...
            case LARGESTFIT:
                dp = find_largest_dump_that_fits();
                break;

        }

        if (dp == NULL)
                dp = first_dump();

In other words, if the user's chosen taper algorithm can't find
any dumps it likes, Amanda just goes with the first tape-ready
dump on its list, regardless of whether there's enough tape to
hold it.

I suppose it's trying to keep the tape drive busy, and crossing
its fingers that the first dump will fit anyway (e.g. if the
tapetype underestimates the tape length).  But if the first dump
doesn't fit, both the rest of the tape in question, and the time
to write it, have been wasted.  I can think of a few things it
could do that might be better than picking the first dump in its
list:
 1. Choose the *smallest* dump that's ready for taping -- if any
    "too-large" dump is going to fit, that's the one.  This might
    only make sense for FIRSTFIT and LARGESTFIT; the other algo's
    don't care whether the chosen dump is going to fit, so if
    they haven't found any they like, there's a different reason
    for it.

 2. Just eject the tape immediately, and go on to the next one;
    the space will still have been wasted, but not all that
    writing time.  Maybe this only makes sense if we know that
    this run has more tapes available; if we're on the run's
    final tape, a last-ditch effort to fill it up doesn't cost
    anything.

 3. As Orion suggested, wait for more dumps to become available,
    in the hope that one will be small enough.  It might make
    sense to keep waiting, if necessary, until all dumps have
    finished, but that risks filling the holding disk, so perhaps
    it should only wait for a limited time, or until the holding
    disk fills to some threshold.  Better still, this decision
    should be user-configurable.

This was discussed in amanda-users a few months ago.  The thread
starts here:
    http://groups.yahoo.com/group/amanda-users/message/43375

I had some ideas then; at the risk of tooting my own horn a bit,
here are pointers to them, for people reading amanda-hackers who
don't also read amanda-user (stupid yahoogroups trashed the
indentation):
    http://groups.yahoo.com/group/amanda-users/message/43429
    http://groups.yahoo.com/group/amanda-users/message/43437

--

|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        [EMAIL PROTECTED]
|  |  /
When I came back around from the dark side, there in front of me would
be the landing area where the crew was, and the Earth, all in the view
of my window. I couldn't help but think that there in front of me was
all of humanity, except me.
        - Michael Collins, Apollo 11 Command Module Pilot

Reply via email to