• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学

• 高性能计算 • 上一篇    下一篇

Docker动态调度算法的设计与实现

刘殊旸,张曼怡,曹强   

  1. (华中科技大学武汉光电国家研究中心,湖北 武汉 430074)
  • 收稿日期:2018-06-25 修回日期:2018-08-20 出版日期:2018-12-25 发布日期:2018-12-25
  • 基金资助:

    中央高校基本科研业务费专项(2018KFYXKJC03);国家自然科学基金(61872156,61821003)

Design and implementation of a
Docker dynamic scheduling algorithm

LIU Shuyang,ZHANG Manyi,CAO Qiang   

  1. (Wuhan National Laboratory for Optoelectronics,Huazhong University of Science and Technology,Wuhan 430074,China)
  • Received:2018-06-25 Revised:2018-08-20 Online:2018-12-25 Published:2018-12-25

摘要:

Docker作为容器的实施引擎,能高效部署、执行和管理容器。然而,现有Docker容器资源管理机制基于静态配置,无法根据应用类型特征和资源需求在运行时进行高效的动态资源分配。因此,实验性地分析Docker运行不同负载时的资源使用和性能情况,设计并实现了一种基于运行时的Docker动态调度算法,优先满足实时型应用容器服务要求,同时保证批处理型应用容器的性能。另外,算法根据节点运行现状推荐创建最合适的应用容器,最大化节点的资源利用率。实验表明,动态调度机制不会引入明显的性能开销;当容器间出现资源竞争时,可以将实时型应用容器满足服务要求的时间段延长87.5%,且最多对同时运行的批处理应用容器的性能造成2.9%的开销。算法推荐机制将节点上能够运行的容器实例数增大2.3倍时,对批处理型应用容器只造成最多9.3%的性能损耗。

关键词: 容器, 动态调度, 资源利用率, 服务要求

Abstract:

As a container’s runtime infrastructure, Docker can efficiently deploy, execute, and manage containers. However, the existing Dockercontainer management mechanism based on prerun static configuration cannot dynamically allocate resources according to the characteristics of different application categories and runtime resource requirements. Therefore, based on the analysis of experiments on the resource usage and performance of Docker when running different workloads, we design and implement a runtimebased Docker dynamic scheduling algorithm to prioritize realtime application container service while ensuring the performance of batchapplication containers. The algorithm can also recommend the most suitable application container that can be created according to current running status of nodes, thus maximizing the resource utilization of nodes. Experiments show that this algorithm does not introduce significant performance overhead. When resource competition occurs among containers, the service time for realtime application containers can be prolonged by 87.5%, with a 2.9% performance overhead at most for the batchapplication containers that running at the same time. The algorithm recommendation mechanism increases the number of container instances that can run on nodes by 2.3 times, resulting in a maximum of 9.3% performance loss for batchapplication containers.

Key words: container, dynamic scheduling, resource utilization, service requirement