Benchkit

Magisk KSU APatch

Optimizing an Android kernel or ROM without real measurements is guesswork. Benchkit by kdrag0n ends the guessing — bundling over 15 industry-standard profiling and benchmarking tools used by Linux kernel maintainers, Facebook engineers, and the Android Open Source Project itself, all ready to run on your rooted Android device. From Dhrystone CPU benchmarks to Facebook's schbench scheduler latency tests, from filesystem I/O testing with fio to audio latency profiling with OboeTester — Benchkit turns your phone into a serious performance research platform.

Benchmark Categories

A complete profiling stack covering every layer of Android performance — from raw CPU cycles to UI jank, from kernel scheduler behavior to audio latency.

CPU & Integer Performance

Dhrystone for classic integer benchmarking (used by EAS energy model calibration), callbench for syscall and vDSO speed measurement, and GTcycles for measuring the CPU's generic timer frequency. Essential tools for evaluating SoC raw compute capability.

Scheduler & Latency

hackbench for scheduler wakeup latency and pipe stress, schbench (Facebook's detailed scheduler benchmark), cyclictest for real-time latency testing, and rt-app for simulating reproducible mobile workloads. Critical for tuning CPU governors and scheduler parameters.

Storage & I/O

fio (Flexible I/O Tester by Linux block subsystem maintainer Jens Axboe), IOzone for general filesystem benchmarking, and Bonnie++ for additional I/O profiling. Measure UFS/eMMC throughput, IOPS, and latency under configurable workload patterns.

Memory & Kernel

memcpy for raw memory bandwidth via libc memcpy(3), and SLABtop for detailed kernel SLAB memory usage breakdown (requires CONFIG_SLUB_DEBUG=y). Identify memory bottlenecks and kernel allocator behavior with surgical precision.

Stress & Synthetic Load

stress-ng — the comprehensive Linux stress-testing suite covering hundreds of CPU, memory, I/O, and kernel subsystem stressors. sysbench — scriptable database and system performance benchmarking. Push every part of your device to its limits to surface stability issues and thermal behavior.

UI Jank & Audio Latency

Full GUI benchmark suite: JankBenchX for UI smoothness, UiBench for AOSP-standard rendering tests, TouchLatency for input-to-display response timing, and OboeTester + SynthMark for audio pipeline latency and synth CPU benchmarking.

Why Benchkit Exists

Android kernel development has long suffered from a lack of empirical data. ROM developers tweak CONFIG_HZ values, kernel hackers adjust EAS energy parameters, and reviewers run synthetic benchmarks like AnTuTu — but few have access to the same precise, reproducible profiling tools that the upstream Linux kernel community relies on. The result: a culture of guesswork, anecdotal claims, and placebo "performance mods."

kdrag0n (Danny Lin) built Benchkit to change that. By cross-compiling the canonical Linux benchmark suite — fio from the block subsystem maintainer, schbench from Facebook's kernel team, stress-ng from Colin Ian King, cyclictest from the realtime Linux community — for AArch64 Android and packaging them as a single Magisk module, Benchkit gives Android developers direct access to the exact same measurement tools used to evaluate kernel changes upstream.

The result is a powerful, data-driven workflow: change a CPU governor, run Dhrystone — see the actual integer performance delta. Tune the scheduler, run hackbench and schbench — measure the latency improvement. Patch the I/O scheduler, run fio with realistic mobile workload patterns — verify the throughput change is real. Benchkit makes performance tuning a science, not a superstition.

Complete Tool Reference

Tool Purpose Type
dhrystone Classic CPU integer performance benchmark — used for EAS energy model CPU capacity calculations CLI
callbench System call speed (with/without vDSO) and basic mmap/read I/O measurement CLI
callbench32 32-bit build of callbench for testing 32-bit vDSO performance CLI
gtcycles Measure the frequency of the CPU's generic timer CLI
hackbench Scheduler wakeup latency and pipe throughput benchmark CLI
schbench Detailed scheduler wakeup latency benchmark (by Facebook) CLI
cyclictest Measure timer jitter and expiration delay — real-time latency testing CLI
rt-app Real-time application simulator — replicates mobile workloads reproducibly CLI
fio Flexible I/O Tester — generic I/O benchmark with highly configurable workload simulation (Jens Axboe) CLI
iozone General filesystem and I/O benchmark CLI
bonnie++ Classic I/O benchmark for sequential and random read/write performance CLI
memcpy Memory bandwidth tester using libc memcpy(3) CLI
slabtop Kernel SLAB memory usage details — requires CONFIG_SLUB_DEBUG=y CLI
stress-ng Comprehensive stress-testing suite for hardware and kernel subsystems CLI
sysbench Scriptable database and system performance benchmark CLI
synthmark CPU audio synthesis benchmarking — both CLI and GUI CLI+GUI
JankBenchX UI smoothness benchmark — measures frame timing and jank in standard UI workloads GUI
UiBench AOSP-standard UI rendering benchmark GUI
TouchLatency Google's app for testing touch input latency, frame rendering, and missed frames GUI
OboeTester Audio pipeline latency and Oboe audio API testing GUI

Quick Usage Examples

After flashing the module and rebooting, open Termux with root or use adb shell and try these starter commands:

# Quick CPU integer performance test
dhrystone
# Scheduler wakeup latency under load
schbench -t 8 -r 30
# 4K random read I/O benchmark on internal storage
fio --name=randread --rw=randread --bs=4k --size=1G --runtime=30 --time_based
# Full hardware stress test for 60 seconds
stress-ng --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 60s
# Memory bandwidth test
memcpy
# Real-time latency measurement
cyclictest -t 4 -p 80 -i 1000 -l 10000

Frequently Asked Questions

Benchkit is a developer-focused Magisk module by kdrag0n (Danny Lin) that bundles a comprehensive suite of professional benchmarking and profiling tools for Android. It provides over 15 industry-standard CLI utilities and GUI benchmarks covering CPU performance, scheduler latency, I/O throughput, memory bandwidth, and graphics rendering — designed to enable empirical, data-driven kernel and system tuning decisions.

Benchkit is primarily aimed at kernel developers, ROM developers, and performance engineers who need real benchmark data to evaluate tuning changes. It is also useful for power users and enthusiasts who want quantitative measurements of their device's CPU, I/O, and rendering performance. Casual users typically do not need this level of profiling detail.

Benchkit only supports AArch64 (ARM64, little-endian) — which covers nearly all modern Android phones. 32-bit ARM (armeabi-v7a) is not supported and there are no plans to add support. The module checks architecture during installation and will refuse to install on incompatible devices.

After installing the module and rebooting, the benchmark tools are available as command-line utilities in /system/bin (or the systemless equivalent). Open Termux with root access or run adb shell, then invoke tools directly — for example, dhrystone, fio, stress-ng, or sysbench. GUI benchmarks like JankBenchX, UiBench, TouchLatency, OboeTester, and SynthMark are also installed and can be opened from the app drawer.

Benchkit uses the Unity Installer template, meaning it installs as a Magisk module when Magisk is detected and falls back to a direct /system install otherwise. The module is fully compatible with Magisk, KernelSU, APatch, and KSUNext — and can also be installed via custom recovery on non-Magisk root setups.

Module Info

  • Version v2.6.4
  • Module By
    kdrag0n
  • Contributors kdrag0n, Zackptg5, MarcAnt01, iGlitch, JohnFawkes
  • Source Code View Repository
  • Tags
    #Benchkit #Benchmark #Profiling #Kernel Tuning #Magisk Module #kdrag0n #Dhrystone #fio #stress-ng #JankBenchX
  • Requirement
    Magisk KernelSU APatch
  • Latest Update