8000 Add dedicated fast network initialization (desired for simulations) by cortze · Pull Request #9 · cortze/py-dht · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add dedicated fast network initialization (desired for simulations) #9

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

Merged
merged 12 commits into from
Aug 3, 2023

Conversation

cortze
Copy link
Owner
@cortze cortze commented Jul 31, 2023

Motivation

Some optimizations have been made in #8 . However, they are still not enough to make the simulation of a network fast enough (2 hours for initializing 10k nodes... too much)

Related links:

Description

This PR aims to be the follow-up of #8 . I'll try to be a little bit more fast trying to do less work in a parallel way.

Tasks

  • speed up the routing table's initialization (maybe add a faster method)
  • speed up the network initialization (concurrency? it could start-up a few nodes at the time)

Proof of Success

-> single node and basic initialization of a node went to 0.68 secs (10k nodes k=20)

-- benchmark: opt-conc_network_bootstrap_node --
rounds          : 1
failed rounds   : 0
prep time (s)   : 0.12465858459472656
avg (s)         : 0.6805312633514404
median (s)      : 0.6805312633514404
p90_duration (s): 0.6805312633514404
-- benchmark: opt-conc_network_fast_bootstrap_network --
rounds          : 1
failed rounds   : 0
prep time (s)   : 9.059906005859375e-06
avg (s)         : 203.31283402442932
median (s)      : 203.31283402442932
p90_duration (s): 203.31283402442932
-- benchmark: opt-conc_network_fast_threaded_bootstrap_network --
rounds          : 1
failed rounds   : 0
prep time (s)   : 0.0011186599731445312
avg (s)         : 39.15315270423889
median (s)      : 39.15315270423889
p90_duration (s): 39.15315270423889


-> the following figure shows the speed improvements with the fast-network-initialization functions added at this commit

image

@cortze cortze changed the title Feat/add spcf network init Add dedicated fast network initialization (desired for simulations) Aug 3, 2023
@cortze cortze merged commit f5a1c27 into main Aug 3, 2023
@cortze cortze mentioned this pull request Aug 3, 2023
2 tasks
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

Successfully merging this pull request may close these issues.

1 participant
0