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

Improve runsc profile collection #220

Closed
prattmic opened this issue Apr 30, 2019 · 1 comment · Fixed by #6579 or #6589
Closed

Improve runsc profile collection #220

prattmic opened this issue Apr 30, 2019 · 1 comment · Fixed by #6579 or #6589
Labels
area: performance Issue related to performance & benchmarks good first issue Good for newcomers priority: p3 Low priority type: enhancement New feature or request

Comments

@prattmic
Copy link
Member

prattmic commented Apr 30, 2019

The ability to collect sentry profiles with runsc is currently quite limited:

  • Only CPU and heap profiles are supported.
  • Profiling can only be enabled after startup with runsc debug. There is no way to enable profiling when the sandbox starts.

We should add more profile types (tracing, block, mutex, etc: https://godoc.org/runtime/pprof#Profile), and the ability to create them at startup.

@prattmic prattmic added type: enhancement New feature or request good first issue Good for newcomers area: performance Issue related to performance & benchmarks priority: p3 Low priority labels Apr 30, 2019
shentubot pushed a commit that referenced this issue May 23, 2019
gopark's signature was changed from having a string reason to a
uint8.

See: golang/go@4d7cf3f

This broke execution tracing of the sentry.

Switching to the right signature makes tracing work again.

Updates #220

PiperOrigin-RevId: 249565311
Change-Id: If77fd276cecb37d4003c8222f6de510b8031a074
tonistiigi pushed a commit to tonistiigi/gvisor that referenced this issue May 23, 2019
gopark's signature was changed from having a string reason to a
uint8.

See: golang/go@4d7cf3f

This broke execution tracing of the sentry.

Switching to the right signature makes tracing work again.

Updates google#220

PiperOrigin-RevId: 249565311
Change-Id: If77fd276cecb37d4003c8222f6de510b8031a074
Upstream-commit: 022bd0f
amscanne pushed a commit to amscanne/gvisor that referenced this issue May 30, 2019
tonistiigi pushed a commit to tonistiigi/gvisor that referenced this issue May 31, 2019
Updates google#220

PiperOrigin-RevId: 250532302
Upstream-commit: 035a8fa
@moricho
Copy link
Contributor

moricho commented Feb 25, 2020

@prattmic
Hi! I worked on this issue and made a PR. At first, I implemented more profile option for runsc debug.
If I have time, I'd like to tackle with the issue to enable profiling when sandbox starts.

ref: #1951

copybara-service bot pushed a commit that referenced this issue Mar 3, 2020
Now runsc only supports CPU and heap profiles.
I added the following new debug option!

- `--profile-goroutine`
- `--profile-block`
- `--profile-mutex`

ref: #220
FUTURE_COPYBARA_INTEGRATE_REVIEW=#1951 from moricho:moricho/add-profiler-option d8ed784
PiperOrigin-RevId: 298691033
prattmic added a commit to prattmic/gvisor that referenced this issue Sep 14, 2021
copybara-service bot pushed a commit that referenced this issue Sep 15, 2021
Add global flags -profile-{block,cpu,heap,mutex} and -trace which
enable collection of the specified profile for the entire duration of a
container execution. This provides a way to definitively start profiling
before that application starts, rather than attempting to race with an
out-of-band `runsc debug`.

Note that only the main boot process is profiled.

Fixes #220

FUTURE_COPYBARA_INTEGRATE_REVIEW=#6579 from prattmic:runsc_do_profile ad052b71469658032cff5f8a95f482156976c66f
PiperOrigin-RevId: 396660344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: performance Issue related to performance & benchmarks good first issue Good for newcomers priority: p3 Low priority type: enhancement New feature or request
Projects
None yet
2 participants