Measure LLM decode bandwidth limits on Arm with llama-roofline
Introduction
Understand why token generation is limited by memory bandwidth
Build llama.cpp and install llama-roofline
Measure the memory bandwidth ceiling
Diagnose whether decode is memory-bound
Choose thread count and model size from the measurements
Next Steps
Measure LLM decode bandwidth limits on Arm with llama-roofline
Review frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Run
uname -m and grep -m1 Features /proc/cpuinfo. Look for aarch64 and flags such as asimd (Neon) and asimddp (DotProd). On the Raspberry Pi 5’s Cortex-A76, llama.cpp detects DotProd at build time and uses it for quantized kernels.Close other applications and ensure your system is idle. Use
uptime and free -m to confirm low load and that available memory exceeds the largest model file (1,066 MB). Background load lowers measured bandwidth and distorts results that depend on it.Run
llama-roofline inspect on the GGUF file. Check the per token line in its report to see the estimated model data read per generated token, in megabytes.Multiply the bytes per token reported by
llama-roofline inspect by your measured decode tokens per second. Compare that achieved bandwidth with the measured ceiling, or use the percentage of the ceiling listed in the report. If it approaches the ceiling, memory bandwidth limits decode performance, so adding threads might not help.Read the
llama-bench table, which reports threads and tokens per second (t/s). Choose the best thread count separately for tg128 decode and pp512 prefill. Decode can saturate quickly when memory-bound, while prefill can benefit from more threads.