-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add: eBPF profiling #35
base: main-dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please use git commit --amend
to patch the commit name. The current "feat: ebpf beanchmarks" has both a spelling mistake and is different from guidelines. "Add: eBPF profiling" makes more sense to me.
Other than that, great to see progress! Can you please add an output example in the PR showcasing the logs when using your eBPF version vs the original? Does it already include the break-down for separate workloads - showcasing time spent on the system-call side vs actual user-space code?
594b888
to
1991aac
Compare
Thanks for the updates.
|
26ea3ad
to
82ba123
Compare
removing eBPF script's stand-alone mode more details about syscalls
Overview
This pull request introduces an eBPF benchmark to the codebase, enabling advanced performance measurement capabilities. The eBPF benchmark collects the following metrics:
Setup
eBPF benchmark requires bcc toolkits to be installed. Please follow the instructions here.
Implementation details
The eBPF benchmark is implemented as a separate process that runs in parallel to the workload. The eBPF benchmark is implemented in Python and uses the bcc toolkit to collect the metrics. The eBPF benchmark is started by the
run.py
script and is stopped when the workload finishes, due to some limitationslazy
flag was added to the benchmark, to enable communication via SIGUSR1 and SIGUSR2 to the start and the end of the workload.To reduce overhead when collecting time related metrics,
--with-ebpf-memory
is instroducesed, which (if not given) disables the collection of memory related metrics. The memory related metrics are collected by the eBPF benchmark using thekprobes
mechanism, which is known to have a significant overhead. Without--with-ebpf-memory
flag, time overhead is around 1%.Some Results
System Calls
The following benchmark were run on an XPS 15 7590, Intel® Core™ i7-9750H CPU @ 2.60GHz × 12 on a 100MB configuration.
Init
Read
Batch Read
Range Select
Scan
Read Update 50 50
Read Upsert 95 5
Batch Upsert
Remove
Execution
When running following command
sudo python3 ./run.py --with-ebpf --with-ebpf-memory --workload-names RangeSelect --db-names leveldb
The eBPF benchmark will create a file
bench/ebpf/snapshots/rocksdb_100MB/RangeSelect-1690716880466.json
whose content would look like something like this