Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_process_metadata and and_docker_metadata shouldn't initialize a cgroup reader more than once #41065

Open
fearful-symmetry opened this issue Oct 1, 2024 · 1 comment
Assignees
Labels
needs_team Indicates that the issue/PR needs a Team:* label

Comments

@fearful-symmetry
Copy link
Contributor

Right now both of these processors are calling processCgroupsPaths every time they run:

processCgroupPaths = cgroup.ProcessCgroupPaths

But processCgroupsPaths initializes a new reader every time:

reader, err := NewReader(hostfs, false)

NewCgroupReader is a pretty heavy method and should not be called regularly, this is leading to a considerable amount of wasted CPU cycles.

The processors must register a new cgroup reader once at startup.

@fearful-symmetry fearful-symmetry self-assigned this Oct 1, 2024
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 1, 2024
@botelastic
Copy link

botelastic bot commented Oct 1, 2024

This issue doesn't have a Team:<team> label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

No branches or pull requests

1 participant