Docker容器間高速數(shù)據(jù)交換方法研究
本文選題:Docker 切入點:容器 出處:《北京郵電大學(xué)》2017年碩士論文
【摘要】:隨著云計算的迅猛發(fā)展,IT廠商推出多種云計算平臺,Docker出現(xiàn)后很多IT廠商構(gòu)建了 CaaS (容器即服務(wù),Container as a Service)云計算平臺以提供更加高效、輕量的服務(wù)。Docker容器之間通過Linux系統(tǒng)的命名空間進行隔離,容器間的連接通常采用通過虛擬網(wǎng)橋的橋接模式,這限制了同宿主Docker容器間的通信性能。共享內(nèi)存作為進程間高速的通信方式,將其引入到同宿主Docker容器間的通信場景中能有效地提升容器間的通信效率。本文提出了一種基于內(nèi)核內(nèi)存共享的同宿主Docker容器間高速通信方案,并針對NUMA (Non Uniform Memory Access Architecture)體系結(jié)構(gòu)進行了性能優(yōu)化。本文的研究內(nèi)容主要包括:(1)同宿主Docker容器間進程的內(nèi)存共享:在參考多種共享內(nèi)存的實現(xiàn)方式和理解Docker隔離特點的情況下,設(shè)計通過在宿主系統(tǒng)上實現(xiàn)一個專有虛擬字符設(shè)備驅(qū)動,Docker容器間通信進程使用該設(shè)備驅(qū)動實現(xiàn)的內(nèi)存映射方法將同一塊內(nèi)存空間映射到相應(yīng)的進程地址空間中,該方式?jīng)]有破壞Docker原有的隔離特性;(2)基于內(nèi)存共享的進程間通信機制:共享內(nèi)存空間作為通信進程的臨界資源,在訪問內(nèi)存中數(shù)據(jù)時需要進行同步控制,該方案在共享內(nèi)存之上設(shè)計了一種循環(huán)緩沖隊列來實現(xiàn)高速的讀寫操作,同時設(shè)計實現(xiàn)面向連接的通信模型和容器感知的功能;(3)基于NUMA的方案優(yōu)化:多核處理器和NUMA體系結(jié)構(gòu)對基于內(nèi)存共享的通信方案有很大的影響,因此提出了基于NUMA體系結(jié)構(gòu)的共享內(nèi)存池和NUMA感知的優(yōu)化方案,通過合理地分配共享內(nèi)存空間和設(shè)置通信進程的CPU親和度來有效地提升該方案的通信效率。多核處理器和NUMA體系結(jié)構(gòu)在服務(wù)器市場得到了普及,而NUMA體系結(jié)構(gòu)導(dǎo)致不同的處理器對同一個NUMA節(jié)點內(nèi)存數(shù)據(jù)的訪問存在性能差異。所以,本文針對NUMA體系環(huán)境進行了測試實驗,實驗結(jié)果表明:基于內(nèi)存共享的同宿主Docker容器間通信方案與Docker默認的虛擬網(wǎng)橋通信方式相比,對于Docker容器在同一 NUMA節(jié)點上和在跨NUMA節(jié)點上的兩種通信場景,最大吞吐量分別提升了 350%和110%。
[Abstract]:With the rapid development of cloud computing, many IT vendors have built CaaS (Container as a Service) cloud computing platform to provide more efficient. Lightweight services. Docker containers are isolated through the namespaces of the Linux system, and connections between containers are typically bridged over virtual bridges. This limits the performance of communication with the host Docker container. Introducing it into the communication scenario with the host Docker container can effectively improve the communication efficiency between the containers. In this paper, a high speed communication scheme based on kernel memory sharing between the Docker container and the host container is proposed. The performance optimization of NUMA on Uniform Memory Access Architecture is also carried out. The main contents of this paper include memory sharing of processes between NUMA Uniform Memory Access architecture and the host Docker container: under the condition of referring to various shared memory implementations and understanding the characteristics of Docker isolation, the main contents of this paper are as follows: 1. By implementing a proprietary virtual character device driver Docker container communication process on the host system, using the memory mapping method implemented by the device driver, the same memory space is mapped to the corresponding process address space. This method does not break the original isolation characteristic of Docker. (2) Inter-process communication mechanism based on memory sharing: shared memory space, as the critical resource of communication process, needs to be controlled synchronously when accessing the data in memory. In this scheme, a cyclic buffer queue is designed on shared memory to achieve high speed read and write operations. At the same time, the connection-oriented communication model and container-aware function are designed and implemented. The scheme optimization based on NUMA: the multi-core processor and the NUMA architecture have great influence on the communication scheme based on memory sharing. Therefore, an optimization scheme of shared memory pool and NUMA awareness based on NUMA architecture is proposed. The communication efficiency of this scheme is effectively improved by allocating the shared memory space reasonably and setting the CPU affinity of the communication process. Multi-core processors and NUMA architecture have been popularized in the server market. However, NUMA architecture leads to different performance of different processors accessing memory data of the same NUMA node. Therefore, this paper makes a test experiment on the NUMA system environment. The experimental results show that compared with Docker's default virtual bridge communication scheme based on memory sharing, two communication scenarios of Docker container on the same NUMA node and across NUMA node are compared. The maximum throughput increased by 350% and 110% respectively.
【學(xué)位授予單位】:北京郵電大學(xué)
【學(xué)位級別】:碩士
【學(xué)位授予年份】:2017
【分類號】:TP393.09
【相似文獻】
相關(guān)重要報紙文章 前1條
1 特約撰稿人 岑義濤;從Docker容器漏洞談Docker安全[N];網(wǎng)絡(luò)世界;2014年
相關(guān)博士學(xué)位論文 前1條
1 馬曉光;無容器凝固—非晶晶化法制備YAG基納米透明陶瓷的研究[D];中國地質(zhì)大學(xué)(北京);2017年
相關(guān)碩士學(xué)位論文 前10條
1 陸文龍;Docker容器間高速數(shù)據(jù)交換方法研究[D];北京郵電大學(xué);2017年
2 郝啟臣;面向Docker容器異常檢測系統(tǒng)的設(shè)計與實現(xiàn)[D];北京郵電大學(xué);2017年
3 徐江生;容器云平臺的設(shè)計與實現(xiàn)[D];北京郵電大學(xué);2017年
4 葉龍勝;基于Docker容器的SaaS模式云應(yīng)用平臺的研究與設(shè)計[D];北京郵電大學(xué);2017年
5 董澤;基于容器的任務(wù)卸載技術(shù)研究[D];哈爾濱工業(yè)大學(xué);2017年
6 張貴龍;跌落沖擊作用下儲液容器動態(tài)響應(yīng)及液體晃蕩研究[D];江蘇科技大學(xué);2017年
7 江萌;基于Docker的PaaS平臺的研究與應(yīng)用[D];華北電力大學(xué)(北京);2017年
8 高原;基于Docker的私有云主機系統(tǒng)研究與實現(xiàn)[D];電子科技大學(xué);2017年
9 苗立堯;基于Docker容器的混合式集群伸縮方法研究[D];西安郵電大學(xué);2016年
10 劉輝揚;基于Docker的容器監(jiān)控和調(diào)度的研究與實現(xiàn)[D];華南理工大學(xué);2016年
,本文編號:1670357
本文鏈接:http://sikaile.net/guanlilunwen/ydhl/1670357.html