cbench is a highly specialized, statically compiled Linux kernel benchmarking and telemetry tool. Designed with zero external dependencies, it is explicitly built to stress-test core kernel subsystems, track hardware-level energy consumption, and automatically isolate algorithmic and architectural bottlenecks in the Linux Kernel.
For in-depth details, please refer to the specific documentation files:
- Supported Benchmarks: Details on the 13 built-in kernel benchmarks (NEON, Futex, RCU, ZRAM, etc.)
- Telemetry & OS Insights: Details on the profiler, thermal, DVFS, and energy tracking systems.
- Android Execution Guide: Required steps for bypassing Android
noexecmounts andkptr_restrictsecurity. - CAnalyze Visualizer: Guide to using the built-in Material Design web dashboard for comparing benchmark runs.
You must run cbench as root (sudo or su) so that it can access /sys topology nodes, Intel/Android power sensors, and the perf_event_open kernel profiler rings!
Ensure you have the static C libraries installed on your host system (e.g., glibc-static on Fedora/RHEL).
make clean && make
sudo ./cbench -a -d 15 -jAndroid does not use standard glibc. To cross-compile cbench for Android, use the prebuilt Clang compiler provided by the Android NDK:
make clean
CC=/path/to/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang make(For detailed steps on executing this on an Android device, see the Android Execution Guide)
Compare your "Before" and "After" JSON outputs visually using the included CAnalyze web application:
./start_canalyze.shNavigate to http://localhost:8080 in your browser to view the interactive Performance Radar Charts.