Skip to content

Use karmada-search for cache resource #6083

Open
@JimDevil

Description

@JimDevil

pprof file:pprof.zip

Please provide an in-depth description of the question you have:
We want to use the resourceregistry CR of karmada-search to cache resources in order to avoid the issue of the apiserver crashing due to a large number of informer list requests.

So, we conducted a performance test,and here is the test situation.

Testing Environment

2 k8s cluster. one is admin cluster,another one is member cluster

Test case

I want to simulate a list request that responds with a large number of resources at once.

  1. Create 200 secrets in the member cluster, with each secret being 1M in size, expecting a single list to return 200M of data.
  2. Cache the secrets of the member cluster through the ResourceRegistry.

after normal startup and resource cached

Image
Memory usage is around 600M.

start 1 informer

alloc_space

Image

cpu

Image

memory usage

Image
The maximum value reached 1.8G.

start 5 informer

alloc_space

Image

cpu

Image

memory usage

Image
The maximum value reached 5.86G.

start 10 informer

OOM, karmada-seach pod restarts because I set the limit to 8G,message from describe pod

Reason:       OOMKilled

What do you think about this question?:
I think the use of memory seems a bit abnormal.I assumed that one informer request would consume around 200M of memory, but in the program, the actual allocation exceeded 1G.

At the same time, two problems were found.

  1. From the memory profile,it can be seen that memory growth is mainly due to byte.growSlice.
  2. From the cpu profile,it can be seen that runtime.memclrNoheapPointers takes a longer time.

k8s official solution for this situation is to enable watchlist, but it requires a higher version.
We want to use the karmada-search solution in a lower-version cluster.
Are there any optimization solutions?

Environment:

  • Karmada version: 1.12
  • Kubernetes version:
  • Others:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/questionIndicates an issue that is a support question.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions