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

use HTTP to enable jemalloc profile #4272

Open
siddontang opened this issue Feb 25, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@siddontang
Copy link
Contributor

commented Feb 25, 2019

Feature Request

Is your feature request related to a problem? Please describe:

Now we can send SIGUSR2 to TiKV to start the jemalloc profiler, send the signal again to stop it, then use the jemalloc tool to analyze the result.

Describe the feature you'd like:

I think we can make it more easy to use as Go does. We can use HTTP like accessing http://127.0.0.1:20180/debug/pprof/head?seconds=30, which will enable profiler, let it run 30s and disable it. We can also generate the result and show it on web page directly.

Describe alternatives you've considered:

No

Teachability, Documentation, Adoption, Migration Strategy:

No

@YangKeao

This comment has been minimized.

Copy link
Contributor

commented Apr 28, 2019

I am working on this issue. Plan to add a new entry in status server (such as (&Method::GET, "/jeprof")) which dumps prof to a temporary file and show it on web page.

For example, access /jeprof?seconds=30 will start the profiler, wait asynchronously for 30 seconds and dump the profile, finally return the result and stop the profiler. (Maybe deleting the dump file is also needed, I want to know whether there is a way to dump profile into ram directly?)

Do you have any other advice on this issue?

BTW: I noticed that send signal SIGUSR2 to TiKV will only start but never stop profiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.