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

Fix the problem that /debug/pprof/heap will wait 10s #403

Merged
merged 16 commits into from
Dec 16, 2024

Conversation

CalvinNeo
Copy link
Member

@CalvinNeo CalvinNeo commented Dec 13, 2024

The problem is that according to

pub async fn start_one_heap_profile<F>(
, the http API /debug/pprof/heap will use a ProfileGuard to sample at least the interval of time.

However, if we already enabled prof.active, it is no longer necessary to sleep this duration to sample.

So we will remove this interval, and dump directly. And thus requires the user to explicitly turn on prof.active.

This behavior also correspond to the behavior that after we enabled continous profiling, which TiKV already did.

The change is that we totally use TiKV's idea that make /heap dump only the prof.dump file.

What is changed and how it works?

Issue Number: Close #xxx

What's Changed:


Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Release note


CalvinNeo and others added 11 commits December 7, 2024 15:46
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
f
Signed-off-by: Calvin Neo <[email protected]>
z
Signed-off-by: Calvin Neo <[email protected]>
@ti-chi-bot ti-chi-bot bot added the size/XL label Dec 13, 2024
@ti-chi-bot ti-chi-bot bot added size/M and removed size/XL labels Dec 13, 2024
f
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
a
Signed-off-by: Calvin Neo <[email protected]>
Copy link
Collaborator

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot bot added the lgtm label Dec 16, 2024
Copy link

ti-chi-bot bot commented Dec 16, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

ti-chi-bot bot commented Dec 16, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-16 03:31:48.344742417 +0000 UTC m=+841298.433544960: ☑️ agreed by JaySon-Huang.

@ti-chi-bot ti-chi-bot bot added the approved label Dec 16, 2024
@CalvinNeo CalvinNeo merged commit a0aefde into pingcap:raftstore-proxy Dec 16, 2024
3 of 5 checks passed
CalvinNeo added a commit to CalvinNeo/tidb-engine-ext that referenced this pull request Dec 17, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants