Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download speed incorrect when resuming #8179

Closed
cyberduck opened this issue Aug 16, 2014 · 1 comment
Closed

Download speed incorrect when resuming #8179

cyberduck opened this issue Aug 16, 2014 · 1 comment

Comments

@cyberduck
Copy link
Collaborator

b12128e created the issue

Hi,

I have to continue downloads quite often and the download speed is not correct initially. I assume the algorithm keeps a list of the amount downloaded in the previous N timesteps. Each timestep gives a speed sample with the number of bytes downloaded divided by the time delta. The total speed is then averaged over all of these timesteps.

I believe the error is that in the initial time step the existing file size is not subtracted. Therefore you have a very high outlier in the list of speed samples, which slowly converges to the actual speed when new samples arrive. The error is gone once the buffer is full and the initial outlier is removed.

Solutions:

Quick Workaround: Instead of computing the mean, compute the median, which is not sensitive to a single outlier.
Bugfix: Subtract the filesize from the amount downloaded for the first timestep.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

When resuming a transfer, the number of bytes already transferred are taken in to account by [source:trunk/source/ch/cyberduck/ui/threading/TransferBackgroundAction.java#L146 resetting] the meter. Added test in bf4990e.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant