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

Enable profiling of Vitess on demand #610

Merged
merged 12 commits into from
Oct 29, 2024
Merged

Enable profiling of Vitess on demand #610

merged 12 commits into from
Oct 29, 2024

Conversation

frouioui
Copy link
Member

@frouioui frouioui commented Oct 28, 2024

This PR adds a new capability to both the backend and the admin UI, we can now request profiles of vitess binaries on demand. The enhanced page on the UI enable the admin to ask for profiles and configure them: which binary (vtgate or vttablet) and which mode (cpu, mem, etc). The ansible backend has been modified too in order to support this. If the admin has requested a profile, we set the proper flag to either vtgate or vttablet and wait for the sysbench benchmark to be about to start to send an USR1 signal to start the benchmark, the same is done when sysbench just finished executing.

The profiles are stored directly on the benchmarking node, there is no mechanism yet to get it back automatically or to have it published somewhere.

When the benchmark is done and preferrably when no other benchmarks are running, the admin can SCP onto the benchmarking node and fetch the profiles which are stored under: /pprof/{execution UUID }/{vtgate|vtgate}-{process-id}/cpu.pprof.

I added a new page to the admin to clear out the execution queue too, useful when the queue is overcrowded and we need a specific benchmark quickly.

Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]>
@frouioui frouioui marked this pull request as ready for review October 29, 2024 21:20
Signed-off-by: Florent Poinsard <[email protected]>
@frouioui frouioui merged commit 67c056c into main Oct 29, 2024
11 of 13 checks passed
@frouioui frouioui deleted the enable-pprof branch October 29, 2024 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant