Abstract
As more and more multi-tier services are developed from commercial components or heterogeneous middleware without the source code available, both developers and administrators need a precise request tracing tool to help understand and debug performance problems of large concurrent services of black boxes. Previous work fails to resolve this issue in several ways: they either accept the imprecision of probabilistic correlation methods, or rely on knowledge of protocols to isolate requests in pursuit of tracing accuracy. This paper introduces a tool named PreciseTracer to help debug performance problems of multi-tier services of black boxes. Our contributions are two-fold: first, we propose a precise request tracing algorithm for multi-tier services of black boxes, which only uses application-independent knowledge; secondly, we present a component activity graph abstraction to represent causal paths of requests and facilitate end-to-end performance debugging. The low overhead and tolerance of noise make PreciseTracer a promising tracing tool for using on production systems.
Introduction
Modern web services typically employ a multi-tier architecture, integrating various components like web servers, application servers, and databases. Often, these components are "black boxes"—proprietary or legacy systems where source code is inaccessible. Debugging performance bottlenecks in such environments is challenging. Existing solutions either rely on probabilistic methods, which lack precision, or require deep protocol knowledge and instrumentation, which is difficult to maintain and inapplicable to proprietary protocols.
PreciseTracer addresses these challenges by achieving precise tracing using only application-independent information available from the operating system kernel.
System Architecture and Methodology
PreciseTracer operates by hooking into the OS kernel to observe communication events without modifying the application.
Kernel-Level Observation
Using SystemTap, PreciseTracer inserts probes into the kernel's communication stack (specifically tcp_sendmsg and tcp_recvmsg). It records four key attributes for every activity: type (SEND/RECEIVE/BEGIN/END), timestamp, context ID (PID, TID, hostname), and message ID (IP addresses, ports, and message size).
Component Activity Graph (CAG)
The core abstraction used by PreciseTracer is the Component Activity Graph (CAG). A CAG is a directed acyclic graph (DAG) where vertices represent kernel activities and edges denote causal relationships.
As shown in the figure above, there are two primary types of edges:
- Adjacent Context Relation: Connects sequential activities within the same process or thread.
- Message Relation: Connects a SEND activity in one component to the corresponding RECEIVE activity in another.
The Precise Tracing Algorithm
The correlation of these activities into a unified CAG is handled by a two-stage "Ranker and Engine" architecture.
The Ranker aggregates activity logs from different nodes and sorts them using a sliding time window to account for clock skew. It then selects candidate activities based on priority rules. The Engine correlates these candidates into CAGs. A key feature of the engine is its ability to handle "N-to-N" relations, where network buffers might split or merge logical messages into multiple TCP packets. By tracking message_size, the engine ensures causal integrity even under complex network conditions.
Evaluation
The researchers evaluated PreciseTracer using the RUBiS (Rice University Bidding System) benchmark, an eBay-like auction site, deployed on an 8-node Linux cluster.
Accuracy and Performance
To establish ground truth, the authors instrumented RUBiS to propagate unique Request IDs. PreciseTracer achieved 100% accuracy in path reconstruction across various workloads (up to 1,000 concurrent clients) and clock skews (up to 500ms).
The performance overhead was found to be minimal:
- Throughput: Maximum overhead was a 3.7% decrease.
- Latency: Average response time increased by less than 30% under heavy load, making it suitable for production debugging.
Conclusion
PreciseTracer demonstrates that precise, application-agnostic request tracing is achievable by leveraging kernel-level data. By representing request flows as Component Activity Graphs, it provides a powerful tool for identifying bottlenecks in complex, multi-tier black-box services. Future work will focus on automating the analysis of these graphs to provide proactive performance debugging.
Summary updated