Abstract
The current virtualization solution in the Cloud widely relies on hypervisor-based technologies. Along with the recent popularity of Docker, the container-based virtualization starts receiving more attention for being a promising alternative. Since both of the virtualization solutions are not resource-free, their performance overheads would lead to negative impacts on the quality of Cloud services. To help fundamentally understand the performance difference between these two types of virtualization solutions, we use a physical machine with "just-enough" resource as a baseline to investigate the performance overhead of a standalone Docker container against a standalone virtual machine (VM). With findings contrary to the related work, our evaluation results show that the virtualization's performance overhead could vary not only on a feature-by-feature basis but also on a job-to-job basis. Although the container-based solution is undoubtedly lightweight, the hypervisor-based technology does not come with higher performance overhead in every case. For example, Docker containers particularly exhibit lower QoS in terms of storage transaction speed.
Introduction
Virtualization is the backbone of cloud computing, but it imposes a "performance tax" or overhead. The industry has shifted from hypervisor-based VMs (like VMware) toward container-based solutions (like Docker) under the assumption that containers are inherently more efficient. However, much of this sentiment is based on qualitative discussion rather than "apple-to-apple" quantitative data. This research aims to quantify exactly how much overhead these technologies add across different types of workloads—CPU, Memory, Storage, and Network—to help cloud providers and consumers make informed architectural choices.
Methodology
The study employed the Domain Knowledge-driven Methodology (DoKnowMe). To ensure the virtualization layers were sufficiently stressed, the researchers used a "just-enough" hardware baseline: an older physical machine (Intel Core 2 Duo, 3GB RAM) rather than a high-end server.
Key aspects of the setup included:
- Baseline: A bare-metal physical machine (PM) running Ubuntu 15.10.
- Virtualization: Docker (representing containers) vs. VMware Workstation 12 Pro (representing Type-2 hypervisors).
- Consistency: All environments used the same Ubuntu 15.10 64-bit OS to minimize configuration noise.
- Duration: Each test ran for 25 hours to capture performance fluctuations over time.
Benchmarks
The study utilized several industry-standard, lightweight benchmarking utilities:
- Communication: Iperf for measuring network data throughput.
- Computation: HardInfo, including six micro-benchmarks (Blowfish, CryptoHash, Fibonacci, N-Queens, FPU FFT, and FPU Raytracing).
- Memory: STREAM to measure sustainable memory throughput (Copy, Scale, Add, Triad).
- Storage: Bonnie++ to test both byte-by-byte transactions and block-level data transfers.
Key Insights
The Variability Trap
The most significant overhead isn't always a drop in average speed, but a massive increase in performance variability. While a VM might solve a math problem nearly as fast as a physical machine on average, its performance "jitter" (variability) can be extreme. For instance, in computation tasks, the variability overhead for VMs reached nearly 2500% in specific cases like the Fibonacci test.
Docker’s Storage Bottleneck
Contrary to the "containers are faster" narrative, Docker exhibited lower Quality of Service (QoS) in storage transaction speeds. When reading or writing data byte-by-byte, Docker incurred a 40% to 50% overhead, likely due to the complexities of the container storage driver.
Task-Specific Tax
Virtualization overhead is not a flat rate; it varies wildly depending on the "job." Fourier transform jobs (FFT) showed high overhead for both Docker and VMware, while other CPU tasks like the N-Queens problem showed almost no difference between the physical machine and the virtualized ones.
Experimental Results
Network Performance
Docker proved highly efficient in networking, with only ~2% throughput overhead. In contrast, the VM showed a significant loss in throughput (>55%), potentially due to NAT overhead.
Memory and Storage
Average memory throughput was similar across all three environments (PM, Docker, VM), but variability was a major differentiator. Docker’s variability overhead for the "Triad" operation exceeded 500%, while the VM's was nearly 1400%.
In storage, Docker struggled with byte-level I/O. However, in block-level I/O (handling large chunks of data), Docker incurred minimal overhead, whereas the VM suffered a ~30% performance hit.
Computation
Docker generally computed faster than the VM, but the gap was narrow and highly dependent on the specific micro-benchmark used.
Conclusion
The study demonstrates that while container-based solutions are generally more lightweight, they are not a universal performance panacea. Performance overhead varies by feature and specific job. Docker's lower QoS in storage transactions and the significant performance variability in both solutions are critical factors for cloud architecture decisions. Future work should explore these trends in multi-tenant environments and with real-world application workloads like databases and web servers.
Summary updated