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

Improve contention on source table when sending updates #232

Open
LeeSmet opened this issue May 3, 2024 · 0 comments
Open

Improve contention on source table when sending updates #232

LeeSmet opened this issue May 3, 2024 · 0 comments
Labels
type_feature New feature or request

Comments

@LeeSmet
Copy link
Contributor

LeeSmet commented May 3, 2024

Currently sending an update to a peer first checks if the source table needs to be updated, taking a write lock to do so (and if necessary apply said update). This happens just before the update is queued to the peer, in line with the RFC. The issue here is that this fuction is called for every peer which gets the update. This means that for every peer that gets the update, the source table lock is acquired. Since processing an update also takes a (read) lock on the source table, this leads to contention. For instance, every 1 minute, the peers currently get a full route table dump (also a specified in the rfc). This means that the lock is acquired in write mode M*N times, where M is the size of the network, and N is the amount of local peers. Especially for the public nodes this leads to a rather large amount of contention. While the source table should be reworked a bit to perform more of a RCU pattern for updates, we can already improve now by only calculating the effect on the source table once per route (since we advertise the same update to all peers).

@LeeSmet LeeSmet added the type_feature New feature or request label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type_feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant