[go: up one dir, main page]

CN111611073A - A traffic-aware-based container placement method in a containerized data center - Google Patents

A traffic-aware-based container placement method in a containerized data center Download PDF

Info

Publication number
CN111611073A
CN111611073A CN202010380619.5A CN202010380619A CN111611073A CN 111611073 A CN111611073 A CN 111611073A CN 202010380619 A CN202010380619 A CN 202010380619A CN 111611073 A CN111611073 A CN 111611073A
Authority
CN
China
Prior art keywords
container
containers
traffic
flow
data center
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010380619.5A
Other languages
Chinese (zh)
Other versions
CN111611073B (en
Inventor
邓玉辉
吴朝锐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guizhou Suanjia Computing Service Co.,Ltd.
Original Assignee
Jinan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan University filed Critical Jinan University
Priority to CN202010380619.5A priority Critical patent/CN111611073B/en
Publication of CN111611073A publication Critical patent/CN111611073A/en
Application granted granted Critical
Publication of CN111611073B publication Critical patent/CN111611073B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种容器化数据中心下基于流量感知的容器放置方法,该发明针对在容器化云环境的实践中,解决由于不恰当的容器放置策略导致用户访问服务时的延迟增大,严重降低服务质量的技术问题。该方法利用微服务架构中容器流量的规律特征,通过流量细化组件将同属于一个应用中频繁交流的容器按照其流量关联性放置到不同的逻辑模块中,再将同属一个应用的不同逻辑模块放置到不同的物理服务器中。同时,不同资源敏感类型的逻辑模块被整合到同一个物理服务器中。该方法通过以上步骤,降低了频繁交流的容器之间的流量开销,同时也提高了数据中心的负载均衡程度。

Figure 202010380619

The invention discloses a container placement method based on traffic awareness in a containerized data center. The invention aims to solve the problem of increased delay when users access services due to inappropriate container placement strategies in the practice of containerized cloud environment, and serious problems Technical issues that reduce the quality of service. This method utilizes the regular characteristics of container traffic in the microservice architecture, and uses the traffic refinement component to place containers that are frequently communicated in the same application into different logical modules according to their traffic correlations, and then place different logical modules belonging to the same application. placed on different physical servers. At the same time, logical modules of different resource-sensitive types are consolidated into the same physical server. Through the above steps, the method reduces the traffic overhead between frequently communicated containers, and also improves the load balancing degree of the data center.

Figure 202010380619

Description

一种容器化数据中心下基于流量感知的容器放置方法A traffic-aware-based container placement method in a containerized data center

技术领域technical field

本发明涉及云数据中心容器放置技术领域,具体涉及一种容器化数据中心下基于流量感知的容器放置方法。The invention relates to the technical field of container placement in cloud data centers, in particular to a container placement method based on traffic perception in a containerized data center.

背景技术Background technique

容器技术是一种类似于沙盒机制的运行环境隔离技术,用户可以在容器中创建运行操作系统,实现操作系统级的虚拟化。同传统的虚拟机相比,容器技术通过共享内核资源的方式,实现轻量级的应用运行隔离。由于其相对于虚拟机的各种优越性,许多云服务提供商都对数据中心做了容器化改造,并利用微服务架构提高数据中心内部处理高并发请求时的性能。Container technology is an operating environment isolation technology similar to the sandbox mechanism. Users can create and run operating systems in containers to achieve operating system-level virtualization. Compared with traditional virtual machines, container technology achieves lightweight application isolation by sharing kernel resources. Due to its various advantages over virtual machines, many cloud service providers have containerized data centers and used microservices architecture to improve the performance of high concurrent requests within the data center.

在容器化数据中心内部,微服务架构常用于将某个应用分解成若干个微服务,各微服务之间按照一定的依赖关系运行,以提高并发环境下的性能。在微服务架构中,同属于一个应用的容器需要进行不同程度的网络交流来进行任务交付。例如搜索引擎等实时性应用程序常会将一个用户的查找请求分发至成百上千个容器中进行高并发操作。In a containerized data center, the microservice architecture is often used to decompose an application into several microservices, and each microservice operates according to a certain dependency to improve performance in a concurrent environment. In the microservice architecture, containers belonging to the same application require different levels of network communication to deliver tasks. Real-time applications such as search engines often distribute a user's search request to hundreds or thousands of containers for high concurrent operations.

据统计,数据中心内部流量占据了数据中心总带宽用量的70%,其中跨机架流量占比约40%-90%。随着微服务架构在容器化数据中心的普遍部署,企业主要从减少流量开销和负载均衡两个角度部署容器。一方面,将交流密切的容器放置到就近的位置能够最大程度减少容器间的流量开销,但单点失效会使得服务不可用;另一方面,将容器部署到不同的物理服务器能够对负载均衡起到较大的优化作用,但会增加容器间的交流开销。因此,对于容器放置策略中平衡流量开销的减少和负载均衡的工作就显得尤为重要。According to statistics, intra-data center traffic accounts for 70% of the data center's total bandwidth usage, of which cross-rack traffic accounts for about 40%-90%. With the widespread deployment of microservice architectures in containerized data centers, enterprises mainly deploy containers from the perspectives of reducing traffic overhead and load balancing. On the one hand, placing containers with close communication in a nearby location can minimize the traffic overhead between containers, but a single point of failure will make services unavailable; on the other hand, deploying containers to different physical servers can improve load balancing. to a larger optimization effect, but it will increase the communication overhead between containers. Therefore, it is particularly important to balance the reduction of traffic overhead and load balancing in the container placement strategy.

发明内容SUMMARY OF THE INVENTION

本发明的目的是为了解决现有技术中的上述缺陷,提供一种容器化数据中心下基于流量感知的容器放置方法,在容器请求到达数据中心时通过放置容器,在降低数据中心容器流量代价的同时提高负载均衡程度。The purpose of the present invention is to solve the above-mentioned defects in the prior art, and to provide a container placement method based on traffic awareness in a containerized data center. At the same time, the degree of load balancing is improved.

本发明的目的可以通过采取如下技术方案达到:The purpose of the present invention can be achieved by adopting the following technical solutions:

一种容器化数据中心下基于流量感知的容器放置方法,数据中心接收容器请求后分别经由初始化模块、流量细化模块得到容器的放置策略,最后由放置模块处理容器的放置操作,该容器放置方法包括以下步骤:A container placement method based on traffic awareness in a containerized data center. After receiving a container request, the data center obtains a container placement strategy through an initialization module and a traffic refinement module, and finally the placement module handles the container placement operation. The container placement method Include the following steps:

S1、当初始化模块接收到容器请求后,根据容器之间的流量交流情况,以单个应用为单位创建流量矩阵,并根据该流量矩阵进一步生成容器用量图,用于判断容器之间的流量关联度以及容器对计算资源的请求量;S1. After the initialization module receives the container request, it creates a traffic matrix in units of a single application according to the traffic exchange between the containers, and further generates a container usage map according to the traffic matrix, which is used to judge the traffic correlation between the containers. and the amount of requests the container makes for computing resources;

S2、流量细化模块根据容器用量图整合容器,将同属于一个应用的容器按照流量关联度划分为三个等级,将其存储到不同的逻辑模块中,在不同的逻辑模块中根据其内部容器对资源的敏感类型贴上对应的标签;S2. The traffic refinement module integrates the containers according to the container usage map, divides the containers belonging to the same application into three levels according to the traffic correlation degree, and stores them in different logic modules. In different logic modules, according to their internal containers Attach corresponding labels to the sensitive types of resources;

S3、判断逻辑模块的资源敏感类型,混合不同资源敏感类型的逻辑模块放置至虚拟机中,并将同属一个应用中三个不同等级的逻辑模块分开存放到不同的物理服务器中。S3. Determine the resource-sensitive type of the logical module, mix logical modules of different resource-sensitive types and place them in the virtual machine, and store three logical modules of different levels in the same application separately in different physical servers.

进一步地,所述的步骤S1中,初始化模块接收到容器请求,初始化模块收集信息生成容器用量图的过程如下:Further, in the step S1, the initialization module receives the container request, and the initialization module collects the information to generate the container usage map as follows:

S11、解析容器请求元数据,从资源请求字段中提取容器请求的CPU、内存、网络带宽大小;S11. Parse the container request metadata, and extract the size of the CPU, memory, and network bandwidth requested by the container from the resource request field;

S12、以一个容器实例为节点,其节点权重表示该容器对计算资源的请求量;将有交流的容器节点以边连接,两节点间的边权表示容器之间的网络交流量。S12. Take a container instance as a node, and its node weight represents the request amount of the container for computing resources; connect the container nodes with communication by edges, and the edge weight between the two nodes represents the network communication volume between the containers.

进一步地,所述的步骤S2过程如下:Further, the described step S2 process is as follows:

对于每一个应用中的容器实例,根据容器之间的流量关联度将逻辑模块划分成三个关联度逐渐增强的逻辑模块,并且标记逻辑模块中容器对所请求计算资源的敏感类型。For each container instance in the application, the logical modules are divided into three logical modules with gradually increasing correlation according to the traffic correlation between the containers, and the sensitive types of the containers in the logical modules to the requested computing resources are marked.

进一步地,所述的流量细化模块通过微服务架构下容器流量呈现一定的Zipf分布,按照容器之间的流量关联程度对所划分的逻辑模块级分成三个等级,分别是无关联、弱关联和强关联;其中,强关联是指网络交流量占比前30%的容器,弱关联是指网络交流量占比前30%至50%之间的容器,其余的容器定义为无关联;另外,根据逻辑模块内的容器对资源的敏感程度将逻辑模块进一步分别标记为CPU敏感型和内存敏感型。Further, the traffic refinement module presents a certain Zipf distribution through the container traffic under the micro-service architecture, and divides the divided logical modules into three levels according to the degree of traffic correlation between the containers, which are respectively unrelated and weakly related. and strong associations; among them, strong associations refer to the containers that account for the top 30% of network traffic, weak associations refer to containers that account for the top 30% to 50% of network traffic, and the rest of the containers are defined as unrelated; in addition , the logical modules are further marked as CPU-sensitive and memory-sensitive according to the resource sensitivity of the container in the logical module.

进一步地,所述的步骤S3过程如下:Further, the described step S3 process is as follows:

S31、当所放置逻辑模块的关联度标记为弱关联时,将其暂时放入等待队列,优先放置无关联、强关联的逻辑模块;S31. When the association degree of the placed logic module is marked as weak association, it is temporarily placed in the waiting queue, and the logic modules with no association and strong association are preferentially placed;

S32、在放置逻辑模块的过程中,根据其资源敏感标记将两种不同敏感类型的逻辑模块混合放置,并且对每个虚拟机采取资源预留策略,为弱关联的逻辑模块预留一定的资源;S32. In the process of placing the logical modules, mix and place two different sensitive types of logical modules according to their resource sensitive tags, and adopt a resource reservation policy for each virtual machine to reserve certain resources for the weakly associated logical modules ;

S33、当放置弱关联的逻辑模块时,为当前逻辑模块选取最优的虚拟机,目的为提高物理服务器的负载均衡程度。S33. When placing a weakly associated logical module, select an optimal virtual machine for the current logical module, in order to improve the load balancing degree of the physical server.

进一步地,所述的容器用量图是根据容器请求中的每一种应用单独设立的一种图类数据结构,用于保存该应用下容器的元数据情况,便于计算容器之间的流量关联程度以及所请求的资源。Further, the container usage graph is a graph-like data structure independently established according to each application in the container request, and is used to save the metadata of the container under the application, so as to facilitate the calculation of the degree of traffic correlation between the containers. and the requested resource.

进一步地,在逻辑模块中维护一个用于临时比较的容器元组,在未加入逻辑模块的容器列表中提取与当前临时比较的容器元组内容器交流最大的容器,并进一步更新临时比较容器元组,初始情况下,计算该应用下容器的总流量,提取出入度和出度总流量占比总流量最大的两个容器,将其加入逻辑模块中,设置容器组为临时比较容器元组。Further, maintain a container tuple for temporary comparison in the logic module, extract the container that communicates with the container in the current temporary comparison container tuple from the list of containers not added to the logic module, and further update the temporary comparison container element. Initially, calculate the total traffic of the containers under the application, extract the two containers whose inbound and outbound traffic accounts for the largest proportion of the total traffic, add them to the logic module, and set the container group as a temporary comparison container tuple.

进一步地,所述的步骤S32中根据其资源敏感标记将两种不同敏感类型的逻辑模块进行混合放置过程如下:Further, in the step S32, the mixed placement process of two different sensitive types of logic modules according to their resource sensitive tags is as follows:

对于每一个逻辑模块的放置,将其视为经典算法中的背包问题,优化目标在于寻找一种容器放置方式,使得数据中心内物理服务器的CPU与内存利用率达到65%以上。For the placement of each logical module, it is regarded as the knapsack problem in the classical algorithm, and the optimization goal is to find a container placement method, so that the CPU and memory utilization of physical servers in the data center can reach more than 65%.

本发明相对于现有技术具有如下的优点及效果:Compared with the prior art, the present invention has the following advantages and effects:

(1)本发明采用贪心计算的手段,准确计算出容器之间的流量关联程度,避免算法复杂度过高造成在实时计算过程中对放置决策时间产生的影响。(1) The present invention adopts the means of greedy calculation to accurately calculate the flow correlation degree between the containers, so as to avoid the influence on the placement decision time caused by the high complexity of the algorithm in the real-time calculation process.

(2)本发明根据容器之间的关联程度,将容器请求划分为若干个流量关联程度不一的逻辑模块,并在算法上尽可能保证逻辑模块之间的容器无网络交流。(2) The present invention divides the container request into several logical modules with different traffic correlation degrees according to the degree of association between the containers, and ensures that the containers between the logical modules have no network communication as much as possible in the algorithm.

(3)本发明在降低网络流量交流代价的同时,考虑了提高数据中心的负载均衡程度。(3) The present invention considers improving the load balancing degree of the data center while reducing the exchange cost of network traffic.

附图说明Description of drawings

图1是本发明公开的一种容器化数据中心下基于流量感知的容器放置方法的应用架构图。FIG. 1 is an application architecture diagram of a container placement method based on traffic awareness in a containerized data center disclosed in the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

实施例Example

如图1所示,是一种容器化数据中心下基于流量感知的容器放置方法的应用架构图,应用在微服务架构下容器化数据中心,针对因放置不当造成容器交流过程中因流量开销过大导致的高延迟问题,利用微服务架构下容器交流呈现的流量规律整合容器,达到降低流量开销的目的。同时优化在降低流量开销的过程中造成的数据中心的负载均衡程度较低引起的单点失效问题。本发明对这种贪心算法进行对比测试,从多角度评估本发明对数据中心所提供服务的性能影响。As shown in Figure 1, it is an application architecture diagram of a container placement method based on traffic awareness in a containerized data center. It is applied in a containerized data center under the microservice architecture. To solve the problem of high latency caused by large size, the container is integrated by using the traffic rules presented by the container exchange under the microservice architecture to reduce the traffic overhead. At the same time, it optimizes the single point of failure problem caused by the low degree of load balancing of the data center in the process of reducing traffic overhead. The present invention conducts a comparative test on this greedy algorithm, and evaluates the performance impact of the present invention on the services provided by the data center from multiple angles.

为了更清晰地阐明本发明的应用场景,以下结合应用架构图再作详细分析,主要分为三个步骤:In order to clarify the application scenario of the present invention more clearly, the following detailed analysis is made in conjunction with the application architecture diagram, which is mainly divided into three steps:

1)构建容器用量图。根据微服务架构下容器流量的Zipf分布为每一个应用创建对应的容器用量图,用于表示该应用下所有容器对计算资源的请求情况以及容器之间的网络通讯流量。对于i应用,其容器用量图可表示为Gi(V,E),V表示图中的容器节点,其节点权值可表示为CA=<CPU,MEM,Disk,Bandwidth>,表示该容器请求的资源数量;E表示图中容器节点连接的边,其边权表示两个容器之间的网络通讯流量,例如,E<CA,CB>=6,E<CA,CD>=56。为了便于说明容器之间的网络通讯流量特征,可用(Ci,Cj,Dij)或(Cj,Ci,Dij)的形式表示,即容器Ci和容器Cj的网络通讯流量为Dij。当容器放置完毕,容器之间物理链路距离会加入边权中,便于计算放置完毕后数据中心所产生的流量开销,用于比较不同放置策略对流量开销的影响。1) Build a container usage graph. According to the Zipf distribution of container traffic under the microservice architecture, a corresponding container usage graph is created for each application, which is used to represent the request for computing resources of all containers under the application and the network communication traffic between containers. For i application, its container usage graph can be expressed as G i (V, E), V is the container node in the graph, and its node weight can be expressed as C A =<CPU,MEM,Disk,Bandwidth>, indicating that the container The number of resources requested; E represents the edge connecting the container nodes in the graph, and its edge weight represents the network communication traffic between the two containers, for example, E<C A ,C B >=6, E<C A ,C D > =56. In order to facilitate the description of the network communication flow characteristics between containers, it can be expressed in the form of (C i , C j , D ij ) or (C j , C i , D ij ), that is, the network communication flow of container C i and container C j is D ij . When the containers are placed, the physical link distance between the containers will be added to the edge weight, which is convenient for calculating the traffic overhead generated by the data center after the placement is completed, and is used to compare the impact of different placement strategies on the traffic overhead.

2)流量细化。本发明对于容器网络通讯流量的细化主要两个贪婪算法完成,如图1中流量细化模块所示,两个算法分别可称为精炼算法和分割算法。在流量细化模块接收到容器用量图之后,首先按照容器的流量关联程度对容器序列进行重排序,生成一个DWS(Descending Weight Sequence),再将排序完的容器序列分割成三种不同流量关联度的逻辑模块。对于精炼算法,例如当前C1,C2,C3,C4四个容器,分别有(1,2,1),(1,3,4),(1,4,6),(2,3,7),(2,4,8),(3,4,5),将连接每个节点的边权相加之后,对于C1,C2,C3,C4分别得到11,16,16,19(例如,11=E<C1,C2>+E<C1,C3>+E<C1,C4>)。首先对于最大的19和16这两个值,找到C2,C4这两个对外通讯流量占比最大的容器,将其添加进DWS,并设置为初始LCPDWS(Last container pair in DWS)。对于C2,C4分别有

Figure BDA0002481923170000061
对于C3来说,其占比最大的对外通讯流量发生在与C4的网络交流中,其值等于
Figure BDA0002481923170000062
Figure BDA0002481923170000063
此时不满足“占比最大”条件。其余容器添加进DWS的过程为:对于当前最新的LCPDWS,按照一对一的原则在其余容器中找到与处于LCPDWS中的两个容器网络通讯流量最大的两个容器,将这两个容器添加进DWS中。至此,精炼算法完毕。对于分割算法,在精炼完毕后的每一个DWS中,应用分割算法将其分割为三个不同关联等级的逻辑模块。将前x%频繁交流的容器放置于强关联逻辑模块中,这些容器为上文所述的“交流较大”容器,将接下来的y%容器放置于弱关联逻辑模块中,这些容器为上文所述的“交流较少”容器,将剩余容器放置无关联逻辑模块中,这些容器为上文所属的“无交流”容器。具体x,y的值取决于其依赖的DWS,其中DWSi表示在DWS中的第i个容器所对应与其他容器的网络通讯总量。根据Zipf分布,设定x的取值在(0,0.3)中,即在前30%容器中找到一个下标i满足DWSi-DWSi+1最大。对于y的取值,则在(x,0.5)范围中取得。对于无关联逻辑模块,则在(y,1)范围中取得。至此,分割算法完毕。在完成分割算法的同时,根据逻辑模块中容器对资源请求的敏感程度,将逻辑模块进一步标签化为CPU敏感型和内存敏感型。2) Traffic refinement. The refinement of the communication traffic of the container network in the present invention is mainly accomplished by two greedy algorithms. As shown in the traffic refinement module in FIG. 1 , the two algorithms can be respectively called a refinement algorithm and a segmentation algorithm. After the traffic refinement module receives the container usage map, it first reorders the container sequence according to the traffic correlation degree of the container to generate a DWS (Descending Weight Sequence), and then divides the sorted container sequence into three different traffic correlation degrees. logic module. For the refining algorithm, such as the current four containers C 1 , C 2 , C 3 , C 4 , there are (1, 2, 1), (1, 3, 4), (1, 4, 6), (2, 3, 7), (2, 4, 8), (3, 4, 5), after adding the edge weights connecting each node, for C 1 , C 2 , C 3 , C 4 get 11, 16 respectively , 16, 19 (eg, 11=E<C 1 ,C 2 >+E<C 1 ,C 3 >+E<C 1 ,C 4 >). First, for the largest two values of 19 and 16, find the two containers C 2 and C 4 with the largest proportion of external communication traffic, add them to DWS, and set them as the initial LCPDWS (Last container pair in DWS). For C2 , C4 , respectively
Figure BDA0002481923170000061
For C 3 , the largest proportion of external communication traffic occurs in the network communication with C 4 , and its value is equal to
Figure BDA0002481923170000062
Figure BDA0002481923170000063
At this time, the "largest proportion" condition is not met. The process of adding other containers to DWS is as follows: For the current latest LCPDWS, find the two containers with the largest network communication traffic with the two containers in the LCPDWS according to the one-to-one principle, and add these two containers to the DWS. in DWS. At this point, the refining algorithm is complete. For the segmentation algorithm, in each DWS after refining, the segmentation algorithm is applied to segment it into three logical modules with different association levels. Place the first x% of frequently communicated containers in the strong association logic module, these containers are the "big communication" containers described above, and place the next y% containers in the weak association logic module, these containers are the upper For the "less communication" container described in the article, the remaining containers are placed in unrelated logic modules, and these containers are the "no communication" containers to which the above belongs. The specific value of x, y depends on the DWS it depends on, where DWS i represents the total amount of network communication with other containers corresponding to the ith container in the DWS. According to the Zipf distribution, the value of x is set in (0, 0.3), that is, a subscript i is found in the top 30% of the containers to satisfy the maximum of DWS i -DWS i+1 . For the value of y, it is obtained in the range of (x, 0.5). For unrelated logic modules, it is obtained in the (y,1) range. At this point, the segmentation algorithm is completed. While completing the segmentation algorithm, according to the sensitivity of the container in the logic module to resource requests, the logic module is further labeled as CPU-sensitive and memory-sensitive.

3)放置逻辑模块。对于逻辑模块的放置,主要参考多背包问题的中的解决思路,将同一应用下不同关联程度的逻辑模块放置到处于不同的物理服务器中的虚拟机中,同时混合放置不同资源敏感类型的逻辑模块,例如,将CPU敏感型的逻辑模块和内存敏感型的逻辑模块在上述条件满足的情况下混合放置。逻辑模块的放置过程分为两轮,第一轮优先放置强关联和无关联的逻辑模块,在放置这两种模块的过程中,对虚拟机资源做出预留策略,即预留一部分资源用于弱关联逻辑模块的放置。第二轮再放置弱关联的逻辑模块。3) Place the logic module. For the placement of logical modules, we mainly refer to the solution in the multi-knapsack problem. Logical modules with different degrees of association under the same application are placed in virtual machines in different physical servers, and logical modules of different resource-sensitive types are mixed at the same time. For example, CPU-sensitive logic modules and memory-sensitive logic modules are mixed and placed under the condition that the above conditions are satisfied. The placement process of logical modules is divided into two rounds. In the first round, logical modules with strong association and no association are placed preferentially. For placement of weakly associated logic modules. In the second round, weakly related logic modules are placed.

综上所述,本实施例提一种容器化数据中心下基于流量感知的容器放置策略,该方法利用容器之间流量交流呈现Zipf分布的特别,同一关联程度的容器放置到一起,再将不同关联程度的逻辑模块分开放置到不同物理服务器,最后按照逻辑模块的资源敏感类型混合放置。在降低数据中心流量开销的同时,提高了负载均衡程度。To sum up, this embodiment proposes a traffic-aware-based container placement strategy in a containerized data center. This method utilizes traffic exchange between containers to present a special Zipf distribution. Containers with the same degree of association are placed together, and then different The logical modules of the related degree are placed separately on different physical servers, and finally mixed according to the resource-sensitive type of the logical modules. While reducing the data center traffic overhead, the load balancing degree is improved.

上述实施例为本发明较佳的实施方式,但本发明的实施方式并不受上述实施例的限制,其他的任何未背离本发明的精神实质与原理下所作的改变、修饰、替代、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。The above-mentioned embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited by the above-mentioned embodiments, and any other changes, modifications, substitutions, combinations, The simplification should be equivalent replacement manners, which are all included in the protection scope of the present invention.

Claims (8)

1. A container placement method based on flow perception in a containerized data center is characterized in that the container placement method comprises the following steps of:
s1, after the container request is received by the initialization module, a flow matrix is created by taking a single application as a unit according to the flow communication condition among the containers, and a container quantity map is further generated according to the flow matrix and is used for judging the flow association degree among the containers and the request quantity of the containers for computing resources;
s2, the flow rate refining module integrates containers according to the container quantity diagram, divides the containers belonging to the same application into three grades according to the flow rate association degree, stores the three grades into different logic modules, and attaches corresponding labels to the different logic modules according to the sensitive types of the containers in the different logic modules to the resources;
s3, judging the resource sensitivity types of the logic modules, mixing the logic modules with different resource sensitivity types, placing the logic modules into the virtual machine, and separately storing the three logic modules with different levels in the same application into different physical servers.
2. The method for placing the container based on the flow sensing in the containerized data center according to claim 1, wherein in step S1, the initialization module receives the container request, and the process of the initialization module collecting the information to generate the container volume map is as follows:
s11, analyzing the metadata of the container request, and extracting the sizes of the CPU, the memory and the network bandwidth of the container request from the resource request field;
s12, taking a container instance as a node, wherein the node weight of the container represents the request amount of the container to the computing resource; the container nodes with communication are connected by edges, and the edge weight between the two nodes represents the network communication quantity between the containers.
3. The method for placing the container based on the flow sensing in the containerized data center according to claim 1, wherein the step S2 comprises the following steps:
for each container instance in each application, dividing the logic module into three logic modules with gradually-enhanced association degrees according to the traffic association degrees among the containers, and marking the sensitive types of the containers in the logic modules to the requested computing resources.
4. The method for placing the container based on the flow perception in the containerized data center according to claim 1, wherein the flow refining module presents certain Zipf distribution through the container flow under the micro-service architecture, and the divided logic module level is divided into three levels according to the flow association degree among the containers, wherein the three levels are respectively non-association, weak association and strong association; wherein, the strong correlation refers to a container with the network communication amount accounting for 30% of the first time, the weak correlation refers to a container with the network communication amount accounting for 30% to 50% of the first time, and the rest containers are defined as no correlation; in addition, the logic modules are further marked as CPU sensitive type and memory sensitive type according to the sensitivity of the containers in the logic modules to the resources.
5. The method for placing the container based on the flow sensing in the containerized data center according to claim 1, wherein the step S3 comprises the following steps:
s31, when the relevance degree of the placed logic module is marked as weak relevance, temporarily placing the logic module into a waiting queue, and preferentially placing the logic module without relevance and with strong relevance;
s32, in the process of placing the logic modules, the two logic modules with different sensitive types are placed in a mixed mode according to the resource sensitive marks of the logic modules, and a resource reservation strategy is adopted for each virtual machine to reserve certain resources for the logic modules with weak association;
and S33, when the weakly associated logic module is placed, selecting the optimal virtual machine for the current logic module, so as to improve the load balancing degree of the physical server.
6. The method as claimed in claim 1, wherein the container volume map is a map-like data structure separately established according to each application in the container request, and is used to store metadata of the container under the application, so as to calculate the traffic association degree between the containers and the requested resources.
7. The container placement method based on flow perception in the containerized data center according to claim 1, wherein a container tuple for temporary comparison is maintained in the logic module, the container with the largest communication with the container in the container tuple currently and temporarily compared is extracted from a container list not added to the logic module, the temporarily compared container tuple is further updated, in an initial situation, the total flow of the containers in the application is calculated, two containers with the largest total flow of the incoming degree and the outgoing degree in comparison to the total flow are extracted and added to the logic module, and the container group is set as the temporarily compared container tuple.
8. The method for placing the container based on the traffic awareness in the containerized data center according to claim 5, wherein in step S32, the process of placing the logic modules of two different sensitive types in a mixed manner according to the resource sensitivity labels thereof is as follows:
regarding the placement of each logic module as a knapsack problem in a classical algorithm, the optimization aims at finding a container placement mode so that the utilization rate of a CPU and a memory of a physical server in a data center reaches more than 65%.
CN202010380619.5A 2020-05-08 2020-05-08 Container placement method based on flow sensing in containerized data center Active CN111611073B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010380619.5A CN111611073B (en) 2020-05-08 2020-05-08 Container placement method based on flow sensing in containerized data center

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010380619.5A CN111611073B (en) 2020-05-08 2020-05-08 Container placement method based on flow sensing in containerized data center

Publications (2)

Publication Number Publication Date
CN111611073A true CN111611073A (en) 2020-09-01
CN111611073B CN111611073B (en) 2023-01-31

Family

ID=72199567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010380619.5A Active CN111611073B (en) 2020-05-08 2020-05-08 Container placement method based on flow sensing in containerized data center

Country Status (1)

Country Link
CN (1) CN111611073B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140380330A1 (en) * 2013-06-25 2014-12-25 Amazon Technologies, Inc. Token sharing mechanisms for burst-mode operations
CN104811493A (en) * 2015-04-21 2015-07-29 华中科技大学 Network-aware virtual machine mirroring storage system and read-write request handling method
CN105631196A (en) * 2015-12-22 2016-06-01 中国科学院软件研究所 Microservice-oriented container level flexible resource supply system and method
CN107743611A (en) * 2015-04-29 2018-02-27 微软技术许可有限责任公司 The optimum allocation of dynamic cloud computing platform resource
CN108737548A (en) * 2018-05-24 2018-11-02 南京邮电大学 Distributed WEB micro services container aggregated structure system and its implementation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140380330A1 (en) * 2013-06-25 2014-12-25 Amazon Technologies, Inc. Token sharing mechanisms for burst-mode operations
CN104811493A (en) * 2015-04-21 2015-07-29 华中科技大学 Network-aware virtual machine mirroring storage system and read-write request handling method
CN107743611A (en) * 2015-04-29 2018-02-27 微软技术许可有限责任公司 The optimum allocation of dynamic cloud computing platform resource
CN105631196A (en) * 2015-12-22 2016-06-01 中国科学院软件研究所 Microservice-oriented container level flexible resource supply system and method
CN108737548A (en) * 2018-05-24 2018-11-02 南京邮电大学 Distributed WEB micro services container aggregated structure system and its implementation

Also Published As

Publication number Publication date
CN111611073B (en) 2023-01-31

Similar Documents

Publication Publication Date Title
US10325343B1 (en) Topology aware grouping and provisioning of GPU resources in GPU-as-a-Service platform
EP1472846B1 (en) Method and apparatus for web farm traffic control
CN103699445B (en) Task scheduling method, device and system
US9965441B2 (en) Adaptive coalescing of remote direct memory access acknowledgements based on I/O characteristics
CN104579962B (en) A kind of method and device of qos policy that distinguishing different messages
US9760429B2 (en) Fractional reserve high availability using cloud command interception
CN104375897B (en) Cloud computing resource scheduling method based on the unbalanced degree of minimum relative load
US20160134538A1 (en) Ensuring predictable and quantifiable networking performance
US20110078303A1 (en) Dynamic load balancing and scaling of allocated cloud resources in an enterprise network
CN102170396A (en) QoS control method of cloud storage system based on differentiated service
CN102082692A (en) Method and equipment for migrating virtual machines based on network data flow direction, and cluster system
CN103294548B (en) A kind of I/O request dispatching method based on distributed file system and system
CN101964752B (en) Broadband network access method for dynamically adjusting resource allocation
US9501326B2 (en) Processing control system, processing control method, and processing control program
CN103338252A (en) Distributed database concurrence storage virtual request mechanism
US20060168217A1 (en) Method, computer program product, and data processing system for data queuing prioritization in a multi-tiered network
CN102932271A (en) Method and device for realizing load balancing
CN104378412A (en) Dynamic load balancing method taking user periodical resource demand into account in cloud environment
CN110308965A (en) Rule-based heuristic virtual machine allocation method and system for cloud data center
CN110471761A (en) Control method, user equipment, storage medium and the device of server
CN101252451A (en) Web Server System Request DiffServ Method and Middleware to Guarantee Quality of Service
CN109039933A (en) A kind of cluster network optimization method, device, equipment and medium
CN111813556A (en) Elastic expansion method of virtual cluster in cloud computing environment
CN111611073B (en) Container placement method based on flow sensing in containerized data center
CN115373862A (en) Dynamic resource scheduling method, system and storage medium based on data center

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20241212

Address after: 230000 B-1015, wo Yuan Garden, 81 Ganquan Road, Shushan District, Hefei, Anhui.

Patentee after: HEFEI MINGLONG ELECTRONIC TECHNOLOGY Co.,Ltd.

Country or region after: China

Address before: 510632 No. 601, Whampoa Avenue, Tianhe District, Guangdong, Guangzhou

Patentee before: Jinan University

Country or region before: China

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20250902

Address after: 550000 Guizhou Province, Guiyang City, Guian New District, Huchao Township, Guiyang Big Data Science and Technology Innovation City Computing Center A1 Building 15-6

Patentee after: Guizhou Suanjia Computing Service Co.,Ltd.

Country or region after: China

Address before: Ganquan road Shushan District of Hefei City, Anhui Province, Jiangmen 230000 Business Garden No. 81 floor B-1015

Patentee before: HEFEI MINGLONG ELECTRONIC TECHNOLOGY Co.,Ltd.

Country or region before: China