Skip to content

Deterministic plumtree simulator with maintenance tick and selection metrics - #585

Open
wisper-dev wants to merge 2 commits into
superfly:mainfrom
wisper-dev:sim/peer-selection-comparison
Open

wisper-dev wants to merge 2 commits into
superfly:mainfrom
wisper-dev:sim/peer-selection-comparison

Conversation

@wisper-dev

Copy link
Copy Markdown

Part 1 of 2 for #582. @somtochiama, this is the simulator part we discussed in the issue.

  • eager_peers, known_peers and ring_locked are now IndexSet. Their iteration order fed peer selection, so one seed gave different runs (PRUNE 1115 / 1084 / 1090 / 1070, now 1088 every time).
  • Simulator: a 60 s maintenance tick, counts of full rebuilds, PRUNE and GRAFT, per-node load, and where a returning node lands. The CI test takes about 3 s.
  • Current selection, 200 nodes, one restart every 20 s: after a node first returns, every tick is a full rebuild. A returning node is eager at about 88% of nodes right away and at 11 to 18 nodes 5 s later. PRUNE is 7.5k to 8.2k against 2.2k without restarts. Delivery is 100%.
  • The second rebuild per restart comes from the peer_down flag. This simulator does not exercise the reconciliation from Reconcile plumtree peers with the members snapshot on the maintenance tick #567.

eager_peers, known_peers and ring_locked were HashSets, so their
iteration order, which the seeded peer selection and the sends follow,
changed between processes, and the simulator gave different results
for the same seed. They are now IndexSets like lazy_peers, and their
accessors return &IndexSet. The sim report also breaks ties on send
time by message id.
With the new Params::maintenance_interval set, every simulated node
runs update_peer_topology every 60 s with a random phase, passing the
members it believes alive; existing tests leave it off. Restart
scenarios report full rebuilds, overlay churn, PRUNE/GRAFT, eager
in-degree over time, where a returning node lands and how soon it gets
messages again, and delivery to nodes not restarting around the send.
Adds a CI-sized flapper test and three ignored longer runs.
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