Benchmarking LLM Serving Systems for Agentic AI Workloads with XPerf
This paper introduces XPerf, a benchmarking framework that enables reproducible load-testing and detailed performance profiling of LLM serving systems under diverse agentic AI workloads by utilizing a fine-grained trace replay approach to overcome the challenges of nondeterministic control flows.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the rapidly evolving landscape of artificial intelligence, a new generation of software has emerged that does more than simply answer questions; it acts. These programs, known as agents, can break down complex tasks into smaller steps, use digital tools to gather information, and make decisions based on what they find. Unlike a standard chatbot that waits for a new prompt after every response, an agent might plan a research project, search the web for data, write code to analyze that data, and then refine its approach based on the results. This process involves a continuous loop of thinking and acting, where the software calls upon a large language model many times in a single session to guide its journey.
For these agents to be useful in the real world, the computer systems that power them must be incredibly fast and efficient. These systems, called serving engines, are responsible for processing the language model's calculations. However, testing how well these engines perform is difficult because the path an agent takes is unpredictable. Just as a human might solve a problem in five steps one day and ten steps the next, an agent's journey changes every time it runs, even when given the exact same starting instructions. This unpredictability makes it hard for engineers to know if a system is truly fast or if it is just lucky that a particular test happened to be simple.
To solve this problem, researchers at the University of Illinois and IBM Research have developed a new tool called XPerf. This system allows engineers to record the exact path an agent takes during a real task and then play that same path back repeatedly to test different computer systems. By capturing the specific sequence of decisions and actions, XPerf removes the element of chance. It ensures that when an engineer tests a new software update, they are comparing it against the exact same workload, rather than guessing how the system would handle a different, random set of steps. This precision is crucial for identifying bottlenecks and understanding why a system might slow down under pressure.
The researchers used XPerf to study eight different types of agent applications, ranging from tools that write code and debug software to systems that conduct deep research and answer complex questions. They found that these applications behave very differently from standard chatbots. While a typical conversation might involve a few back-and-forth messages, an agent can trigger dozens of internal calls to the language model to complete a single user request. In some cases, a single request to a coding agent resulted in an average of seventeen separate calls to the language model, with some requests triggering nearly forty. This complexity means that the system must manage a web of dependent tasks, where one step cannot begin until the previous one finishes.
A major discovery from their testing was that the performance of these systems is highly sensitive to how the requests are handled. The researchers observed that when many agents run at the same time, the system often struggles to remember the context of previous steps. Language models rely on a form of short-term memory called a cache to avoid re-reading information they have already processed. However, when the system is under heavy load, it sometimes kicks out old information to make room for new requests, even if that information will be needed again just a moment later. This forces the computer to re-calculate everything from scratch, wasting time and energy. The study showed that this "thrashing" effect can cause the system to slow down significantly, with some applications seeing their speed drop by nearly forty percent when the number of requests increased.
The team also tested how well different strategies for managing multiple computer processors worked. They found that simply spreading the work evenly across all available processors did not always lead to the best results. In fact, a strategy that kept all the steps of a single agent's journey on the same processor was far more efficient. This approach allowed the system to keep the necessary context in memory, avoiding the need to re-calculate information. By using XPerf to replay the exact same workload under different conditions, the researchers could clearly see that this targeted approach improved the speed of processing by more than three times compared to the standard method of spreading work randomly.
Beyond just measuring speed, XPerf provided a detailed look at the inner workings of the computer hardware itself. The researchers could see exactly how much of the computer's memory was being used and how hard the processor chips were working. They discovered that when the system was forced to re-calculate information due to poor memory management, the computer's processors were working hard but not producing useful results. It was a case of high effort with low efficiency. This level of detail helps engineers understand not just that a system is slow, but exactly why it is slow, allowing them to fix the specific part of the software that is causing the problem.
The study also highlighted that the way an agent is designed matters just as much as the computer it runs on. Some applications were found to be much more efficient than others, not because they were smarter, but because they were designed to work better with the computer's memory. For example, one research tool that added a changing timestamp to every message it sent accidentally destroyed its ability to reuse memory, forcing the system to start from scratch every time. By removing this unnecessary change, the researchers were able to improve the system's efficiency significantly. This suggests that small changes in how software is written can have a massive impact on performance.
Ultimately, XPerf serves as a reliable mirror for the world of artificial intelligence agents. It allows developers to see their systems clearly, without the distortion of random variation. By providing a way to test, measure, and understand these complex applications, the tool helps ensure that the next generation of AI software will be robust, fast, and ready for the demands of real-world use. The researchers have made this tool available to the public, hoping that it will accelerate the development of better systems for everyone.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.