Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Figure out why Phragmen is taking so long for staking #4313

Closed
gavofyork opened this issue Dec 6, 2019 · 4 comments
Closed

Figure out why Phragmen is taking so long for staking #4313

gavofyork opened this issue Dec 6, 2019 · 4 comments
Labels
I4-annoyance The client behaves within expectations, however this “expected behaviour” itself is at issue. I8-footprint An enhancement to provide a smaller (system load, memory, network or disk) footprint. U1-asap No need to stop dead in your tracks, however issue should be addressed as soon as possible.
Milestone

Comments

@gavofyork
Copy link
Member

At the end of every era, the chain stalls for some substantial period of time. This is likely due to Phragmen taking too long to execute, coupled with a timeout during block authoring that discards blocks if they take too long to evaluate when executed using wasmi (the slow interpreter).

We need to profile the wasmi execution of this using real data from the chain to confirm that it is taking longer than a few seconds to execute and see what of the algorithm is most problematic (trie i/o, general CPU, memory allocations, crypto), and whether there's a hidden O(N**2) complexity that we didn't see before.

@gavofyork gavofyork added I4-annoyance The client behaves within expectations, however this “expected behaviour” itself is at issue. I8-footprint An enhancement to provide a smaller (system load, memory, network or disk) footprint. U1-asap No need to stop dead in your tracks, however issue should be addressed as soon as possible. labels Dec 6, 2019
@gavofyork gavofyork added this to the 2.1 milestone Dec 6, 2019
@gavofyork gavofyork assigned kianenigma and unassigned kianenigma Dec 9, 2019
@gavofyork
Copy link
Member Author

@kianenigma one to look into once you're back online.

@burdges
Copy link

burdges commented Dec 14, 2019

cc @AlfonsoCev

@gui1117 gui1117 mentioned this issue Jan 14, 2020
@gnunicorn gnunicorn modified the milestones: 2.1, Polkadot Mar 4, 2020
@kianenigma
Copy link
Contributor

alleviated via #4517.

As for a wasmi benchmark, the current benchmark force has already included this as well.

@kianenigma kianenigma reopened this Jun 4, 2020
@kianenigma
Copy link
Contributor

Okay I confidently see this is closed as we have now different mechanisms in place.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I4-annoyance The client behaves within expectations, however this “expected behaviour” itself is at issue. I8-footprint An enhancement to provide a smaller (system load, memory, network or disk) footprint. U1-asap No need to stop dead in your tracks, however issue should be addressed as soon as possible.
Projects
None yet
Development

No branches or pull requests

4 participants