kube-mgmt icon indicating copy to clipboard operation
kube-mgmt copied to clipboard

High CPU usage in OPA containers

Open albqmasqeet opened this issue 4 years ago • 1 comments

Trying to use opa and kube-mgmt in a cluster to replicate nodes, deployments and statefulsets is causing high cpu (almost 2 cores) in OPA. When I disable replication of these objects CPU usage goes back to 1 millicore.

Number of cluster objects are as follows: Nodes: 171 Deployments: 2021 StatefulSets: 171

When we hit high CPU, OPA is not responsive and returns failures for all updates from kube-mgmt. Is there a way to batch updates from kube-mgmt to OPA?

albqmasqeet avatar Jul 06 '20 15:07 albqmasqeet

Can you provide some details about what versions are being used? Please also provide logs of the errors you are seeing.

kube-mgmt does batch the requests for initial synchronization as of v0.10 (see https://github.com/open-policy-agent/kube-mgmt/pull/50) after that it is sending over objects as they change. Do you have a large amount of churn on the objects? Or is it the initial loading that is causing a problem?

patrick-east avatar Jul 06 '20 18:07 patrick-east

2 yrs passed without feedback. Hopefully all those issues are solved. If not - please create a new issues with all required steps to replicate.

eshepelyuk avatar Oct 12 '22 21:10 eshepelyuk