Re: High memory usage for simple helm-operator

7 views
Skip to first unread message

Daniel Messer

unread,
Sep 3, 2021, 8:05:10 AM9/3/21
to Michele Dolfi, operator-framework-sdk-dev, Operator Framework
High memory usage in controllers is often rooted in large amount of caches the Informers are maintaining. The size increases proportionally with the amount of watched resource kind and watched names. Can you share your watches.yaml? cc @operator-framework-sdk-dev 

On Fri, Sep 3, 2021 at 9:15 AM Michele Dolfi <d...@zurich.ibm.com> wrote:

Hello,

We used the tutorial for building an operator using helm. This is using the latest helm-operator v1.11.0.

We are installing the operator on a non-small OpenShift 4.7 cluster (60 nodes, +2k Pods).
While installing we had to go through multiple OOM crashes and constantly increase the memory limit.
We finally got the operator manager running, but it is constantly using >1.2GB of memory.

We believe there should be something weird. Can something be improved in the PROJECT or watches.yaml file?
Are there known cases which could increase the memory usage?

It looks like that the helm-operator manager is fetching all APIs on the cluster (or at least a huge fraction of those). Is this really needed? Could this be the bottleneck?


Best,
Michele

--
You received this message because you are subscribed to the Google Groups "Operator Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to operator-framew...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/operator-framework/061cfc45-1252-4fb9-aba0-e7a13c188c64n%40googlegroups.com.


--
Daniel Messer

Product Manager Operator Framework & Quay

Red Hat OpenShift

Camila Macedo

unread,
Sep 3, 2021, 11:03:15 AM9/3/21
to Daniel Messer, Michele Dolfi, Operator Framework, operator-framework-sdk-dev
Hi Michele,

Is that a Helm project, Am I right? Would the selectors be able to help out filter what should or not be watched? Did you try this feature? 

selectorThe conditions that a resource’s labels must satisfy in order to get reconciled. For additional information see labels and selectors documentation.

Cheers, 

CAMILA MACEDO

SR. SOFTWARE ENGINEER 

RED HAT Operator framework

Red Hat UK

She / Her / Hers

IM: cmacedo






On Fri, Sep 3, 2021 at 1:17 PM Daniel Messer <dme...@redhat.com> wrote:
Can you also describe how the Operator is deployed? if it's via OLM, what's the OperatorGroup configuration?

On Fri, Sep 3, 2021 at 2:14 PM Michele Dolfi <d...@zurich.ibm.com> wrote:
Sure, here is the content of the file.
We also tried setting watchDependentResources to false, but it didn't help.


# Use the 'create api' subcommand to add watches to this file.
version: v1alpha1
kind: KgAmqp
chart: helm-charts/kgamqp
watchDependentResources: false
#+kubebuilder:scaffold:watch




--
Daniel Messer

Product Manager Operator Framework & Quay

Red Hat OpenShift

--
You received this message because you are subscribed to the Google Groups "Operator Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to operator-framew...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages