Bug 455594

Summary: RFE: sort download list smallest package first
Product: [Fedora] Fedora Reporter: John Reiser <jreiser>
Component: pungiAssignee: David Cantrell <dcantrell>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-16 14:36:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Reiser 2008-07-16 14:17:28 UTC
Description of problem: Please enhance pungi to sort the list of packages to be
downloaded into ascending order by size of download.  Downloading the smaller
packages first increases the chances that potential problems with package
mirrors or a random individual package will occur sooner, and thus can be
detected and fixed sooner.

Version-Release number of selected component (if applicable):
pungi-1.2.18.1-1.fc9

How reproducible:
always

Steps to Reproduce:
1. clear the package cache
2. run pungi
3.
  
Actual results:
Packages downloaded in apparently-random order.

Expected results:
Packges downloaded by size, smallest first.

Additional info:
Sorting the list by size is the first step towards a very good multi-threaded
download strategy.  Have two threads, one which downloads the smallest remaining
package, and the other which downloads the largest remaining package.  In the
beginning the large download utilizes the bandwidth that is lost by setup times
for small packages.  For downloading 1000 packages using 1.5Mb/s DSL, the
savings is about half an hour over six hours (8%.)

Comment 1 Jesse Keating 2008-07-16 14:36:12 UTC
Packages get downloaded in the order that yum wants to do it, since we use yum
to download them.  If you have at least yum 3.2.16 you'll get downloads ordered
in this way.