-
Notifications
You must be signed in to change notification settings - Fork 74
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 profiling to API server #743
Conversation
The following is the coverage report on the affected files.
|
@gabemontero Here's the PR for enabling basic pprof. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to put this Port in the service, isn't it? Or we can just port-forward.
Although we can port-forward from pod also, I think having it in the service is the right way. |
This feature add golang's native profiling server to expose debug profiles.
f819207
to
449dc45
Compare
The following is the coverage report on the affected files.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
This looks good to me.
@avinal @gabemontero
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
yeah per the wg call let's start with this vs. the knative approach I tried, and we can iterate on this over time
next time I get back to api perf testing I hope to try this out, either in conjunction, or as an alternative to, my temporary thread dumps in known problematic calls like ListRecords or UpdateLogs
@gabemontero: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@enarha Let's merge this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: avinal, gabemontero, khrm The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -11,6 +11,8 @@ | |||
| DB_SSLMODE | Database SSL mode | verify-full | | |||
| DB_SSLROOTCERT | Path to CA cert used to validate Database cert | /etc/tls/db/ca.crt | | |||
| DB_ENABLE_AUTO_MIGRATION | Auto-migrate the database on startup (create/update schemas). For further details, refer to <https://gorm.io/docs/migration.html> | true (default) | | |||
| PROFILING | Enable profiling server | false (default) | | |||
| PROFILING_PORT | Profiling Server Port | 6060 (default) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi @sayan-biswas I just tried this and it looks like the PROFILING_PORT
defaulting to 6060
does not take effect
{"level":"info","ts":1715275165.595052,"caller":"api/main.go:237","msg":"Profiling server listening on: "}
{"level":"info","ts":1715275165.5953324,"caller":"api/main.go:259","msg":"Prometheus server listening on: 9090"}
I tried 6060, 8008, and few others anyway, no luck. Unfortunately, you can't run command like netstat
in the container.
I'll try explicitly setting it to 6060
and see what happens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it works OK when I explicitly set PROFILING_PORT
@sayan-biswas
Changes
This feature add golang's native profiling server to expose debug profiles.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you review them:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes