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

Cargo is downloading excessively slow. #12175

Closed
caner-cetin opened this issue May 24, 2023 · 4 comments
Closed

Cargo is downloading excessively slow. #12175

caner-cetin opened this issue May 24, 2023 · 4 comments
Labels
C-bug Category: bug S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.

Comments

@caner-cetin
Copy link

caner-cetin commented May 24, 2023

Problem

I am talking about 36 kb/s speeds:

image

And, okay, I am living in a literal shithole, like we are still using 3G but my internet is still not that bad:

image

Is this a bug of some sort?

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

cargo 1.69.0 (6e9a833 2023-04-12)

@caner-cetin caner-cetin added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels May 24, 2023
@caner-cetin
Copy link
Author

[caner@derp-x8664 muted]$ CARGO_NET_GIT_FETCH_WITH_CLI=true cargo build
    Blocking waiting for file lock on package cache
    Updating crates.io index
remote: Enumerating objects: 350470, done.
remote: Counting objects: 100% (315/315), done.
remote: Compressing objects: 100% (111/111), done.
Receiving objects:   6% (21844/350470), 3.30 MiB | 36.00 KiB/s  

same reulst with git CLI.

@weihanglo
Copy link
Member

weihanglo commented May 24, 2023

Receiving objects: 6% (21844/350470), 3.30 MiB | 36.00 KiB/s

The speed indeed doesn't look right. The GitHub connection is great right now. I have 300Mbps network and the download speed can up to 2MiB/s for me. I am not sure if there is something between you and GitHub. You could try again with CARGO_HTTP_DEBUG=true and CARGO_LOG=cargo::ops::registry=trace environment variables, and --verbose flag to see if anything relevant happen.

Also, how is the speed when you just git clone https://github.com/rust-lang/crates.io-index.git? CARGO_NET_GIT_FETCH_WITH_CLI=true did use something to git fetch CLI, so I guess it won't help much as you've already tested it.

Otherwise you could try using sparse protocol, whose instruction is described in #11014 and will be the default for index fetch.

@weihanglo weihanglo added S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. and removed S-triage Status: This issue is waiting on initial triage. labels May 24, 2023
@caner-cetin
Copy link
Author

image

There is nothing relevant here, the only interesting bit is I am connected to the other side of the world. I will try sparse protocol thank you.

@caner-cetin
Copy link
Author

I dont know how but protocol worked @weihanglo . Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.
Projects
None yet
Development

No branches or pull requests

2 participants