Skip to content

Cherry-pick #17351 to 7.7: add_process_metadata: container id: Do not cache whole cgroup file for each process#17361

Merged
exekias merged 1 commit intoelastic:7.7from
exekias:backport_17351_7.7
Mar 31, 2020
Merged

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

Conversation

@exekias
Copy link
Copy Markdown
Contributor

@exekias exekias commented Mar 31, 2020

Cherry-pick of PR #17351 to 7.7 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 1f4c076 into elastic:7.7 Mar 31, 2020
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…r each process (elastic#17351) (elastic#17361)

* 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 76f4353)

Co-authored-by: jtinkus <35308202+jtinkus@users.noreply.github.com>
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