Skip to content

Fix rate and progress calculations#2322

Merged
jhiemstrawisc merged 6 commits into
PelicanPlatform:mainfrom
bbockelm:fixup_averages
May 20, 2025
Merged

Fix rate and progress calculations#2322
jhiemstrawisc merged 6 commits into
PelicanPlatform:mainfrom
bbockelm:fixup_averages

Conversation

@bbockelm

Copy link
Copy Markdown
Collaborator

Correct various and sundry bugs around the download rate calculation, progress bars after a slow transfer timeout, and minimum download speed.

bbockelm added 5 commits May 17, 2025 09:43
The EWMA package assumes a 1s tick between invocations, meaning the
average decay time was previously 15 * 30 = 7.5 minutes.  Change
to correct usage of package and switch average interval to 20s which
causes the package to use historical averages for the startup interval.
When the transfer is resumed after a failed attempt, the progress bar
should show that we are picking up where we left off, not starting again
at zero.
Periodically print the transfer status to the logs to help understand
how the transfer is progressing (and the estimated rate) when debugging
is enabled.
Add a warning when we hit slow-transfer mode and note the concurrency
calculation when we have an error.
Previously, the time elapsed was always calculated from the beginning
of the transfer, not since the last progress calculation.  This meant,
as time went forward, the average rate went lower and lower until the
transfer was cancelled due to slow rates.
@bbockelm bbockelm linked an issue May 17, 2025 that may be closed by this pull request
@bbockelm bbockelm added bug Something isn't working client Issue affecting the OSDF client create-patch Patch this into multiple versions of Pelican labels May 17, 2025
Previously, if `MinimumDownloadSpeed` was not set then we would always
clobber the value of `Client.MinimumDownloadSpeed` with the code
defaults.  This caused `Client.MinimumDownloadSpeed` to be ignored in
the config file or environment.
@jhiemstrawisc jhiemstrawisc self-requested a review May 20, 2025 21:11

@jhiemstrawisc jhiemstrawisc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I rebased one small change into this, which was a change from viper.Get("Client.MinimumDownloadSpeed" to viper.Get(param.Client_MinimumDownloadSpeed.GetName())

Otherwise looks good to me. As my one comment suggests, I'll open a followup issue to move some other config params under the new Logging.Client this PR introduces.

Comment thread docs/parameters.yaml
@jhiemstrawisc jhiemstrawisc merged commit 5d9cbce into PelicanPlatform:main May 20, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working client Issue affecting the OSDF client create-patch Patch this into multiple versions of Pelican

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix client download rate calculations

2 participants