Bug 96516 - make the remaining time prediction more clever
Summary: make the remaining time prediction more clever
Status: CONFIRMED
Alias: None
Product: kget
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: KGet authors
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-07 13:46 UTC by Stefanos Harhalakis
Modified: 2006-02-12 14:58 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefanos Harhalakis 2005-01-07 13:46:56 UTC
Version:           v0.8.3 (using KDE 3.3.90 (alpha1, CVS >= 20041206), compiled sources)
Compiler:          gcc version 3.4.3
OS:                Linux (i686) release 2.6.10-ac4

Suppose that you're downloading 2 big files:

File A 100MB
File B 200MB

and you have a max total speed of 100Kb/s

Downloads share the total speed so they get 50kb/s each.

Now the estimated time for File A is 100000/50 = 2000 seconds
and the estimated time of File B is 200000/50 = 4000 seconds

Thus, kget will display 4000 seconds as the remaining time.

But the total time is about 3000 seconds because when file A finishes, file B will get all the bandwidth. So a better algorithm would be:

ETA = (total size) / (total bandwidth)

Total size is computed by adding all sizes and total bandwith is computed by adding the current downloading rate for each one.

You can extend this even more and produce an algorithm that not only displays the total ETA correctly, but also the ETA for each entry but this is a bit more complex.

If you're interested I can implement such an algorithm.
Comment 1 Stephan Kulow 2005-01-14 09:43:37 UTC
I doubt someone would protest a clean patch.
Comment 2 Iñaki Baz Castillo 2005-03-25 02:10:53 UTC
I'm very agree with this formule: ETA = (total size) / (total bandwidth)
It will show a better ETA. The example of the files A and B of v13@priest.com is very good to understand the situation. I feel exactly the same when see the ETA when downloading various files. The actual ETA is far of the real ETA.
Comment 3 Stefanos Harhalakis 2006-02-12 14:58:44 UTC
I just finished a library that tries to make better time estimations. It is not public yeat but you can get it from http://www.it.teithe.gr/~v13/libestimator-1.0.0.tar.gz

It is GPLed (but I'm considering changing that to LGPL)

My page does not contain it yet but I'll make it public soon.

You may consider using it to do the time estimations. Since this is the very first release feel free to ask for any code or documentation additions.