Skip to content

Comments

Scaling up gobgp, handleFSMMessage re-entrant#3303

Draft
nplanelcisco wants to merge 9 commits intoosrg:masterfrom
nplanelcisco:nplanel/scale-up
Draft

Scaling up gobgp, handleFSMMessage re-entrant#3303
nplanelcisco wants to merge 9 commits intoosrg:masterfrom
nplanelcisco:nplanel/scale-up

Conversation

@nplanelcisco
Copy link
Contributor

This PR will enable handleFSMMessage function to be re-entrant, this will allow peers to run in parallel
Notes:
o adj tables are accessed under s.shared.Lock()
o I ran some benchmark and fuzzing adding/delete peers and path dynamically under -race

Plan:
I let this PR as draft as it missing
o a concurrent manager.Table.Update() race unit tests
o some benchmark results

@fujita
Copy link
Member

fujita commented Jan 26, 2026

I think that adding RWMutex to destination consumes too much memory. If we enable concurrent access to a table, sharding would be an option.
Making handleFSMMessage read lock needs more work. For example, stopNeighbor() manipulates neighborMap.

@nplanelcisco
Copy link
Contributor Author

I think that adding RWMutex to destination consumes too much memory. If we enable concurrent access to a table, sharding would be an option. Making handleFSMMessage read lock needs more work. For example, stopNeighbor() manipulates neighborMap.

Thank you,
o fixed the stopNeighbor() by calling it under write lock
o limited the number of destination mutex by allocating lock bucket based on NLRI
o adding some FSM Handler race tests
o made EVPNMacNLRIs thread safe

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.

2 participants