ProfInfer: An eBPF-based Fine-Grained LLM Inference Profiler

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zou, Bohua, Roy, Debayan, Airao, Dhimankumar Yogesh, Xu, Weihao, Sun, Binqi, Liu, Yutao, Chen, Haibo
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915760406790144
author Zou, Bohua
Roy, Debayan
Airao, Dhimankumar Yogesh
Xu, Weihao
Sun, Binqi
Liu, Yutao
Chen, Haibo
author_facet Zou, Bohua
Roy, Debayan
Airao, Dhimankumar Yogesh
Xu, Weihao
Sun, Binqi
Liu, Yutao
Chen, Haibo
contents As large language models (LLMs) move from research to production, understanding how inference engines behave in real time has become both essential and elusive. Unlike general-purpose engines such as ONNX Runtime, today's LLM inference systems offer little operator-level visibility, leaving developers blind to where time and resources go. Even basic questions -- is this workload memory-bound or compute-bound? -- often remain unanswered. To close this gap, we develop a fine-grained, non-intrusive profiling framework for modern LLM inference engines, exemplified by llama-cpp but applicable to similar runtime architectures. Built on extended Berkeley Packet Filter (eBPF) technology, our system dynamically attaches probes to runtime functions across multiple layers -- without modifying or recompiling the source. It transforms collected traces into rich visualizations of operators, graphs, timelines, and hardware counter trends, exposing how dense inference, Mixture-of-Experts routing, and operator offloading behave in practice. With less than 4% runtime overhead and high profiling fidelity, our framework makes LLM inference both transparent and diagnosable, turning performance profiling into a practical tool for optimization, scheduling, and resource-aware deployment.
format Preprint
id arxiv_https___arxiv_org_abs_2601_20755
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle ProfInfer: An eBPF-based Fine-Grained LLM Inference Profiler
Zou, Bohua
Roy, Debayan
Airao, Dhimankumar Yogesh
Xu, Weihao
Sun, Binqi
Liu, Yutao
Chen, Haibo
Software Engineering
As large language models (LLMs) move from research to production, understanding how inference engines behave in real time has become both essential and elusive. Unlike general-purpose engines such as ONNX Runtime, today's LLM inference systems offer little operator-level visibility, leaving developers blind to where time and resources go. Even basic questions -- is this workload memory-bound or compute-bound? -- often remain unanswered. To close this gap, we develop a fine-grained, non-intrusive profiling framework for modern LLM inference engines, exemplified by llama-cpp but applicable to similar runtime architectures. Built on extended Berkeley Packet Filter (eBPF) technology, our system dynamically attaches probes to runtime functions across multiple layers -- without modifying or recompiling the source. It transforms collected traces into rich visualizations of operators, graphs, timelines, and hardware counter trends, exposing how dense inference, Mixture-of-Experts routing, and operator offloading behave in practice. With less than 4% runtime overhead and high profiling fidelity, our framework makes LLM inference both transparent and diagnosable, turning performance profiling into a practical tool for optimization, scheduling, and resource-aware deployment.
title ProfInfer: An eBPF-based Fine-Grained LLM Inference Profiler
topic Software Engineering
url https://arxiv.org/abs/2601.20755