Loading ...
Sorry, an error occurred while loading the content.

fitting files into a filesystem

Expand Messages
  • Paul Archer
    I have a bunch of files in the 23-30GB range that I need to fit as efficiently as possible onto 250GB hard drives. I have enough files (several terabytes
    Message 1 of 3 , Sep 4, 2004
    View Source
    • 0 Attachment
      I have a bunch of files in the 23-30GB range that I need to fit as
      efficiently as possible onto 250GB hard drives. I have enough files
      (several terabytes worth) that I should be able to come within a gigabyte or
      so of filling each drive--but I'm having trouble conceptualizing how to
      figure out what the best fit would be.
      I've also Googled and searched CPAN, but can't seem to come up with search
      terms that get me anywhere.

      I'm happy to write the code (looking forward to it, really), but a pointer
      in the right direction on the algorithm would be greatly appreciated.

      Paul Archer


      ---------------------------
      404 Error - Item Not Found
      <haiku>
      You step in the stream,
      but the water has moved on.
      That page is not here.
      </haiku>
      ---------------------------
    • Jeff 'japhy' Pinyan
      ... This is an NP-complete problem known as the knapsack problem , or bin packing . It s no easy task. -- Jeff japhy Pinyan % How can we ever be
      Message 2 of 3 , Sep 5, 2004
      View Source
      • 0 Attachment
        On Sep 4, Paul Archer said:

        >I have a bunch of files in the 23-30GB range that I need to fit as
        >efficiently as possible onto 250GB hard drives. I have enough files
        >(several terabytes worth) that I should be able to come within a gigabyte or
        >so of filling each drive--but I'm having trouble conceptualizing how to
        >figure out what the best fit would be.

        This is an NP-complete problem known as "the knapsack problem", or "bin
        packing". It's no easy task.

        --
        Jeff "japhy" Pinyan % How can we ever be the sold short or
        RPI Acacia Brother #734 % the cheated, we who for every service
        http://japhy.perlmonk.org/ % have long ago been overpaid?
        http://www.perlmonks.org/ % -- Meister Eckhart
      • Paul Archer
        ... Well, I feel better that I couldn t come up with anything, at least! But it is an easy task (in a Perl sort of way): someone has written
        Message 3 of 3 , Sep 5, 2004
        View Source
        • 0 Attachment
          9:14am, Jeff 'japhy' Pinyan wrote:

          >
          > On Sep 4, Paul Archer said:
          >
          > >I have a bunch of files in the 23-30GB range that I need to fit as
          > >efficiently as possible onto 250GB hard drives. I have enough files
          > >(several terabytes worth) that I should be able to come within a gigabyte or
          > >so of filling each drive--but I'm having trouble conceptualizing how to
          > >figure out what the best fit would be.
          >
          > This is an NP-complete problem known as "the knapsack problem", or "bin
          > packing". It's no easy task.
          >

          Well, I feel better that I couldn't come up with anything, at least!
          But it is an easy task (in a Perl sort of way): someone has written
          Algorithm::Bucketizer to handle it. Thanks for the name, which led me to the
          module. CPAN (and this mailing list) come through again!

          Paul Archer



          ----------------------------------------------------------------
          Q: What do Winnie-the-Pooh and John the Baptist have in common?
          A: Their middle name.
          ----------------------------------------------------------------
        Your message has been successfully submitted and would be delivered to recipients shortly.