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

Create a Embeddable package to monitor and profile go tools/apps #344

Open
4 tasks
tarunKoyalwar opened this issue Feb 20, 2024 · 1 comment
Open
4 tasks
Labels
Priority: High After critical issues are fixed, these should be dealt with before any further issues.

Comments

@tarunKoyalwar
Copy link
Member

tarunKoyalwar commented Feb 20, 2024

Proposed Changes

  • To easily detect and share performance issues we need a library that effectively profiles application and monitors itself without any external dependency

Tasks

Detection Logic ( Task 3)

  • continious monitering of Process MAX RSS with time as key
  • profiling on every tick with time as key
  • by plotting MAX RSS over time we can find inflection points and filter out IMP/CRITICAL profiles and share them instead of sharing all xGB of profiles

References

@tarunKoyalwar tarunKoyalwar changed the title Create a Embeddable Performance monitor to detect / crash Create a Embeddable package to monitor and profile go tools/apps Feb 20, 2024
@tarunKoyalwar tarunKoyalwar added the Priority: High After critical issues are fixed, these should be dealt with before any further issues. label Feb 20, 2024
@stan-threatmate
Copy link

What worked for me while debugging nuclei is this approach. It will dump the goroutines stack trace and memory allocations on a regular interval until stopped.

  • pprof.WriteHeapProfile()
  • runtime.ReadMemStats(&memStat)
  • pprof.Lookup("goroutine").WriteTo(f, 0)

Running these on an interval will create a new dump file every X minutes which might be what you need. You can then inspect the memory and goroutine stack trace using go tool pprof file.dump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High After critical issues are fixed, these should be dealt with before any further issues.
Projects
None yet
Development

No branches or pull requests

2 participants