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 memory profiling over time #599

Merged
merged 1 commit into from
Jul 5, 2021
Merged

feat: add memory profiling over time #599

merged 1 commit into from
Jul 5, 2021

Conversation

brushknight
Copy link
Contributor

@brushknight brushknight commented Jun 30, 2021

Problem

Out memory profiler is dumping heap in the beginning of runtime.

Solution

Add interval heap dump over agent runtime

Technical details

  • We add new config option MemProfileInterval yaml:"mem_profile_interval" envconfig:"mem_profile_interval" that will be set automatically if MemProfile present. Default value is 300 seconds (5 minutes) and can be configured by user.
  • If MemProfile variable is set, agent will start creating heap profile each MemProfileInterval seconds and save it in the path stored in the variable like PATH_000000300s, PATH_000000600s where 000000300s is agent uptime mark.

@brushknight brushknight force-pushed the fix/mempprof branch 3 times, most recently from 1fc4c19 to 318752e Compare June 30, 2021 09:37
@brushknight brushknight force-pushed the fix/mempprof branch 2 times, most recently from 66b7233 to 4d232e8 Compare July 1, 2021 13:31
internal/agent/agent.go Outdated Show resolved Hide resolved
internal/agent/agent.go Outdated Show resolved Hide resolved
internal/agent/agent.go Outdated Show resolved Hide resolved
internal/agent/agent.go Outdated Show resolved Hide resolved
pkg/config/config.go Outdated Show resolved Hide resolved
Copy link
Contributor

@varas varas left a comment

Choose a reason for hiding this comment

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

LGTM! just some not so relevant comments

But I'm not approving without a user readable usage & behaviour description.

@brushknight brushknight force-pushed the fix/mempprof branch 2 times, most recently from 3b6669a to 13fc0f7 Compare July 2, 2021 07:38
internal/agent/agent.go Outdated Show resolved Hide resolved
varas
varas previously approved these changes Jul 2, 2021
internal/agent/agent.go Outdated Show resolved Hide resolved
@brushknight brushknight merged commit 0811801 into master Jul 5, 2021
@brushknight brushknight deleted the fix/mempprof branch July 5, 2021 12:03
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.

None yet

2 participants