Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

route calculation performed too frequently under high load #1762

Open
rade opened this issue Dec 8, 2015 · 4 comments
Open

route calculation performed too frequently under high load #1762

rade opened this issue Dec 8, 2015 · 4 comments

Comments

@rade
Copy link
Member

rade commented Dec 8, 2015

The route calculation contains some clever logic to coalesce multiple recalculation requests into one. However, I am quite sure this isn't effective when receiving a deluge of topology updates on a single connection, such as can happen under load when backlogs can accumulate in tcp buffers. Each update will trigger a separate recalculation. With #1761 in mind, this is hugely costly.

@rade
Copy link
Member Author

rade commented Dec 8, 2015

We could perhaps attempt to drain connections of gossip traffic before processing it in bulk. Or maybe make GossipChannels active components that have separate process and propagation phases.

@rade
Copy link
Member Author

rade commented Dec 9, 2015

Simply dropping the EnsureRecalculated calls does have quite a beneficial effect. At the cost of accuracy. Does that matter? I reckon the place where this could do the most harm is in broadcastPeerUpdate when we've just added a connection - there is a risk that the broadcast won't reach the new peer. OTOH, if it really is a new peer then we actually SendAllGossipDown the connection. And if it's not a new peer then the broadcast might still reach it via the old route.

@rade
Copy link
Member Author

rade commented Dec 9, 2015

Simply dropping the EnsureRecalculated calls does have quite a beneficial effect. At the cost of accuracy. Does that matter?

Some of the gossip unit tests fail. Not all that surprising, I suppose.

@rade
Copy link
Member Author

rade commented Dec 29, 2015

Since we solved #1761, this is less important.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant