Skip to main content
QUICK REVIEW

[论文解读] A Comparative Study of Containers and Virtual Machines in Big Data Environment

Qi Zhang, Ling Liu|arXiv (Cornell University)|Jul 5, 2018
Cloud Computing and Resource Management参考文献 21被引用 11
一句话总结

本文对基于Spark的大数据工作负载中Docker容器与虚拟机(VMs)进行了全面的实证比较,评估了部署便捷性、性能可扩展性及资源利用率。结果表明,容器在可扩展性和资源效率方面显著优于虚拟机,在大规模集群上执行速度提升14.31倍,且由于轻量级隔离机制和动态资源分配,CPU/内存利用率更高。

ABSTRACT

Container technique is gaining increasing attention in recent years and has become an alternative to traditional virtual machines. Some of the primary motivations for the enterprise to adopt the container technology include its convenience to encapsulate and deploy applications, lightweight operations, as well as efficiency and flexibility in resources sharing. However, there still lacks an in-depth and systematic comparison study on how big data applications, such as Spark jobs, perform between a container environment and a virtual machine environment. In this paper, by running various Spark applications with different configurations, we evaluate the two environments from many interesting aspects, such as how convenient the execution environment can be set up, what are makespans of different workloads running in each setup, how efficient the hardware resources, such as CPU and memory, are utilized, and how well each environment can scale. The results show that compared with virtual machines, containers provide a more easy-to-deploy and scalable environment for big data workloads. The research work in this paper can help practitioners and researchers to make more informed decisions on tuning their cloud environment and configuring the big data applications, so as to achieve better performance and higher resources utilization.

研究动机与目标

  • 评估使用容器与虚拟机搭建大数据环境的实际便捷性。
  • 测量并比较容器与基于虚拟机的云基础设施中各类Spark工作负载的性能与可扩展性。
  • 分析驱动容器与虚拟机之间性能差异的底层系统级因素,如CPU等待时间与内存分配。
  • 为系统管理员与研究人员提供关于优化云环境以支持大数据工作负载的实际建议。

提出的方法

  • 在物理集群上同时使用Docker容器与基于KVM的虚拟机部署Spark工作负载,配置完全相同。
  • 通过不同规模的集群(从8个节点到48个节点)配置工作负载,以评估在负载增加情况下的可扩展性。
  • 测量执行时间、完成时间(makespan)以及系统级指标,包括CPU利用率(用户态、系统态、等待时间)和内存使用情况(缓存、已用、空闲)。
  • 收集并分析运行时指标,识别性能瓶颈,特别是I/O延迟与资源争用问题。
  • 使用Dockerfiles标准化容器镜像构建,确保应用在不同环境中的一致性部署。
  • 通过监控每个节点在工作负载执行前后内存使用情况,比较内存占用大小与分配行为。

实验结果

研究问题

  • RQ1容器与虚拟机在搭建大数据计算环境时,其设置时间有何差异?
  • RQ2在不同Spark工作负载下,容器与虚拟机环境在执行时间与可扩展性方面表现如何?
  • RQ3导致容器与虚拟机之间性能差异的底层系统级因素(如CPU等待时间与内存分配)是什么?
  • RQ4在不同集群规模与工作负载下,容器与虚拟机的资源利用率(CPU与内存)有何变化?

主要发现

  • 容器相比虚拟机显著降低了设置时间与部署复杂度,使系统管理员更易使用。
  • 在48个节点的集群中,逻辑回归任务在容器中耗时238秒,而在虚拟机中耗时3643秒,性能提升达14.31倍。
  • 虚拟机在大规模(48个以上节点)环境下因任务超时过多而无法完成工作负载,而容器成功执行了所有作业。
  • 随着集群规模扩大,虚拟机的CPU等待时间显著增加,表明I/O延迟与资源争用加剧,尤其在高负载下更为明显。
  • 容器的内存利用率更高效:每节点运行2个容器的内存占用不足2GB,而2个虚拟机即使在工作负载开始前也已消耗约4GB内存。
  • 容器在作业完成后能迅速释放内存,而虚拟机则保留已分配的内存,导致资源利用效率低下。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。