Skip to content

chore(cluster): add support for pprof via alpha.cnpg.io/enableInstancePprof annotation#7876

Merged
mnencia merged 13 commits intomainfrom
dev/pprof_instance_manager
Sep 16, 2025
Merged

chore(cluster): add support for pprof via alpha.cnpg.io/enableInstancePprof annotation#7876
mnencia merged 13 commits intomainfrom
dev/pprof_instance_manager

Conversation

@sxd
Copy link
Member

@sxd sxd commented Jun 23, 2025

This change introduces the ability to enable the Go pprof HTTP server in instance pods by setting the alpha.cnpg.io/enableInstancePprof annotation to "true" on a Cluster resource.

When enabled, each instance pod exposes a pprof server on port 6060/TCP, making it possible to collect and analyse profiling data for debugging and performance tuning. The operator automatically manages the rolling update needed to apply or remove the annotation.

Closes #4056

@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.22 release-1.25 release-1.26 labels Jun 23, 2025
@github-actions
Copy link
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@sxd sxd force-pushed the dev/pprof_instance_manager branch 3 times, most recently from 3a4fb3b to b6aedb0 Compare June 26, 2025 13:15
@sxd sxd marked this pull request as ready for review June 26, 2025 13:16
@sxd sxd requested review from a team, NiccoloFei, jsilvela and litaocdl as code owners June 26, 2025 13:16
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. chore Intangible work to reduce technical debt labels Jun 26, 2025
@sxd sxd force-pushed the dev/pprof_instance_manager branch from b6aedb0 to 6fa1a0a Compare June 26, 2025 13:42
@armru armru force-pushed the dev/pprof_instance_manager branch from 6fa1a0a to 95924fc Compare June 27, 2025 10:52
@armru armru changed the title chore: add pprof server deployment to the instanace manager chore: add pprof server deployment to the instance manager Jun 27, 2025
@armru armru changed the title chore: add pprof server deployment to the instance manager chore: add pprof server deployment to the instance manager Jun 27, 2025
@armru armru force-pushed the dev/pprof_instance_manager branch 5 times, most recently from 9c8e944 to 9707b2d Compare June 27, 2025 12:43
@sxd
Copy link
Member Author

sxd commented Jun 27, 2025

Closing since it's not the desired implementation

@sxd sxd closed this Jun 27, 2025
@github-actions
Copy link
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@mnencia mnencia reopened this Jul 21, 2025
@github-actions
Copy link
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@mnencia
Copy link
Member

mnencia commented Jul 21, 2025

Reopened as we want to have pprof usable in 1.27.0

@github-actions
Copy link
Contributor

@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/17760504825

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Sep 16, 2025
@mnencia mnencia force-pushed the dev/pprof_instance_manager branch from cdd0db5 to d506c46 Compare September 16, 2025 12:09
sxd and others added 11 commits September 16, 2025 16:26
This helps to debug the instance manager to search for leaks and some
other perfomances issues

Closes #4056

Signed-off-by: Jonathan Gonzalez V. <jonathan.gonzalez@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
@gbartolini gbartolini force-pushed the dev/pprof_instance_manager branch from b17e8fe to 00fa7da Compare September 16, 2025 14:26
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
@mnencia mnencia force-pushed the dev/pprof_instance_manager branch from f40b2c6 to 79b3dea Compare September 16, 2025 14:55
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
@gbartolini gbartolini changed the title chore: add pprof server deployment to the instance manager feat(cluster): add support for pprof via alpha.cnpg.io/enableInstancePprof annotation Sep 16, 2025
@gbartolini gbartolini changed the title feat(cluster): add support for pprof via alpha.cnpg.io/enableInstancePprof annotation chore(cluster): add support for pprof via alpha.cnpg.io/enableInstancePprof annotation Sep 16, 2025
@mnencia mnencia merged commit 46ed0bd into main Sep 16, 2025
37 checks passed
@mnencia mnencia deleted the dev/pprof_instance_manager branch September 16, 2025 15:47
cnpg-bot pushed a commit that referenced this pull request Sep 16, 2025
…cePprof` annotation (#7876)

This change introduces the ability to enable the Go pprof HTTP server in
instance pods by setting the `alpha.cnpg.io/enableInstancePprof`
annotation to "true" on a Cluster resource.

When enabled, each instance pod exposes a pprof server on port 6060/TCP,
making it possible to collect and analyse profiling data for debugging
and performance tuning. The operator automatically manages the rolling
update needed to apply or remove the annotation.

Closes #4056

Signed-off-by: Jonathan Gonzalez V. <jonathan.gonzalez@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
(cherry picked from commit 46ed0bd)
mnencia added a commit that referenced this pull request Sep 16, 2025
…cePprof` annotation (#7876)

This change introduces the ability to enable the Go pprof HTTP server in
instance pods by setting the `alpha.cnpg.io/enableInstancePprof`
annotation to "true" on a Cluster resource.

When enabled, each instance pod exposes a pprof server on port 6060/TCP,
making it possible to collect and analyse profiling data for debugging
and performance tuning. The operator automatically manages the rolling
update needed to apply or remove the annotation.

Closes #4056

Signed-off-by: Jonathan Gonzalez V. <jonathan.gonzalez@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
(cherry picked from commit 46ed0bd)
mnencia added a commit that referenced this pull request Sep 16, 2025
…cePprof` annotation (#7876)

This change introduces the ability to enable the Go pprof HTTP server in
instance pods by setting the `alpha.cnpg.io/enableInstancePprof`
annotation to "true" on a Cluster resource.

When enabled, each instance pod exposes a pprof server on port 6060/TCP,
making it possible to collect and analyse profiling data for debugging
and performance tuning. The operator automatically manages the rolling
update needed to apply or remove the annotation.

Closes #4056

Signed-off-by: Jonathan Gonzalez V. <jonathan.gonzalez@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
(cherry picked from commit 46ed0bd)
rossigee pushed a commit to rossigee/cloudnative-pg that referenced this pull request Oct 2, 2025
…cePprof` annotation (cloudnative-pg#7876)

This change introduces the ability to enable the Go pprof HTTP server in
instance pods by setting the `alpha.cnpg.io/enableInstancePprof`
annotation to "true" on a Cluster resource.

When enabled, each instance pod exposes a pprof server on port 6060/TCP,
making it possible to collect and analyse profiling data for debugging
and performance tuning. The operator automatically manages the rolling
update needed to apply or remove the annotation.

Closes cloudnative-pg#4056

Signed-off-by: Jonathan Gonzalez V. <jonathan.gonzalez@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
THE-BRAHMA pushed a commit to THE-BRAHMA/cloudnative-pg that referenced this pull request Oct 30, 2025
…cePprof` annotation (cloudnative-pg#7876)

This change introduces the ability to enable the Go pprof HTTP server in
instance pods by setting the `alpha.cnpg.io/enableInstancePprof`
annotation to "true" on a Cluster resource.

When enabled, each instance pod exposes a pprof server on port 6060/TCP,
making it possible to collect and analyse profiling data for debugging
and performance tuning. The operator automatically manages the rolling
update needed to apply or remove the annotation.

Closes cloudnative-pg#4056

Signed-off-by: Jonathan Gonzalez V. <jonathan.gonzalez@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: theBrahma <office.utpal.brahma@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases chore Intangible work to reduce technical debt lgtm This PR has been approved by a maintainer ok to merge 👌 This PR can be merged release-1.25 release-1.26 release-1.27 size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add the pprof service to the instance manager

6 participants