Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

High CPU usage waiting for events #213

Open
dathan opened this issue Oct 11, 2019 · 1 comment
Open

High CPU usage waiting for events #213

dathan opened this issue Oct 11, 2019 · 1 comment

Comments

@dathan
Copy link

dathan commented Oct 11, 2019

Attached is a gif of system calls showing a poll, when an event loop is intended. This polling is spiking the operator causing it to chew up CPU by spinning waiting for an event.

out

operators.Watch seems to be the cause of the CPU spins.

https://github.com/awslabs/aws-service-operator/blob/master/pkg/server/server.go#L61

go operators.Watch(ctx, k8sNamespaceToWatch)

Nested in this code path, is a channel interaction that causes channels to be replaced, producing a loop, which I believe is the root cause of the spin to catch events.

@dathan
Copy link
Author

dathan commented Oct 11, 2019

To give you an idea of the CPU spin severity the aws-service-operator chews up 300% (3 cores) of my laptop and is the highest system resource on our kube-cluster; most of the time it is waiting for events - which exposes the spin.

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

No branches or pull requests

1 participant