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

ebpf: aggregate python stacks in ebpf program instead of userspace #2996

Merged
merged 5 commits into from
Feb 19, 2024

Conversation

korniltsev
Copy link
Collaborator

We used to stream each sample once it is captured, now we increment counter in ebpf world, and dump it once every profiling interval.

This seem to consume less cpu

Before:
         PM   UID       PID    %usr %system  %guest   %wait    %CPU   CPU  Command
Average:        0    382723    4.57    0.88    0.00    0.00    5.45     -  ___ebpf_python_

After
         PM   UID       PID    %usr %system  %guest   %wait    %CPU   CPU  Command
Average:        0    803223    2.43    0.18    0.00    0.00    2.62     -  ___ebpf_python_

Copy link
Contributor

@simonswine simonswine left a comment

Choose a reason for hiding this comment

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

LGTM

I noticed a small diff comparing the old python profiles with the new ones. Can't really tell if this is something significant wrong. Maybe just have a quick look:

https://flamegraph.com/share/2cd304bb-cf01-11ee-a059-7a6c3496f108

Green is the profile collected using #2996 and red is before

@korniltsev
Copy link
Collaborator Author

I noticed a small diff comparing the old python profiles with the new ones. Can't really tell if this is something significant wrong. Maybe just have a quick look:

https://flamegraph.com/share/2cd304bb-cf01-11ee-a059-7a6c3496f108

Green is the profile collected using #2996 and red is before

I've also added kernel traces in this PR and it looks like the only difference is that new version has kernel stacks in places of
fibonacci.py _get_from_memoization etc.

Does it look reasonable?

@korniltsev korniltsev merged commit 764a83f into main Feb 19, 2024
19 checks passed
@korniltsev korniltsev deleted the ebpf-python-aggregation branch February 19, 2024 12:07
@simonswine
Copy link
Contributor

Does it look reasonable?

Yes makes total sense, missed the kernel stacks change tbf 🙂

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.

2 participants