...
Page properties | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
...
- API for creating a profiling instance
- For Taskmanager [/taskmanager/:tm-id/profiler?type=create&duration=%d&mode=%s]
- For Jobmanager [/jobmanager/profiler?type=create&duration=%d&mode=%s]
- API for listing the current profiling list
- For Taskmanager [/taskmanager/:tm-id/profiler?type=list]
- For Jobmanager [/jobmanager/profiler?type=list]
- API for downloading a profiling result file(Flame Graph in HTML)
- For Taskmanager [/taskmanager/:tm-id/profiler/:file]
- For Jobmanager [/jobmanager/profiler/:file]
...
On Jobmanager, the steps are similar to those in Taskmanager, the only difference is that we complete the invocation of Async-profiler in Restful Gateway directly (As the dotted line shows in figure 3).
Figure 3. An overview of our proposal on Taskmanager & Jobmanager
...
- Select the taskmanager to be sampled in taskmanager tab (or through the link in the operator detail drawer). Note that we also provided the ability to jump to the taskmanage Page from the back-pressured node in FLINK-29996.
- Type in the appropriate sampling interval, and profiling mode(event_mode), then click the ”Create Profiling Instance“ button to complete the submission of the profiling request.
- The profiling progress will be refreshed automatically. Once the sampling is complete, the link or error message will be displayed in the corresponding profiling request record.
- We can download the interactive HTML file locally by clicking on the download link for further comparison, searching, and sharing.
Figure 4. Examples of user interactions
...
- Ensure that the relevant interface cannot be accessed without enabling the feature, and provide appropriate parameter prompts
- Ensure the maximum sampling time is controlled by the configuration.
- Ensure that scrolling deletion rolling deletion is controlled by the configuration.
...
If changing the configuration is not possible, you may fall back to -e itimer profiling mode.
It is similar to CPU mode but does not require perf_events support. As a drawback, there will be no kernel stack traces.
UPDATE: From the discussion email, we see users want this feature could also leverage perf_events if possible, and since async-profiler could also support allocation and wall-clock profiling, we could extend this feature to support more cases.