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

swarm/: Set dial concurrency factor default value to > 1 #2678

Closed
mxinden opened this issue May 29, 2022 · 4 comments
Closed

swarm/: Set dial concurrency factor default value to > 1 #2678

mxinden opened this issue May 29, 2022 · 4 comments
Labels
difficulty:easy getting-started Issues that can be tackled if you don't know the internals of libp2p very well help wanted

Comments

@mxinden
Copy link
Member

mxinden commented May 29, 2022

Description

I propose increasing the default dial concurrency factor to some value larger than 1.

You can use https://kademlia-exporter.max-inden.de/d/Pfr0Fj6Mk/rust-libp2p (bottom) to determine how many addresses nodes advertise for the various libp2p networks.

Also worth checking what go-libp2p uses as a default value.

Motivation

Dialing addresses of a single dial concurrently gives a significant improvement in latency.

Feature was introduced in #2404.

Default value is set here:

// By default, addresses of a single connection attempt are dialed in sequence.
dial_concurrency_factor: NonZeroU8::new(1).expect("1 > 0"),

//CC @dignifiedquire who has recently stumbled across this.

@mxinden mxinden added difficulty:easy help wanted getting-started Issues that can be tackled if you don't know the internals of libp2p very well labels May 29, 2022
@maschad
Copy link
Member

maschad commented Jun 28, 2022

For some reason I am getting a 502 on the Grafana dashboard
image

But it seems that go-libp2p uses a dial concurrency factor of 8 if I'm not mistaken, it could be one of the other constants though as the terms are a bit convoluting.

@mxinden
Copy link
Member Author

mxinden commented Jun 29, 2022

Sorry, kademlia-exporter.max-inden.de has some uptime issues currently. Posting a screenshot here for now:

image

But it seems that go-libp2p uses a dial concurrency factor of 8 if I'm not mistaken, it could be one of the other constants though as the terms are a bit convoluting.

Seems to be right 👍

maschad added a commit to maschad/rust-libp2p that referenced this issue Jul 1, 2022
maschad added a commit to maschad/rust-libp2p that referenced this issue Jul 1, 2022
@maschad
Copy link
Member

maschad commented Jul 1, 2022

Kademlia seems to be back up now, I created a PR #2741

maschad added a commit to maschad/rust-libp2p that referenced this issue Jul 4, 2022
maschad added a commit to maschad/rust-libp2p that referenced this issue Jul 4, 2022
maschad added a commit to maschad/rust-libp2p that referenced this issue Jul 4, 2022
@mxinden
Copy link
Member Author

mxinden commented Jul 7, 2022

Closing here with #2741 merged.

@mxinden mxinden closed this as completed Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:easy getting-started Issues that can be tackled if you don't know the internals of libp2p very well help wanted
Projects
None yet
Development

No branches or pull requests

2 participants