TL;DR
This paper introduces Ditto, an automated framework for creating "clones" of real-world cloud applications. These clones mimic the performance and behavior of the original services without revealing their proprietary code, enabling broader research and development in cloud systems. Ditto achieves this by capturing a comprehensive view of an application's system stack, from kernel operations to I/O and network activity.
What Problem Does This Paper Address?
The cloud computing landscape is dominated by complex, proprietary applications and microservices. Studying these systems is crucial for designing better infrastructure, but access to production code is often restricted. Existing benchmarks are often too simplistic, failing to capture the full complexity of real-world cloud workloads, which involve intricate interactions across the entire system stack, including I/O, networking, and kernel operations. This lack of representative, accessible workloads hinders research into performance optimization, system design, and hardware development for cloud environments.
Methods
Ditto employs a hierarchical, end-to-end approach to application cloning:
- Microservice Topology Discovery: For distributed microservices, Ditto first learns the dependency graph between services using distributed tracing. This forms the basis for recreating the communication interfaces between cloned services.
- Application Skeleton Generation: It then analyzes the network and thread models of each service. This involves profiling how services handle remote communication (client/server, synchronous/asynchronous) and how tasks are distributed among threads, using tools like SystemTap.
- Application Body Generation: This is the core of Ditto's novelty. It goes beyond user-level logic to capture:
- System Calls: Profiling the distribution and arguments of system calls to mimic kernel-level behavior and I/O.
- Instruction Mix: Capturing the dynamic count of x86 assembly instructions and clustering them by functionality and hardware resource needs.
- Branch Behavior: Analyzing branch taken/not-taken rates and transition rates to accurately clone branch prediction behavior.
- Data Memory Access Patterns: Synthesizing memory access patterns based on working set sizes to mimic cache behavior without leaking sensitive information.
- Instruction Memory Access Patterns: Similar to data memory, it synthesizes instruction access patterns based on i-cache behavior.
- Data Dependencies: Quantifying data dependency distances to influence instruction-level parallelism (ILP) and memory-level parallelism (MLP).
- Fine-Tuning: An iterative process using performance counters to calibrate the synthetic application against the original, ensuring high accuracy (over 95% in many cases) with minimal overhead.
A key principle is abstraction: Ditto generates synthetic code that mimics performance characteristics without revealing the original application's logic, making it safe to share.
Datasets
The paper evaluates Ditto on several well-known cloud services and benchmarks:
- Single-tier applications: Memcached, NGINX, MongoDB, Redis.
- Microservice topology: Social Network (a topology from DeathStarBench with a Facebook dataset).
- Workload generators: tcpkali (for NGINX), YCSB (for MongoDB and Redis), and a mutated workload generator (for Memcached).
No new datasets were introduced; instead, Ditto leverages existing production services and standard workload generators.
Key Insights and Ideas
- Beyond CPU: The Importance of the Full Stack: The paper strongly emphasizes that accurately cloning cloud applications requires looking far beyond CPU metrics. I/O, network activity, and kernel operations are critical bottlenecks that prior work often overlooked.
- Abstraction for Sharing: Ditto's ability to generate functional clones without revealing proprietary code is a significant contribution. This opens doors for collaboration and research that was previously hindered by intellectual property concerns.
- Platform-Independent Cloning: The synthetic applications generated by Ditto are designed to be portable and react to platform changes similarly to their originals, reducing the need for reprofiling across different environments.
- Decomposition of Accuracy: The paper meticulously breaks down how each component of Ditto (system calls, instruction mix, branch behavior, etc.) contributes to the overall accuracy, demonstrating that all aspects are necessary for comprehensive cloning.
Key Results
- Ditto accurately captures CPU performance metrics (IPC, branch mispredictions, cache misses) with average errors around 4-12% across various loads and services.
- Network and disk bandwidth are also faithfully reproduced.
- End-to-end latency (including p99) is closely matched between original and synthetic applications.
- Synthetic applications exhibit similar behavior to originals when subjected to varying loads and platform changes.
- Ditto's fine-tuning process can achieve over 95% accuracy within a few iterations.
- The framework successfully clones interference effects, demonstrating its utility for power management and resource contention studies.
Limitations and Future Work
- Hardware Accelerators: The authors acknowledge that cloning the behavior of devices like GPUs and hardware accelerators is deferred to future work.
- Specific Instruction Set Architectures (ISAs): While Ditto supports x86, extending it to other ISAs would require further development.
- Complexity of Microservice Interactions: While Ditto captures the dependency graph, the intricate inter-service communication patterns in very large microservice deployments could present ongoing challenges.
- Initial Profiling Overhead: The profiling process, while performed only once, can introduce overhead to the original application.
Future work could focus on extending Ditto to cover a wider range of hardware and software components, and further automating the process for even more complex cloud environments.
Summary updated