Prism is a fine-grained metric collection tool that aims to facilitate uncovering the cause of an application's performance degradation through a generalisable set of metrics. E.g. In a scenario where a database is under lock contention through simultaneous access to the same dataset, Prism will highlight the database threads and futex resource behind this activity. Currently Prism supports discovering and tracing co-located processes that have communicated (through IPC mechanisms such as pipes, sockets, and futexes) with the initial target application.
- Install nix for your distro
- Get a local clone of this repository
We start by creating a data directory, which is where Prism will write its data to:
mkdir data 2>/dev/null
We then install the dependencies specified in the shell.nix
file, and make these available in your shell environment with:
nix-shell shell.nix
Within the nix-shell environment, you may now start Prism (don't forget to change the <pid>
argument in the command):
RUST_LOG=info cargo run -r -p metric-collector --config 'target."cfg(all())".runner="sudo -E"' -- --pids <pid>
Press Ctrl-C
to terminate Prism. A new file will be made available in the data/
directory we created in the first command. E.g.:
$ ls -la data
.rw-r--r-- 4,7M username 11 apr 16:54 prism-2025-04-11T14:53:27.082056990+00:00.db3
Make sure you are still in the nix-shell environment and you may analyse the data with:
v1.1.3 19864453f7
$ duckdb "data/prism-2025-04-11T14:53:27.082056990+00:00.db3"
Enter ".help" for usage hints.
D select * from taskstats_view;
ββββββββββββββββββββββββββββββ¬βββββββββββββ¬βββββββββ¬βββββββββ¬ββββββββββββββββββ¬ββββββββββββ¬βββββββββββ¬ββββββββββββββββββββββββ¬ββββββββββββββ¬ββββββββββββββββββββββ
β ts β time_diff β pid β tid β comm β run_share β rq_share β uninterruptible_share β blkio_share β interruptible_share β
β timestamp β int64 β uint32 β uint32 β varchar β double β double β double β double β double β
ββββββββββββββββββββββββββββββΌβββββββββββββΌβββββββββΌβββββββββΌββββββββββββββββββΌββββββββββββΌβββββββββββΌββββββββββββββββββββββββΌββββββββββββββΌββββββββββββββββββββββ€
β 2025-04-11 14:53:56.872306 β 998514000 β 1018 β 1062 β gdbus β 0.0 β 0.0 β 0.0 β 0.0 β 1.0 β
β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β
β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β
β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β
β 2025-04-11 14:54:45.893241 β 1000157000 β 73150 β 73155 β GpuMemoryThread β 0.0 β 0.0 β 0.0 β 0.0 β 1.0 β
ββββββββββββββββββββββββββββββ΄βββββββββββββ΄βββββββββ΄βββββββββ΄ββββββββββββββββββ΄ββββββββββββ΄βββββββββββ΄ββββββββββββββββββββββββ΄ββββββββββββββ΄ββββββββββββββββββββββ€
β 20640 rows (2 shown) 10 columns β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
D select * from vfs;
ββββββββββββββββββββββββββββββ¬βββββββββ¬βββββββββ¬βββββββββββββ¬ββββββββββββ¬βββββββββββ¬ββββββββ¬βββββββββββββ¬βββββββββββββββββ¬βββββββββ¬βββββββββ¬βββββββββ¬βββββββββ¬βββββββββ¬βββββββββ¬βββββββββ¬βββββββββ
β ts_s β pid β tid β fs_magic β device_id β inode_id β op β total_time β total_requests β hist0 β hist1 β hist2 β hist3 β hist4 β hist5 β hist6 β hist7 β
β timestamp β uint32 β uint32 β uint32 β uint32 β uint64 β uint8 β uint64 β uint32 β uint32 β uint32 β uint32 β uint32 β uint32 β uint32 β uint32 β uint32 β
ββββββββββββββββββββββββββββββΌβββββββββΌβββββββββΌβββββββββββββΌββββββββββββΌβββββββββββΌββββββββΌβββββββββββββΌβββββββββββββββββΌβββββββββΌβββββββββΌβββββββββΌβββββββββΌβββββββββΌβββββββββΌβββββββββΌβββββββββ€
β 2025-04-11 14:53:32.009116 β 2004 β 2039 β 16914836 β 236978177 β 683 β 0 β 36250 β 4 β 0 β 3 β 1 β 0 β 0 β 0 β 0 β 0 β
β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β
β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β
β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β Β· β
β 2025-04-11 14:54:43.009116 β 8187 β 8230 β 1397703499 β 0 β 257746 β 0 β 580141 β 36 β 0 β 2 β 34 β 0 β 0 β 0 β 0 β 0 β
ββββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββ΄βββββββββββββ΄ββββββββββββ΄βββββββββββ΄ββββββββ΄βββββββββββββ΄βββββββββββββββββ΄βββββββββ΄βββββββββ΄βββββββββ΄βββββββββ΄βββββββββ΄βββββββββ΄βββββββββ΄βββββββββ€
β 5950 rows (2 shown) 17 columns β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Prism collects data for multiple subsystems and stores the enriched metrics in a duckdb database. The tables available are:
D show tables;
βββββββββββββββββββ
β name β
β varchar β
βββββββββββββββββββ€
β futex_wait β
β futex_wake β
β iowait β
β linux_consts β
β muxio_file_wait β
β muxio_wait β
β socket_context β
β socket_inet β
β socket_map β
β taskstats β
β taskstats_view β
β vfs β
βββββββββββββββββββ€
β 12 rows β
βββββββββββββββββββ
The following content refers to the data generated for the following paper:
Diogo Landau, Jorge Barbosa, Nishant Saurabh. "eBPF-Based Instrumentation for Generalisable Diagnosis
of Performance Degradation". arXiv preprint arXiv:2505.13160 (2025).
@misc{landau2025ebpfbasedinstrumentationgeneralisablediagnosis,
title={eBPF-Based Instrumentation for Generalisable Diagnosis of Performance Degradation},
author={Diogo Landau and Jorge Barbosa and Nishant Saurabh},
year={2025},
eprint={2505.13160},
archivePrefix={arXiv},
primaryClass={cs.DC},
url={https://arxiv.org/abs/2505.13160},
}
To unzip the datasets, run:
./scripts/unzip-datasets.sh
Within the data/
directory you should now find the following directories, each corresponding to an application in the paper's experimentation section:
2024-07-30T12:33:54.172726935+00:00
: MySQL2024-07-31T14:10:52.424946255+00:00
: Solr2024-08-03T05:51:31.266846823+00:00
: Cassandra2024-08-04T18:01:53.300127572+00:00
: Kafka2024-08-24T16:10:31.710423758+00:00
: Teastore2024-08-06T07:50:39.470480264+00:00
: ML-inference2024-05-19T13:08:15.671530744+00:00
: Redis
Other than the system-metrics
collected by Prism, these directories also include application-metrics
which contain their target metrics and data specific to the load execution, e.g. configuration files, and a README file.
Each application has its own jupyter notebook script in the notebooks
directory which includes the analysis presented in the paper and additional results.
To generate similar datasets for the same applications as those presented in the paper, we have provided a description, and in some cases a run script in the benchmarks/
directory for each application.