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

feat:add some self metric for agent cpu and memory usage #243

Merged

Conversation

NeJan2020
Copy link
Collaborator

Description

This PR adds some extra performance metrics, which could be used in self-monitoring or e2e tests.

Extra Metrics

  • kindling_telemetry_agent_cpu_time_seconds
    • CPU time cost by agent(collector) in system and user , the unit is second, differentiated by the label named 'type'
  • kindling_telemetry_agent_memory_used_bytes
    • Resident set size (RSS) or Virtual memory size (VMS) occupied by agent(collectir)

Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
@NeJan2020 NeJan2020 requested a review from dxsup June 9, 2022 04:01
@dxsup
Copy link
Member

dxsup commented Jun 9, 2022

Could you explain why these metrics are necessary since cAdvisor has observed them?

@NeJan2020
Copy link
Collaborator Author

NeJan2020 commented Jun 9, 2022

Could you explain why these metrics are necessary since cAdvisor has observed them?

You are right, normally the metrics from cAdvisor are enough for us to check the state of the agent.
Only in performance testing, we may need more precise data, such as once per second. However, changing the scrape interval of cAdvisor may be expensive since it scrapes all containers together.

@NeJan2020 NeJan2020 changed the title WIP: feat:add some self metric for agent cpu and memory usage feat:add some self metric for agent cpu and memory usage Jun 9, 2022
NeJan2020 added 4 commits June 9, 2022 16:55
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
dxsup
dxsup previously approved these changes Jun 13, 2022
Copy link
Member

@dxsup dxsup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: niejiangang <niejiangang@harmonycloud.cn>
Copy link
Member

@dxsup dxsup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dxsup dxsup merged commit e962764 into KindlingProject:main Jun 13, 2022
@NeJan2020 NeJan2020 deleted the feat/agent-self-preformance-metrics branch June 28, 2022 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants