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 pprof for galley #10047
Add pprof for galley #10047
Conversation
Hi @clyang82. Thanks for your PR. I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Thanks @clyang82 for added this. Could we expose the pprof endpoint on a different port than metrics? Metrics are exposed outside the pod (via container port / service), whereas pprof can be accessed via |
/ok-to-test |
@ayj Thanks for your comments. Right now, |
/ok-to-test |
I thought Pilot exposed pprof on port 8080 along with the other legacy discovery services (see istio/pilot/pkg/proxy/envoy/discovery.go Line 115 in 5a6cca3
|
@ayj Yes. you are right. But |
galley/cmd/galley/cmd/root.go
Outdated
@@ -123,6 +124,8 @@ func GetRootCmd(args []string, printf, fatalf shared.FormatFn) *cobra.Command { | |||
"Interval of updating file for the Galley readiness probe.") | |||
rootCmd.PersistentFlags().UintVar(&monitoringPort, "monitoringPort", 9093, | |||
"Port to use for exposing self-monitoring information") | |||
rootCmd.PersistentFlags().BoolVar(&enableProfiling, "enableProfiling", true, |
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.
Maybe false
for 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.
pilot
, mixer
are true
by default, while citadel
is false
. Do we need to make them to false
for 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.
Not sure. Let's wait for community feedback on this because it doesn't seem right for me that profiling is on by 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.
Thanks for your response. Let us wait for the feedback from community.
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.
Is there a reason for having them on by 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.
I don't know. It is on in the initial version. @kyessenov any thoughts?
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.
Let's keep it off by default. We originally made this default=true in Pilot ~2 years ago to help with early debugging before Istio was used in production.
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.
make it to default=false for mixer
, pilot
, galley
and citadel
. right?
It seems like exposing telemetry and internal diagnostic/debug information on the same port might be risky. If they are separate ports, we can more easily limit pprof exposure by not adding its port to the k8s pod/svc. |
@ayj sounds good. how about?
|
Sounds good in general. We need to be careful about renumbering any Pilot ports that are used by istioctl. cc @rshriram (pilot), @douglas-reid (mixer), @liamawhite (istioctl) |
Codecov Report
@@ Coverage Diff @@
## release-1.1 #10047 +/- ##
==============================================
+ Coverage 68% 70% +2%
==============================================
Files 571 442 -129
Lines 48706 41362 -7344
==============================================
- Hits 32982 28830 -4152
+ Misses 13946 11122 -2824
+ Partials 1778 1410 -368
Continue to review full report at Codecov.
|
Thanks @ayj . I would like to use this PR to add pprof for galley and disable pprof for pilot/mixer/citadel/istioctl by default. Will have a separated PR to handle:
Would you please help review this PR firstly? Thanks. |
/test e2e-dashboard |
@clyang82 if you're changing the debug port in Pilot to |
galley/cmd/galley/cmd/root.go
Outdated
@@ -123,6 +124,8 @@ func GetRootCmd(args []string, printf, fatalf shared.FormatFn) *cobra.Command { | |||
"Interval of updating file for the Galley readiness probe.") | |||
rootCmd.PersistentFlags().UintVar(&monitoringPort, "monitoringPort", 9093, | |||
"Port to use for exposing self-monitoring information") | |||
rootCmd.PersistentFlags().BoolVar(&enableProfiling, "enableProfiling", false, | |||
"Enable pprof for Galley") |
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.
Can you add the pprofPort
flag now and plumb that through StartSelfMonitoring
? That way we can be done with the galley specific changes and address Pilot and Mixer individually.
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.
@ayj sorry for late. I just add pprof
in 9094
. please review again. Let us use this ticket to handle galley
specific changes. Thanks.
/hold @mandarjog wants mixer to have pprof on by default. |
@mandarjog could you share your point why you want to have pprof on by default for mixer? Thanks. |
/hold - please don't change pilot pprof or ports without a strong reason. |
Also: please use the PR description or comments to explain why a change is made - it makes no sense to me to make gratuitous backward incompatible changes like renaming ports. |
@costinm right now, for pilot, they are 2 http ports (8080 & 9093) to expose the same content /metrics, /pprof, /debug, /ready, /version. that is obvious duplication we should keep one for it. |
@clyang82 |
This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
a61a98e
to
1548826
Compare
@clyang82: The following test failed, say
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. I understand the commands that are listed here. |
/retest |
Signed-off-by: Chun Lin Yang <clyang@cn.ibm.com>
Signed-off-by: Chun Lin Yang <clyang@cn.ibm.com>
0d78643
to
0acc8bd
Compare
/assign @ayj |
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: ayj, clyang82 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 |
Enable pprof for
galley
only. the pprof will be started in9094
by default.Signed-off-by: Chun Lin Yang clyang@cn.ibm.com