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

Support debug/pprof/symbol call to enable remote jeprof #392

Merged
merged 8 commits into from
Aug 23, 2024

Conversation

CalvinNeo
Copy link
Member

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


a
Signed-off-by: Calvin Neo <[email protected]>
b
Signed-off-by: Calvin Neo <[email protected]>
b
Signed-off-by: Calvin Neo <[email protected]>
Signed-off-by: Calvin Neo <[email protected]>
@ti-chi-bot ti-chi-bot bot added the size/L label Aug 23, 2024
a
Signed-off-by: Calvin Neo <[email protected]>
b
Signed-off-by: Calvin Neo <[email protected]>
c
Signed-off-by: Calvin Neo <[email protected]>
@CalvinNeo CalvinNeo changed the title Support remote Support debug/pprof/symbol call to enable remote jeprof Aug 23, 2024
@ti-chi-bot ti-chi-bot bot added the lgtm label Aug 23, 2024
Copy link

ti-chi-bot bot commented Aug 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Lloyd-Pottiger

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 Aug 23, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-23 09:31:21.380439081 +0000 UTC m=+517076.514889315: ☑️ agreed by Lloyd-Pottiger.

@ti-chi-bot ti-chi-bot bot added the approved label Aug 23, 2024
@CalvinNeo
Copy link
Member Author

Note, we still have to set

export MALLOC_CONF="prof:true,prof_active:false"

in scripts/run_tiflash.sh

before a newer version of tiup than 1.16 is released.

@ti-chi-bot ti-chi-bot bot merged commit f2e5fb8 into pingcap:raftstore-proxy Aug 23, 2024
5 checks passed
@@ -1007,6 +1007,8 @@ fn test_msgsnapshot_before_msgappend() {

pd_client.must_add_peer(1, new_learner_peer(2, 2));

std::thread::sleep(std::time::Duration::from_secs(1));
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we need a "sleep" here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Wait for a failed MsgSnapshot

@CalvinNeo
Copy link
Member Author

Sleep 10s on proxy's side

perl /DATA/disk3/calvin_81/disk1/tiflash/tics2/contrib/tiflash-proxy/proxy_components/proxy_server/src/status_server/jeprof.in --raw "http://127.0.0.1:5765/debug/pprof/heap"

stdout

!!!!! CMD is curl -s --fail 'http://127.0.0.1:5765/debug/pprof/heap' > /DATA/disk1/calvin/jeprof/.tmp.tiflash.1724656693.127.0.0.1.pprof.heap
Fetching /pprof/heap profile from http://127.0.0.1:5765/debug/pprof/heap to
  /DATA/disk1/calvin/jeprof/tiflash.1724656693.127.0.0.1.pprof.heap
Wrote profile to /DATA/disk1/calvin/jeprof/tiflash.1724656693.127.0.0.1.pprof.heap

Proxy's log

[2024/08/26 15:18:13.222 +08:00] [INFO] [profile.rs:111] ["!!!!!! start_one_heap_profile start"] [thread_id=670]
[2024/08/26 15:18:23.223 +08:00] [INFO] [profile.rs:115] ["!!!!!! start_one_heap_profile end"] [thread_id=670]

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.

3 participants