Skip to content

Cherry-pick #17351 to 7.x: add_process_metadata: container id: Do not cache whole cgroup file for each process#17362

Merged
exekias merged 1 commit intoelastic:7.xfrom
exekias:backport_17351_7.x
Mar 31, 2020
Merged

Cherry-pick #17351 to 7.x: add_process_metadata: container id: Do not cache whole cgroup file for each process#17362
exekias merged 1 commit intoelastic:7.xfrom
exekias:backport_17351_7.x

Conversation

@exekias
Copy link
Copy Markdown
Contributor

@exekias exekias commented Mar 31, 2020

Cherry-pick of PR #17351 to 7.x branch. Original message:

  • Enhancement

What does this PR do?

Current solution caches whole content of cgroup file for each process. Let's cache only found container ids.

Also, current solution skips kube-proxy container processes, because cgroup path has suffix /kube-proxy.

Why is it important?

Caching such a pile of useless data has performance impact.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Relates #15947

Use cases

Screenshots

Logs

…r each process (elastic#17351)

* Do not cache whole cgroup file for each process. Include kube-proxy cid too.

Co-authored-by: Jako Tinkus <jatinkus@microsoft.com>
(cherry picked from commit 8a47788)
@exekias exekias merged commit ed0127d into elastic:7.x Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants