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

juliaup update is initially slow to check versions db #1096

Open
IanButterworth opened this issue Nov 2, 2024 · 2 comments
Open

juliaup update is initially slow to check versions db #1096

IanButterworth opened this issue Nov 2, 2024 · 2 comments

Comments

@IanButterworth
Copy link
Member

I've been looking into why juliaup update hangs for a while before doing any substantial downloads, even on very fast connections.

I think the issue is that this file may be served via a CDN that needs its caching settings tweaked to be less lazy
https://julialang-s3.julialang.org/juliaup/RELEASECHANNELDBVERSION

It's a very small file, so doesn't make any sense that it takes 7s to download.. so I believe the time is the CDN refreshing a local cache.


From a profile during that quiet ~10s it can be seen that update_version_db is spending 7s waiting on reqwest.

Image

cc. @giordano @davidanthoff

@davidanthoff
Copy link
Collaborator

Yes, that makes a ton of sense: the idea is that this file is small so that it can be checked really quickly (clearly not working...). The file is also configured to not be cached by the CDN so that updates are picked up by clients quickly.

I'm not sure what the best strategy is, probably really depends on the CDN, right?

@IanButterworth
Copy link
Member Author

Actually, I caught the slowdown with timing printing added and it seems to be something else.

This is with main...ib/timing

Note I set the db patch version back one, just to exercise all code paths, but that is only hit after the problematic slow one.

% ./target/release/juliaup update
Checking for new Julia versions
Online db version `https://julialang-s3.julialang.org/juliaup/RELEASECHANNELDBVERSION`: Version { major: 1, minor: 0, patch: 55 }
Request to 'https://julialangnightlies-s3.julialang.org/bin/macos/aarch64/julia-latest-macos-aarch64.tar.gz' took 5.979535584s
Direct download etags: [("nightly", "\"2eeb5e6ccc5363b5180feb502f96d919-27\"")]
Bundled db version: Version { major: 1, minor: 0, patch: 54 }
Updating channel nightly

Then immediately after

ian@Ians-MacBook-Pro juliaup % ./target/release/juliaup update
Checking for new Julia versions
Online db version `https://julialang-s3.julialang.org/juliaup/RELEASECHANNELDBVERSION`: Version { major: 1, minor: 0, patch: 55 }
Request to 'https://julialangnightlies-s3.julialang.org/bin/macos/aarch64/julia-latest-macos-aarch64.tar.gz' took 112.53425ms
Direct download etags: [("nightly", "\"2eeb5e6ccc5363b5180feb502f96d919-27\"")]
Bundled db version: Version { major: 1, minor: 0, patch: 54 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants