ISSN 1000-1239 CN 11-1777/TP

计算机研究与发展 ›› 2019, Vol. 56 ›› Issue (7): 1545-1555.doi: 10.7544/issn1000-1239.2019.20180511

• 软件技术 • 上一篇    下一篇

一种最大化内存共享与最小化运行时环境的超轻量级容器

张礼庆1,2,郭栋1,2,吴绍岭1,2,崔海波3,4,王伟1,2,4   

  1. 1(同济大学计算机科学与技术系 上海 200092);2(嵌入式系统与服务计算教育部重点实验室(同济大学) 上海 200092);3(湖北大学计算机与信息工程学院 武汉 430062);4(湖北省教育信息化工程技术研究中心(湖北大学) 武汉 430062) (wwang@tongji.edu.cn)
  • 出版日期: 2019-07-01
  • 基金资助: 
    国家自然科学基金项目 (61672384);湖北省教育信息化工程技术研究中心开放基金重点项目(201701);中央高校基本科研业务费专项资金项目(0800219373)

An Ultra Lightweight Container that Maximizes Memory Sharing and Minimizes the Runtime Environment

Zhang Liqing1,2, Guo Dong1,2, Wu Shaoling1,2, Cui Haibo3,4, Wang Wei1,2,4   

  1. 1(Department of Computer Science and Technology, Tongji University, Shanghai 200092);2(Key Laboratory of Embedded System and Service Computing(Tongji University), Ministry of Education, Shanghai 200092);3(School of Computer Science and Information Engineering, Hubei University, Wuhan 430062);4(Hubei Engineering Research Center for Education Information (Hubei University), Wuhan 430062)
  • Online: 2019-07-01

摘要: 容器技术的兴起带来了数据中心的深刻变化,大量软件转为微服务方式部署与交付.如何优化海量用户环境下大规模容器的启动、运行与维护问题具有广泛的现实意义.目前以Docker为代表的主流容器技术已经取得较大成功,但在镜像体积、资源共享等方面仍有较大改进空间.梳理了虚拟化技术的发展过程,阐明轻量级的虚拟化技术是未来的研究方向,对数据敏感型应用至关重要.通过建立库文件共享模型,探究了库文件的共享程度对容器最大启动数量的影响.给出了一种超轻量级的容器设计方案,通过细化可操作资源的粒度,使得支撑应用程序运行的容器运行时环境最小化;将依赖库文件与可执行二进制文件单独抽取成层,实现了容器对主机内存资源的最大化共享.根据上述方案实现了一种超轻量级容器管理引擎:REG(runtime environment generation),并定义了一套基于REG的工作流.在镜像体积、启动速度、内存占用、容器启动风暴等方面进行对比实验,验证了所提方法在大规模容器环境下的有效性.

关键词: 容器, 云件, 轻量级, 运行时环境, 资源共享

Abstract: The rise of container technology has brought about profound changes in the data center, and a large number of software has been transferred to micro-service deployment and delivery. Therefore, it is of a broad practical significance to optimize the startup, operation and maintenance of large-scale containers in massive user environment. At present, the mainstream container technology represented by Docker has achieved great success, but there is still much room for improvement in image volume and resource sharing. We comb the development process of virtualization technology, and clarify that lightweight virtualization technology is the future research direction, which is very important for data-sensitive applications. By establishing a library file sharing model, we explored the impact of the degree of library files sharing on the maximum number of containers that can be launched. We present an ultra-lightweight container design that minimizes the container runtime environment supporting application execution by refining the granularity of operational resources. At the same time, we extract the library files and the executable binary files into a single layer, which realizes the maximum sharing of the host’s memory resources among containers. Then, according to the above scheme, we implement an ultra-lightweight container management engine: REG (runtime environment generation), and a REG-based workflow is defined. Finally, we carry out a series of comparative experiments on mirror volume, startup speed, memory usage, container startup storm, etc., and verify the effectiveness of the proposed method in the large-scale container environment.

Key words: container, Cloudware, lightweight, runtime environment, resource sharing

中图分类号: