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

cilium policy delete root takes a long time #411

Closed
tgraf opened this issue Mar 22, 2017 · 3 comments
Closed

cilium policy delete root takes a long time #411

tgraf opened this issue Mar 22, 2017 · 3 comments
Assignees
Labels
kind/bug This is a bug in the Cilium logic.

Comments

@tgraf
Copy link
Member

tgraf commented Mar 22, 2017

The policy regeneration takes a long time which slows down all policy API interactions.

@tgraf tgraf added the kind/bug This is a bug in the Cilium logic. label Mar 22, 2017
@aanm
Copy link
Member

aanm commented Mar 23, 2017

When the root node gets deleted, all endpoints need to recalculate their policy (as expected), unfortunately this happens sequentially, any reason not to do it in parallel? I'm doing some tests to see out it goes.

@tgraf
Copy link
Member Author

tgraf commented Mar 23, 2017

When the root node gets deleted, all endpoints need to recalculate their policy (as expected), unfortunately this happens sequentially, any reason not to do it in parallel? I'm doing some tests to see out it goes.

I think it is the actual rebuilding of programs that is expensive. The policy calculation is probably quick but the rebuilding should be moved to go subroutines. We should probably have a go subroutine listening on a channel for build requests and then spawn n number of build workers.

I think we should limit it to one build per endpoint though and to n parallel builds in total.

A first good step is to measure how much of the time is spent retrieving the identity from kvstore, policy calc and then actual building.

All of this is done within endpointsMU lock which blocks out any read operation. This is also why endpoint list eventually takes a long time.

@aanm aanm self-assigned this Mar 24, 2017
@tgraf tgraf added this to the 0.9 milestone Apr 1, 2017
@aanm
Copy link
Member

aanm commented Apr 15, 2017

Fixed by #424

@aanm aanm closed this as completed Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is a bug in the Cilium logic.
Projects
None yet
Development

No branches or pull requests

2 participants