{"id":13631917,"url":"https://github.com/twitter/rezolus","last_synced_at":"2025-05-15T22:06:38.523Z","repository":{"id":36043990,"uuid":"178958047","full_name":"twitter/rezolus","owner":"twitter","description":"Systems performance telemetry","archived":false,"fork":false,"pushed_at":"2023-05-01T11:09:19.000Z","size":936,"stargazers_count":1580,"open_issues_count":14,"forks_count":116,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-04-08T08:18:14.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twitter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-04-01T22:41:36.000Z","updated_at":"2025-04-05T06:48:20.000Z","dependencies_parsed_at":"2024-01-08T07:57:21.581Z","dependency_job_id":"26d2e31a-9a65-43c1-b291-f34b91209342","html_url":"https://github.com/twitter/rezolus","commit_stats":{"total_commits":258,"total_committers":14,"mean_commits":"18.428571428571427","dds":"0.10465116279069764","last_synced_commit":"c0f0ceeeca5fa0980cacd1bdb9938263bca79084"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2Frezolus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2Frezolus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2Frezolus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitter%2Frezolus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twitter","download_url":"https://codeload.github.com/twitter/rezolus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254430329,"owners_count":22069909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T22:02:44.055Z","updated_at":"2025-05-15T22:06:38.479Z","avatar_url":"https://github.com/twitter.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Rezolus\n\nRezolus is a tool for collecting detailed systems performance telemetry and\nexposing burst patterns through high-resolution telemetry. Rezolus provides\ninstrumentation of basic systems metrics, performance counters, and support for\neBPF (extended Berkeley Packet Filter) telemetry. Measurement is the first step\ntoward improved performance.\n\nPer-metric documentation can be found in the [METRICS](docs/METRICS.md)\ndocumentation.\n\n[![License: Apache-2.0][license-badge]][license-url]\n[![Build Status: CI][ci-build-badge]][ci-build-url]\n\n## Overview\n\nRezolus collects telemetry from several different sources. Currently, Rezolus\ncollects telemetry from traditional sources (procfs, sysfs), the perf_events\nsubsystem, and from BPF. Each sampler implements a consistent set of functions\nso that new ones can be easily added to further extend the capabilities of\nRezolus.\n\nEach telemetry source is oversampled so that we can build a histogram across a\ntime interval. This histogram allows us to capture variations which will appear\nin the far upper and lower percentiles. This oversampling approach is one of\nthe key differentiators of Rezolus when compared to other telemetry agents.\n\nWith its support for BPF as well as more common telemetry sources, Rezolus is\na very sophisticated tool for capturing performance anomalies, profiling\nsystems performance, and conducting performance diagnostics.\n\nMore detailed information about the underlying metrics library and sampler\ndesign can be found in the [DESIGN](docs/DESIGN.md) documentation.\n\n### Features\n\n* traditional telemetry sources (procfs, sysfs, ...)\n* perf_events support for hardware performance counters\n* BPF support to instrument kernel and user space activities\n* oversampling and percentile metrics to capture bursts\n\n### Traditional Telemetry Sources\n\nRezolus collects metrics from traditional sources (procfs, sysfs) to provide\nbasic telemetry for CPU, disk, and network. Rezolus exports CPU utilization,\ndisk bandwidth, disk IOPs, network bandwidth, network packet rate, network\nerrors, as well as TCP and UDP protocol counters.\n\nThese basic telemetry sources, when coupled with the approach of oversampling\nto capture their bursts, often provide a high-level view of systems performance\nand may readily indicate areas where resources are saturated or errors are\noccurring.\n\n### Perf Events\n\nPerf Events allow us to report on both hardware and software events. Typical\nsoftware events are things like page faults, context switches, and CPU\nmigrations. Typical hardware events are things like CPU cycles, instructions\nretired, cache hits, cache misses, and a variety of other detailed metrics\nabout how a workload is running on the underlying hardware.\n\nThese metrics are typically used for advanced performance debugging, as well as\nfor tuning and optimization efforts.\n\n### BPF\n\nThere is an expansive amount of performance information that can be exposed\nthrough BPF, which allows us to have the Linux Kernel perform telemetry\ncapture and aggregation at very fine-grained levels.\n\nRezolus comes with samplers that capture block IO size distribution, EXT4 and\nXFS operation latency distribution, and scheduler run queue latency\ndistribution. You'll see that here we are mainly exposing distributions of\nsizes and latencies The kernel is recording the appropriate value for each\noperation into a histogram. Rezolus then accesses this histogram from\nuser-space and transfers the values over to its own internal storage where it\nis then exposed to external aggregators.\n\nBy collecting telemetry in-kernel, we're able to gather data about events that\nhappen at extremely high rates - e.g., task scheduling - with minimal\nperformance overhead for collecting the telemetry. The BPF samplers can be\nused to both capture runtime performance anomalies as well as characterize\nworkloads.\n\n### Sampling rate and resolution\n\nIn order to accurately reflect the intensity of a burst, the sampling rate must\nbe at least twice the duration of the shortest burst to record accurately. This\nensures that at least 1 sample completely overlaps the burst section of the\nevent. With a traditional minutely time series, this means that a spike must\nleast 120 seconds or more to be accurately recorded in terms of intensity.\nRezolus allows for sampling rate to be configured, allowing us to make a\ntrade-off between resolution and resource consumption. At 10Hz sampling, 200ms\nor more of consecutive burst is enough to be accurately reflected in the pMax.\nContrast that with minutely metrics requiring 120_000ms, or secondly requiring\n2000ms of consecutive burst to be accurately recorded.\n\n## Getting Started\n\n### Building\n\nRezolus is built with the standard Rust toolchain which can be installed and\nmanaged via [rustup](https://rustup.rs) or by following the directions on the\nRust [website](https://www.rust-lang.org/).\n\nThe rest of the guide assumes you've chosen to install the toolchain via rustup.\n\n**NOTE:** Rezolus is intended to be built and deployed on Linux systems but has\nsome very limited support for MacOS to test the overall framework. It is focused\non providing systems telemetry for Linux systems. To get the best experience and\ndevelop new samplers, you should build and run on Linux.\n\n#### Clone and build Rezolus from source\n```bash\ngit clone https://github.com/twitter/rezolus\ncd rezolus\n\n# create an unoptimized development build\ncargo build\n\n# run the unoptimized binary and display help\ncargo run -- --help\n\n# create an optimized release build\ncargo build --release\n\n# run the optimized binary and display help\ncargo run --release -- --help\n\n# run the optimized binary with the example config (needs sudo for perf_events)\ncargo build --release \u0026\u0026 \\\nsudo target/release/rezolus --config configs/example.toml\n\n# metrics can be viewed in human-readable form with curl\ncurl --silent http://localhost:4242/vars\n```\n\n### Building with BPF Support\n\nBy default, BPF support is not compiled in. If you wish to produce a build with\nBPF support enabled, follow the steps below:\n\n#### Prerequisites\n\nBPF support requires that we link against the [BPF Compiler Collection]. You\nmay either use the version provided by your distribution, or can build BCC and\ninstall from source. It is critical to know which version of BCC you have\ninstalled. Rezolus supports multiple versions by utilizing different feature\nflags at build time.\n\nOur current policy is to support BCC versions back to the version in the\ndistribution repository for Debian Stable or CentOS 7 (whichever is older) to\nthe most recent version of BCC.\n\nThis policy provides coverage for current stable and testing versions of Debian,\nUbuntu, CentOS, Fedora, Arch, and Gentoo. Users of other distributions may need\nto build a supported version of BCC from source. See [BCC Installation Guide]\nfor details.\n\n#### Building\n\nAs mentioned above, we provide different feature flags to map to various\nsupported BCC versions. The `bpf` feature will map to the newest version\nsupported by the [rust-bcc] project. For most users, this will be the right flag\nto use. However, if you must link against an older BCC version, you will need\nto use a more specific form of the feature flag. These version-specific flags\ntake the form of `bpf_v0_10_0` with the BCC version being reflected in the name\nof the feature. You can find a complete list of the feature flags in the\n[cargo manifest] for this project.\n\n```bash\n# create an optimized release build with BPF support\ncargo build --release --features bpf\nsudo target/release/rezolus --config configs/example.toml\n\n# metrics can be viewed in human-readable form with curl\ncurl --silent http://localhost:4242/vars\n```\n\n### HTTP Exposition\n\nRezolus exposes metrics over HTTP, with different paths corresponding to\ndifferent exposition formats.\n\n* human-readable: `/vars`\n* JSON: `/vars.json`, `/metrics.json`, `/admin/metrics.json`\n* Prometheus: `/metrics`\n\n**NOTE:** currently, JSON exposition is provided by default for any other path.\nThis behavior may change in the future and should not be relied on.\n\nAdditionally, you can get the running version on the root-level path `/`\n\n## Support\n\nCreate a [new issue](https://github.com/twitter/rezolus/issues/new) on GitHub.\n\n## Contributing\n\nWe feel that a welcoming community is important and we ask that you follow\nTwitter's [Open Source Code of Conduct] in all interactions with the community.\n\n## Authors\n\n* Brian Martin \u003cbmartin@twitter.com\u003e\n\nA full list of [contributors] can be found on GitHub.\n\nFollow [@TwitterOSS](https://twitter.com/twitteross) on Twitter for updates.\n\n## License\n\nCopyright 2019 Twitter, Inc.\n\nLicensed under the Apache License, Version 2.0:\nhttps://www.apache.org/licenses/LICENSE-2.0\n\n## Security Issues?\n\nPlease report sensitive security issues via Twitter's bug-bounty program\n(https://hackerone.com/twitter) rather than GitHub.\n\n[ci-build-badge]: https://img.shields.io/github/workflow/status/twitter/rezolus/CI/master?label=CI\n[ci-build-url]: https://github.com/twitter/rezolus/actions/workflows/cargo.yml?query=branch%3Amaster+event%3Apush\n[cargo manifest]: https://github.com/twitter/rezolus/blob/master/Cargo.toml\n[contributors]: https://github.com/twitter/rezolus/graphs/contributors?type=a\n[license-badge]: https://img.shields.io/badge/license-Apache%202.0-blue.svg\n[license-url]: https://github.com/twitter/rezolus/blob/master/LICENSE\n[rust-bcc]: https://github.com/rust-bpf/rust-bcc\n[BPF Compiler Collection]: https://github.com/iovisor/bcc\n[Open Source Code of Conduct]: https://github.com/twitter/code-of-conduct/blob/master/code-of-conduct.md\n[BCC Installation Guide]: https://github.com/iovisor/bcc/blob/master/INSTALL.md","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwitter%2Frezolus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwitter%2Frezolus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwitter%2Frezolus/lists"}