Since Flink 1.19, we support profiling the JobManager/TaskManager process interactively with [async-profiler](
https://github.com/async-profiler/async-profiler) via the Flink Web UI, which allows users to create a profiling instance with arbitrary intervals and event modes, e.g ITIMER, CPU, Lock, Wall-Clock and Allocation.
Flink users can complete the profiling submission and result export via Flink Web UI conveniently.
For example,
- First, users should find out the candidate TaskManager/JobManager with performance bottleneck for profiling, and switch to the corresponding TaskManager/JobManager page (profiler tab).
- Users can submit a profiling instance with a specified period and mode by simply clicking on the button `Create Profiling Instance`. (The description of the profiling mode will be shown when hovering over the corresponding mode.)
- Once the profiling instance is complete, the user can easily download the interactive HTML file by clicking on the link.
**More Information**
- [Documents](
https://nightlies.apache.org/flink/flink-docs-release-1.19/docs/ops/debugging/profiler/)
- [FLIP-375: Built-in cross-platform powerful java profiler](
https://cwiki.apache.org/confluence/x/64lEE)