INFOQ: Comparing Virtual Machines and Linux Containers Performance
The paper authors ran CPU, memory, network and I/O benchmarks against native, container and virtualized execution,
using KVM and Docker as virtualization and container technologies respectively.
Benchmarks also include sample Redis and MySQL workloads;
Redis exercises the networking stack, with small packets and a large number of clients,
while MySQL stresses memory, network and the filesystem.
The results show that Docker equals or exceeds KVM performance in every case tested.
For CPU and memory performance KVM and Docker introduce a measurable but negligible overhead,
although for I/O intensive applications both require tuning.
Docker performance degrades when using files stored in AUFS, compared to using volumes, that have better performance.
A volume is a specially-designated directory within one or more containers that bypasses the union file system,
so it does not have the overhead that the storage backends may have.
The default AUFS backend causes significant I/O overhead
specially when using many layers and deep nested directory hierarchies.