WO2021008225A1 - 数据中心面向微服务的电力资源分配的方法和系统 - Google Patents

数据中心面向微服务的电力资源分配的方法和系统 Download PDF

Info

Publication number
WO2021008225A1
WO2021008225A1 PCT/CN2020/090958 CN2020090958W WO2021008225A1 WO 2021008225 A1 WO2021008225 A1 WO 2021008225A1 CN 2020090958 W CN2020090958 W CN 2020090958W WO 2021008225 A1 WO2021008225 A1 WO 2021008225A1
Authority
WO
WIPO (PCT)
Prior art keywords
microservice
power
microservices
module
servers
Prior art date
Application number
PCT/CN2020/090958
Other languages
English (en)
French (fr)
Inventor
李超
侯小凤
过敏意
姚斌
Original Assignee
上海交通大学
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 上海交通大学 filed Critical 上海交通大学
Publication of WO2021008225A1 publication Critical patent/WO2021008225A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06312Adjustment or analysis of established resource schedule, e.g. resource or task levelling, or dynamic rescheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Definitions

  • the present invention relates to a technology in the field of power system intelligent control, in particular to a method and system for microservice-oriented power resource allocation in a data center.
  • Microservices is an emerging software architecture that splits a large single application and service into dozens or even hundreds of micro-service components, and expands a single component instead of the entire application stack to satisfy Service level agreement.
  • the data center power resource allocation method and system cannot fully tap the potential of energy saving and efficiency brought by the microservice software architecture.
  • the specific manifestations are: (1) The current data center power resource allocation ignores the heterogeneity of each microservice; (2) The scheduling algorithm in the traditional cloud computing environment will increase the cost of data collection and energy consumption in the microservice environment.
  • the present invention proposes a method and system for microservice-oriented power resource allocation in data centers, which can quickly and accurately allocate correspondingly required power for microservices of different critical degrees Resources, to ensure that the application performance remains unchanged, the data center power resource utilization rate is maximized, so that the power infrastructure can take advantage of the horizontal expansion of microservices.
  • the invention relates to a method for microservice-oriented power resource allocation in a data center, which uses the bipartite graph in graph theory to construct a microservice power resource allocation model, and calculates the criticality of each microservice in the microservice power resource allocation model, namely In the current state, the degree to which the microservice is worth the power resource and whether it will affect the quality of service of the entire application under the current power resource allocation; by checking the available power resource capacity of the data center at the current moment and the resource corresponding to each microservice Distribution situation: Prioritize the distribution of power resources for microservices with a high degree of criticality, so as to optimize the distribution of power resources while ensuring the application service quality remains unchanged.
  • the criticality specifically represents the power resources that are worth allocating to different microservices in an application and the impact of the microservice on the quality of service of the entire application after the execution of the microservice under a certain power resource allocation.
  • the criticality Including three static factors and one dynamic factor. Among them: the static factor comes from the properties of the microservice itself, which is a constant value during the execution of the microservice; the dynamic factor is determined by the change of the user request status and is dynamic with the change of the user request type and different request ratios Variety.
  • the static factors include: the number of times a single request calls the microservice, the calculation time of each call for the microservice to complete the request, and the relationship between the calculation time of each microservice and the allocated power, that is, the "performance- Power consumption.
  • the number of times that request type n calls microservice i as call_ts n_i
  • the calculation time for each call of microservice i to complete the current type of request is exec_t n_i
  • the number of times a single request calls the unified microservice is exactly the same in each measurement, and the difference between the calculation time of the call under each test and the "performance-power consumption" relationship of each microservice is less than 1%. Therefore, three static factors are calculated by averaging the results of multiple tests.
  • the dynamic factor refers to the change in the type and proportion of user requests processed by the microservice, which reflects the proportion of the total requests processed by the microservice in different types of requests under current user conditions.
  • the dynamic factors can be calculated by counting the total number of different types of user requests processed by each microservice. In order to compare different microservices, it is preferable that the number of all user requests be normalized to the total number of requests for accessing applications.
  • the microservice power resource allocation model is a dynamic bipartite graph model.
  • Each vertex in the bipartite graph represents a microservice
  • each edge represents the number of user requests allocated to the microservice processing
  • the weight of each edge represents the microservice.
  • the time cost and cost required by the service to process corresponding user requests, the number of inbound edges (in-degree) of each node will vary with the number of user requests.
  • the weight of each edge is a sequence structure, and each value in the sequence is determined by static factors, reflecting the total computing time required for the microservice to complete the request under different operating powers, that is, for each microservice
  • the critical degree is obtained by the sum of the number of all types of edges connected to each vertex and the weight product, which reflects the sum of the time required for the microservice to complete all the requests under the corresponding user request. For example: when there are a total of N types of requests accessing microservice i among m types of requests, then for the above microservice i, its criticality
  • microservices are the key services that constrain the overall performance of the application, based on the ratio of the criticality to the performance of the benchmark service, that is, the MFC is divided by the benchmark service performance under different power supply conditions to divide the microservices into key microservices, Not sure about microservices and non-critical microservices.
  • the benchmark service performance reflects the service quality specified by the entire application, that is, the response time of the application generally cannot exceed the time specified by the benchmark service performance. It accesses the application by running some benchmark tests, and then finds the maximum response time and uses the maximum response time Indicates benchmark service performance, or adopting some widely recognized standard values. These standard values are often specified by authoritative organizations or works. For example, the "Usability Engineering" stipulates that the response time of interactive services does not exceed 100 milliseconds, that is, 100 milliseconds can be used as the base Benchmark service performance of the method.
  • the ratios of the key microservices are all greater than or equal to 1, which reflects that the response time of the service is longer than the reference time under different power supply conditions.
  • the power resources of the service should be guaranteed, otherwise the service quality of the entire application will be affected.
  • the ratio of the non-critical microservices is less than 1, which means that no matter how the power resource supply conditions of the microservices are changed, the calculation time of the microservices is less than the reference time, which has no effect on the performance of the entire application.
  • Part of the ratio of the uncertain microservices is greater than or equal to 1, and the other part is less than 1, indicating that the microservices are within a certain power supply range. Power supply changes have no effect on the performance of the microservices. However, when the power supply is lower than a certain value, the microservices’ Performance drops and exceeds baseline performance.
  • the priority allocation refers to dividing the data center server into a cold area server for running critical services, a warm area server for executing uncertain microservices, and a hot area server for running non-critical services, where:
  • the cold zone server guarantees the supply of power resources for the cold service
  • the hot zone server can be arbitrarily reduced in frequency
  • the warm zone server can be adjusted to a hot zone server or a cold zone server according to the performance design.
  • the priority allocation is dynamically adjusted with the system status, that is, the number of servers and the criticality of microservices are adjusted, including: when the operating power of the application is greater than the power supply and when the frequency of the server in the warm area is reduced to a minimum, the power supply of the application is still If the power is greater than the power supply, first update the servers in the warm area to the servers in the hot area one by one. When the applied power is still greater than the power supply, then start to migrate the servers in the cold area to the warm area until the applied power is still less than or equal to the power supply ,during this process:
  • the present invention uses a bipartite graph-based model to calculate the criticality of different microservices.
  • This criticality can mine the "performance-power consumption” heterogeneity of different microservices, and allocate power resources to the criticality first.
  • High microservices can ensure application performance and avoid waste caused by allocating power resources to non-critical microservices; on the other hand, the present invention uses a partitioned method to manage different microservices to ensure that the overall operating power of the application is less than or equal to The power supply and partition management method avoids the huge overhead caused by fine-grained management of a single microservice.
  • Figure 1 is a bipartite graph model used to calculate MFC and the corresponding calculation process of the present invention
  • Figure 2 is a schematic diagram of the invention for differentiated power management
  • FIG. 3 is a block diagram of the system of the present invention.
  • FIGS 4 and 5 are schematic diagrams of embodiments.
  • this embodiment relates to a microservice-oriented power resource allocation system in a data center, including: a microservice level management system, a container level management system, a server level management system, and a ServiceFridge (cooling service) system.
  • a microservice level management system including: a microservice level management system, a container level management system, a server level management system, and a ServiceFridge (cooling service) system.
  • the micro-service level management system includes: a static factor analysis module and a user request collection module.
  • the static factor analysis module obtains the request type associated with each microservice through offline analysis, and the number of calls required to complete each request type , The execution time of each call and the relationship curve between execution time and power supply. This module is realized through more than 1000 repetitions, and the above factors are obtained by calculating the average value; the user request collection module monitors the number of user requests in real time.
  • the container-level management system includes: a dynamic factor sub-module, a bipartite graph dynamic maintenance/update module, an MFC calculation module and a container migration control module, where the dynamic factor analysis module divides user requests through the idea of diversion in graph calculation, Calculate the proportion of the final number of associated user requests for each microservice to the total number of user requests; the dynamic maintenance/update module of the bipartite graph updates the number of edges associated with each vertex (ie microservice) in the graph and the corresponding in-degree;
  • the MFC calculation module uses the nature of the graph to calculate the criticality of each microservice; the microservice criticality division module compares the relationship between the microservice MFC and the benchmark MFC, and divides the microservices to the corresponding criticality level; the container migration control module quickly restarts/ Terminate the container to realize the rapid migration of different microservices between different server areas.
  • the bipartite graph dynamic maintenance/update module analyzes and utilizes the user state change information provided by the user request collection module to update the number of edges associated with each vertex (ie microservice) in the bipartite graph and the corresponding in-degree; at the same time, the module is Each vertex maintains a list of weights. Each value in the list represents the total execution time of a microservice under a power scheme. The execution time is equal to the number of calls multiplied by the execution time of a single call under the corresponding power.
  • the MFC calculation module calculates the MFC under different powers for each microservice according to the in-degree and weight of each vertex (microservice) in the bipartite graph dynamic maintenance/update module, and each microservice contains an MFC sequence. Each value of is equal to the product of the input degree and the total execution time under the power condition.
  • the microservice critical degree division module divides microservices into three critical degree microservices, including critical microservices, uncertain microservices and non-critical microservices.
  • the microservice MFC array is greater than or equal to the benchmark service performance
  • the microservice is classified as a key microservice; on the contrary, when each value in the MFC array is less than the benchmark service performance, it is classified as a non-critical microservice; If the performance of some is greater than or equal to the benchmark service, and some is less than the benchmark microservice, it is classified as an uncertain microservice.
  • the container migration control module performs the migration of microservices in different regions to realize the upgrade or downgrade of microservices, and the specific operations include:
  • the module When a microservice is upgraded from an uncertain microservice to a critical microservice, the module creates a container copy version of the microservice that needs to be upgraded in the cold area, and terminates the container running the microservice in the warm area, thereby realizing the microservice upgrade.
  • the module When a microservice is downgraded from an uncertain microservice to a non-critical microservice, the module creates a container copy version of the microservice that needs to be upgraded in the hot zone, and terminates the container running the microservice in the warm zone, thereby realizing the microservice degradation .
  • the ServiceFridge system includes: a key microservice dynamic correction module, a dynamic server area division module, and a differentiated power allocation module.
  • the key microservice dynamic correction module dynamically corrects the types of microservices in the key area according to the current available power resources.
  • the dynamic server area division module dynamically adjusts the criticality of the service and the number of servers in each area according to the system status.
  • the differentiated power distribution module adjusts the operating power of different server areas according to the system power supply and the current overall operating power of the system.
  • the server-level management system includes: a power facility monitoring module and a server adjustment module.
  • the power facility monitoring module is connected to the power resource infrastructure in the data center and reads the status of the available resources in the data center in real time; the server adjustment module adjusts The dynamic voltage and frequency of the server control the operating power of the server.
  • the said micro-service level management system is further provided with a user request collection module to count user request types and the number of requests of different types to access the application, and directly collect the current system user status;
  • the said micro-service level management system is further provided with a user request collection module to pass the current system user request information to the dynamic factor analysis module, and according to the result calculated by the dynamic factor analysis module,
  • the purpose of the differentiated power allocation module is to adjust the operating power of different regions so that the overall power of the system is less than or equal to the power supply.
  • This module always guarantees that the servers in the cold zone run at the highest frequency, and give priority to reducing the operating power of the servers in the hot zone to reduce the overall power consumption.
  • the running power consumption of the servers in the hot zone is reduced to the lowest value and the goal cannot be achieved, the uncertainty zone is reduced
  • the operating power of the server when the goal is still not achieved, first update the servers in the warm area to the servers in the hot area one by one.
  • the server in the cold area will be migrated to the warm area until the application The power supply is still less than or equal to the power supply.
  • the module When the overall system power is less than or equal to the power supply, the module does not perform any adjustment operations.
  • the server is divided into three different regions, and different regions run microservices of different critical degrees and implement different power management solutions.
  • This example uses the form of system simulation to verify the proposed technology.
  • the four technical solutions in the figure are represented as follows: (a) capping represents the existing use of dynamic voltage and frequency expansion to limit power; (b) ) P-first prioritizes the strategy of limiting the power consumption of high-power microservices for power management; (c) T-first prioritizes the strategy of limiting the power consumption of short-running microservices for power management; (d) ServiceFridge is ours The proposed management strategy of using the criticality to manage the operating power of microservices.
  • the power supply situation in Figure 5 is the same as the load situation, and under the results in Figure 5, all solutions can satisfy that the overall operating power of the application is less than the power supply.
  • the present invention can meet the same application performance as without peak clipping, and can provide better performance than other solutions.

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Marketing (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Educational Administration (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Power Sources (AREA)

Abstract

一种数据中心面向微服务的电力资源分配的方法和系统,基于二分图构建和维护用于指导微服务电力资源分配的模型,并计算每个微服务的关键程度,即微服务在当前状态下,在系统值得电力资源的程度,可以通过微服务在该电力资源分配情况下,是否会对整个应用的服务质量造成影响来衡量;通过检查当前时刻数据中心可用电力资源容量和每个微服务对应的资源分配情况,优先给关键程度高的微服务分配电力资源,从而在保证应用服务质量不变的情况下实现电力资源的优化分配。

Description

数据中心面向微服务的电力资源分配的方法和系统 技术领域
本发明涉及的是一种电力系统智能控制领域的技术,具体是一种数据中心面向微服务的电力资源分配的方法和系统。
背景技术
微服务是一种新兴的软件架构,它把一个大型的单个应用程序和服务拆分为数十个甚至数百个的微形服务组件,通过扩展单个组件而不是整个的应用程序堆栈,从而满足服务等级协议。然而,数据中心电力资源分配方法和系统并不能完全挖掘微服务软件架构带来的节能增效潜力,具体表现为:(1)目前的数据中心功率资源分配忽略了每个微服务异构性;(2)传统云计算环境下的调度算法在微服务环境下会增加数据采集成本和能耗成本。
发明内容
本发明针对现有技术面向微服务存在的上述不足,提出一种数据中心面向微服务的电力资源分配的方法和系统,通过快速地、精准地为不同关键程度的微服务分配对应所需的电力资源,达到保证应用性能不变的情况下,数据中心电力资源利用率最大化,从而实现电力基础设施能够很好地发挥微服务横向扩展的优势。
本发明是通过以下技术方案实现的:
本发明涉及一种数据中心面向微服务的电力资源分配的方法,利用图论中的二分图构建微服务电力资源分配模型,并计算微服务电力资源分配模型中每个微服务的关键程度,即在当前状态下,微服务值得电力资源的程度以及在当前电力资源分配情况下是否会对整个应用的服务质量的影响程度;通过检查当前时刻数据中心可用电力资源容量和每个微服务对应的资源分配情况,对关键程度高的微服务进行电力资源的优先分配,从而实现保证应用服务质量不变的情况下优化电力资源分配。
所述的关键程度(MFC:Microservice Criticality Factor)具体表示一个应用中不同微服务值得分配的电力资源情况以及该微服务在一定电力资源分配下执行后对整个应用的服务质量的影响,该关键程度包括三个静态因素和一个动态因素,其中:静态因素来自微服务自身属性,在微服务执行过程中是常量值;动态因素由用户请求状态变化决定并随用户请求类型以及不同请求比例变化而动态变化。
所述的静态因素包括:单个请求调用微服务的次数、微服务完成当个请求每次调用的计算时间以及每个微服务计算时间和分配的功率之间的关系,即微服务的“性能-功耗”关系。比如 对于微服务i,我们可以定义请求类型n调用微服务i的次数为call_ts n_i,微服务i完成当前类型请求每次调用的计算时间为exec_t n_i,以及微服务i计算时间和分配的功率之间的关系β n_i=<β n_i1,…,β n_ix>,其中x是服务器动态电压和频率调制个数,可以阅读服务器数据手册获取。
在测量过程中,每次测量下单个请求调用统一微服务的次数完全一样,每次试验下的调用的计算时间以及每个微服务的“性能-功耗”关系差别小于1%。因此,通过对多次试验的结果分别求平均计算三个静态因素。
所述的动态因素是指:微服务处理的用户请求的类型以及比例的变化,其反映了微服务在当前用户状况下处理不同种类的请求占总请求的比例。
所述的动态因素可以通过统计每个微服务处理不同类型的用户请求的总数计算得到,为了在不同微服务之间进行对比,优选所有用户请求的数量经归一化到访问应用总请求数量。
所述的微服务电力资源分配模型为动态的二分图模型,二分图中每个顶点表示一个微服务,每条边表示分配给微服务处理的一类用户请求数量,每一条边的权重表示微服务处理对应用户请求所需要的时间开销和代价,每个节点入边的数量(入度)会随着用户请求数量而变化。
所述的每一条边的权重为数列结构,数列中的每一个数值由静态因素决定,反映的是微服务在不同运行功率下完成该请求所需要的总的计算时间,即对于微服务每一条边的权重W n_i等于调用次数和当前功率下所需的计算时间的乘积,即W n_i=call_ts n_i*exec_t n_in_i
所述的顶点的入度由动态因素决定,即所有访问对应微服务的用户请求数量总和,为了在不同微服务之间进行对比,所有请求数量都归一化到访问应用总请求数量。假设整个应用共有M种请求类型,某一时刻存在一个请求列表RES=<res 0,…,res m-1>分别访问m种请求,其中第n种请求类型调用了微服务i,那么顶点(微服务)i的入度
Figure PCTCN2020090958-appb-000001
所述的关键程度,通过将每个顶点连接的所有类型边的数量以及权重乘积之和得到,其反映微服务在对应用户请求下,完成所有请求的所需要的时间之和。例如:当m种请求中一共有N种请求访问了微服务i,那么即对于上述微服务i,其关键程度
Figure PCTCN2020090958-appb-000002
为了比较不同微服务是否是约束应用整体性能的关键服务,根据关键程度和基准服务性能的比值,即利用微服务在不同供电情况下MFC除以基准服务性能,把微服务划分成关键微服务、不确定微服务和非关键微服务。
所述的基准服务性能反映整个应用规定的服务质量,即该应用的响应时间一般不能超过基准服务性能规定的时间,其通过运行一些基准测试访问该应用,然后找到最大响应时间,用最大响应时间表示基准服务性能,或采用一些广泛被认同的标准值,这些标准值往往是由权威组织或者著作规定的,比如《可用性工程》规定交互服务的响应时间不超过100毫秒,即100 毫秒可以作为本方法的基准服务性能。
所述的关键微服务的比值都大于等于1,反映该服务在不同的供电情况下响应时间都长于基准时间,则应该保证该服务的电力资源,否则会影响整个应用的服务质量。
所述的非关键微服务的比值都小于1,表示无论如何改变微服务的电力资源供给条件,微服务的计算时间都小于基准时间,对整个应用的性能没有影响。
所述的不确定微服务的比值一部分大于等于1,另一部分小于1,表示微服务在一定供电范围内,供电变化对微服务的性能没有影响,但是当供电低于某个值,微服务的性能下降并且超过基准性能。
所述的优先分配是指:将数据中心服务器划分成用于运行关键服务的冷区域服务器、用于执行不确定的微服务的暖区域服务器和用于运行非关键服务的热区域服务器,其中:冷区域服务器保证冷服务的电力资源供给,热区域服务器可以被任意降频,暖区域服务器可以根据性能设计被调整为热区域服务器或者冷区域服务器。
所述的优先分配,随着系统状态进行动态调整,即调整服务器数量以及微服务关键程度,具体包括:当应用运行功率大于供电功率且当暖区域服务器频率降到最低时,应用的供电功率仍然大于供电功率,则首先将暖区域的服务器逐一更新为热区域服务器,当应用的供电功率仍然大于供电功率,则开始将冷区域的服务器迁移到暖区域,直到应用的供电功率仍然小于等于供电功率,在此过程中:
①对涉及到的微服务进行相应的降级操作,对涉及到的微服务进行相应的降级操作,即上述暖区域的服务器逐一更新为热区域服务器时,原先暖区域的服务器运行的微服务等级从不确定微服务等级降级到非关键微服务,上述冷区域的服务器迁移到暖区域时,原先冷区域的服务器运行的微服务等级从关键微服务等级降级到不确定微服务等级。
②当应用整体运行功率小于等于供电功率后,需要动态调整微服务关键程度,提升系统整体利用率,具体方式如下:
i)当冷区域的服务器使用率小于50%的时候,则逐一地把暖区域关键程度最高的微服务升级成关键微服务并部署到冷区域运行,直到冷区域服务器的使用率提升到75%~85%。
ii)当暖区域的服务器使用率小于50%的时候,则逐一地把热区域关键程度最高的微服务升级成关键微服务并部署到暖区域运行,直到暖区域服务器的使用率提升到75%~85%。
iii)当应用运行功率小于等于供电功率时,所有微服务运行在满频运行的服务器上,不进行任何操作。
技术效果
与现有技术相比,本发明利用基于二分图的模型来计算不同微服务的关键程度,该关键 程度可以挖掘不同微服务“性能-功耗”异构性,优先将电力资源分配给关键程度高的微服务可以保证应用性能,避免将电力资源分配给非关键微服务造成的浪费;另一方面,本发明采用一种分区的方法对不同的微服务进行管理,保证应用整体运行功率小于等于供电功率,分区的管理方式避免了针对单一微服务进行细粒度管理带来的巨大开销。
附图说明
图1为本发明用于计算MFC的二分图模型以及对应的计算过程;
图2为发明进行差异化电力管理的示意图;
图3为本发明的系统的模块图;
图4、图5为实施例示意图。
具体实施方式
如图3所示,本实施例涉及一种数据中心面向微服务的电力资源分配的系统,包括:微服务层面管理系统、容器层面管理系统、服务器层面管理系统和ServiceFridge(冷却服务)系统。
所述的微服务层面管理系统包括:静态因素分析模块、用户请求采集模块,其中:静态因素分析模块通过线下分析获取每个微服务关联的请求类型,完成每个请求类型所需要的调用次数,每次调用执行时间以及执行时间和供电的关系曲线,该模块通过1000次以上的重复实现,通过计算平均值的方法获取上述几个因素;用户请求采集模块实时监测用户请求数量。
所述的容器层面管理系统包括:动态因素分模块、二分图动态维护/更新模块、MFC计算模块和容器迁移控制模块,其中:动态因素分析模块通过图计算中分流的思想将用户请求进行划分,计算出每个微服务最终的关联的用户请求数量相对总的用户请求数量比例;二分图动态维护/更新模块更新图中每个顶点(即微服务)关联的边的数量以及对应的入度;MFC计算模块利用图的性质计算每个微服务的关键程度;微服务关键程度划分模块通过比较微服务MFC和基准MFC的关系,将微服务划分至相应关键程度等级;容器迁移控制模块快速重启/终止容器实现不同微服务在不同服务器区间的快速迁移。
所述的二分图动态维护/更新模块分析利用用户请求采集模块提供的用户状态变化信息,更新二分图中每个顶点(即微服务)关联的边的数量以及对应的入度;同时该模块为每个顶点维护了一个权值列表,列表的每一个数值表示在一种功率方案下的微服务的总执行时间,该执行时间等于调用次数乘以对应功率下的单次调用执行时间。
所述的MFC计算模块根据二分图动态维护/更新模块中每个顶点(微服务)的入度、权重为每个微服务计算在不同功率下的MFC,每个微服务包含一个MFC数列,数列的每一个值等于入度和该功率情况下总的执行时间的乘积。
所述的微服务关键程度划分模块将微服务划分成三个关键程度等级的微服务,包括关键 微服务、不确定微服务和非关键微服务。当微服务MFC数列中每一个数值都大于等于基准服务性能,那么微服务被划分成关键微服务;反之当MFC数列中每一个数值都小于基准服务性能,则被划分成非关键微服务;对于部分大于等于基准服务性能,部分小于基准微服务的情况,则被划分成不确定微服务。
所述的容器迁移控制模块对微服务在不同区域的迁移,实现微服务的升级或者降级,具体操作包括:
i)当微服务从不确定微服务升级到关键微服务的时候,该模块在冷区域创建需要升级的微服务的容器复制版本,并且终止暖区域运行微服务的容器,从而实现微服务升级。
ii)当微服务从不确定微服务降级到非关键微服务的时候,该模块在热区域创建需要升级的微服务的容器复制版本,并且终止暖区域运行微服务的容器,从而实现微服务降级。
所述的ServiceFridge系统包括:关键微服务动态修正模块、动态服务器区域划分模块、差异化功率分配模块,其中:关键微服务动态修正模块根据当前可用电力资源的情况动态修正关键区域中微服务的种类和数量,动态服务器区域划分模块根据系统状态动态调整服务的关键程度以及每个区域的服务器数量,差异化功率分配模块根据系统供电功率和当前系统整体运行功率,调整不同服务器区域的运行功率。
所述的服务器层面管理系统包括:电力设施监控模块以及服务器调节模块,其中:电力设施监控模块与数据中心中电力资源基础设施相连并实时读取数据中心中可用资源的状态;服务器调节模块通过调整服务器动态电压和频率来控制服务器的运行功率。
所述的微服务层面管理系统中进一步设有用户请求采集模块统计访问应用的用户请求类型和没中类型的请求数量,直接收集了当前系统用户状态;
所述的微服务层面管理系统中进一步设有用户请求采集模块将当前系统用户请求信息传递给动态因素分析模块,根据动态因素分析模块计算出的结果,
所述的数据中心面向微服务的电力资源分配的系统,在整体功率大于供电功率的时候,差异化功率分配模块的目的是调整不同区域的运行功率使得系统整体功率小于或者等于供电功率。该模块始终保证冷区域的服务器运行在最高频率下,优先降低热区域服务器的运行功率来降低整体功耗,当热区域的服务器运行功耗降低到最低值仍不能达到目的,则降不确定区域服务器的运行功率;当仍然不能达到目的,则首先将暖区域的服务器逐一更新为热区域服务器,当应用的供电功率仍然大于供电功率,则开始将冷区域的服务器迁移到暖区域,直到应用的供电功率仍然小于等于供电功率,在此过程中:
①对涉及到的微服务进行相应的降级操作,即上述暖区域的服务器逐一更新为热区域服务器时,原先暖区域的服务器运行的微服务等级从不确定微服务等级降级到非关键微服务,上 述冷区域的服务器迁移到暖区域时,原先冷区域的服务器运行的微服务等级从关键微服务等级降级到不确定微服务等级。
②当应用整体运行功率小于等于供电功率后,需要动态调整微服务关键程度,提升系统整体利用率,具体方式如下:
i)当冷区域的服务器使用率小于50%的时候,则逐一把暖区域关键程度最高的微服务升级成关键微服务并部署到冷区域运行,直到冷区域服务器的使用率提升到75%~85%。
ii)当暖区域的服务器使用率小于50%的时候,则逐一地把热区域关键程度最高的微服务升级成关键微服务并部署到暖区域运行,直到暖区域服务器的使用率提升到75%~85%。
iii)当应用运行功率小于等于供电功率时,所有微服务运行在满频运行的服务器上,不进行任何操作。
当系统整体功率小于等于供电功率的时候,该模块不进行任何调整操作。
本实施例将服务器划分成三个不同的区域,不同区域运行不同关键程度的微服务并且实施不同的电源管理方案。
本实例采用系统仿真的形式验证了所提出的技术,如图5所示,图中4种技术方案分别表示为:(a)capping表示现有的利用动态电压和频率扩展来限制功率;(b)P-first优先限制高功率微服务运行功耗来进行电源管理的策略;(c)T-first优先限制运行时间短的微服务的功耗来进行电源管理的策略;(d)ServiceFridge是我们提出的利用关键程度来管理微服务的运行功率的管理策略。图5供电情况和负载情况相同,并且在图5的结果下,所有方案都能满足应用整体运行功率小于供电功率。如图可见,在相同供电功率条件下,本发明可以满足应用性能和没有削峰的情况一致,相比其他方案,能够提供更好的性能。
上述具体实施可由本领域技术人员在不背离本发明原理和宗旨的前提下以不同的方式对其进行局部调整,本发明的保护范围以权利要求书为准且不由上述具体实施所限,在其范围内的各个实现方案均受本发明之约束。

Claims (12)

  1. 一种数据中心面向微服务的电力资源分配的方法,其特征在于,利用图论中的二分图构建微服务电力资源分配模型,并计算微服务电力资源分配模型中每个微服务的关键程度,即在当前状态下,微服务值得电力资源的程度以及在当前电力资源分配情况下是否会对整个应用的服务质量的影响程度;通过检查当前时刻数据中心可用电力资源容量和每个微服务对应的资源分配情况,对关键程度高的微服务进行电力资源的优先分配,从而实现保证应用服务质量不变的情况下优化电力资源分配;
    所述的关键程度表示一个应用中不同微服务值得分配的电力资源情况以及该微服务在一定电力资源分配下执行后对整个应用的服务质量的影响,该关键程度包括三个静态因素和一个动态因素,静态因素包括:单个请求调用微服务的次数、微服务完成当个请求每次调用的计算时间以及每个微服务计算时间和分配的功率之间的关系;动态因素是指:微服务处理的用户请求的类型以及比例的变化;
    所述的微服务电力资源分配模型为动态的二分图模型,二分图中每个顶点表示一个微服务,每条边表示分配给微服务处理的一类用户请求数量,每一条边的权重表示微服务处理对应用户请求所需要的时间开销和代价,每个节点入边的数量,即入度随着用户请求数量而变化。
  2. 根据权利要求1所述的方法,其特征是,所述的顶点的入度
    Figure PCTCN2020090958-appb-100001
    由动态因素决定,即所有访问对应微服务的用户请求数量总和,其中:M为为整个应用的请求类型,请求列表RES=<res 0,…,res m-1>分别访问m种请求,其中第m种请求类型调用了微服务i。
  3. 根据权利要求1所述的方法,其特征是,所述的关键程度,通过将每个顶点连接的所有类型边的数量以及权重乘积之和得到,其反映微服务在对应用户请求下,完成所有请求的所需要的时间之和;
    所述的关键程度高的微服务是指:通过关键程度和基准服务性能的比值将微服务划分成关键微服务、不确定微服务和非关键微服务。
  4. 根据权利要求1所述的方法,其特征是,所述的优先分配是指:将数据中心服务器划分成用于运行关键服务的冷区域服务器、用于执行不确定的微服务的暖区域服务器和用于运行非关键服务的热区域服务器,其中:冷区域服务器保证冷服务的电力资源供给,热区域服务器可以被任意降频,暖区域服务器可以根据性能设计被调整为热区域服务器或者冷区域服务器。
  5. 根据权利要求1或4所述的方法,其特征是,所述的优先分配,随着系统状态进行动态调整,即调整服务器数量以及微服务关键程度,具体包括:当应用运行功率大于供电功率且当暖区域服务器频率降到最低时,应用的供电功率仍然大于供电功率,则首先将暖区域的服务器逐一更新为热区域服务器,当应用的供电功率仍然大于供电功率,则开始将冷区域的服务器迁移到暖区域,直到应用的供电功率仍然小于等于供电功率,在此过程中:
    ①对涉及到的微服务进行相应的降级操作,对涉及到的微服务进行相应的降级操作,即上述暖区域的服务器逐一更新为热区域服务器时,原先暖区域的服务器运行的微服务等级从不确定微服务等级降级到非关键微服务,上述冷区域的服务器迁移到暖区域时,原先冷区域的服务器运行的微服务等级从关键微服务等级降级到不确定微服务等级;
    ②当应用整体运行功率小于等于供电功率后,需要动态调整微服务关键程度,提升系统整体利用率,具体方式如下:
    i)当冷区域的服务器使用率小于50%的时候,则逐一地把暖区域关键程度最高的微服务升级成关键微服务并部署到冷区域运行,直到冷区域服务器的使用率提升到75%~85%;
    ii)当暖区域的服务器使用率小于50%的时候,则逐一地把热区域关键程度最高的微服务升级成关键微服务并部署到暖区域运行,直到暖区域服务器的使用率提升到75%~85%;
    iii)当应用运行功率小于等于供电功率时,所有微服务运行在满频运行的服务器上,不进行任何操作。
  6. 一种实现上述任一权利要求所述方法的电力资源分配的系统,其特征在于,包括:微服务层面管理系统、容器层面管理系统、服务器层面管理系统和ServiceFridge系统;
    所述的微服务层面管理系统包括:静态因素分析模块、用户请求采集模块,其中:静态因素分析模块通过线下分析获取每个微服务关联的请求类型,完成每个请求类型所需要的调用次数,每次调用执行时间以及执行时间和供电的关系曲线;
    所述的容器层面管理系统包括:动态因素分模块、二分图动态维护/更新模块、MFC计算模块和容器迁移控制模块,其中:动态因素分析模块通过图计算中分流的思想将用户请求进行划分,计算出每个微服务最终的关联的用户请求数量相对总的用户请求数量比例;二分图动态维护/更新模块更新图中每个顶点,即微服务关联的边的数量以及对应的入度;MFC计算模块利用图的性质计算每个微服务的关键程度;微服务关键程度划分模块通过比较微服务MFC和基准MFC的关系,将微服务划分至相应关键程度等级;容器迁移控制模块快速重启/终止容器实现不同微服务在不同服务器区间的快速迁移;
    所述的ServiceFridge系统包括:关键微服务动态修正模块、动态服务器区域划分模块、差异化功率分配模块,其中:关键微服务动态修正模块根据当前可用电力资源的情况动态修正关 键区域中微服务的种类和数量,动态服务器区域划分模块根据系统状态动态调整服务的关键程度以及每个区域的服务器数量,差异化功率分配模块根据系统供电功率和当前系统整体运行功率,调整不同服务器区域的运行功率;
    所述的服务器层面管理系统包括:电力设施监控模块以及服务器调节模块,其中:电力设施监控模块与数据中心中电力资源基础设施相连并实时读取数据中心中可用资源的状态;服务器调节模块通过调整服务器动态电压和频率来控制服务器的运行功率。
  7. 根据权利要求6所述的系统,其特征是,所述的二分图动态维护/更新模块分析利用用户请求采集模块提供的用户状态变化信息,更新二分图中每个顶点关联的边的数量以及对应的入度;同时该模块为每个顶点维护了一个权值列表,列表的每一个数值表示在一种功率方案下的微服务的总执行时间,该执行时间等于调用次数乘以对应功率下的单次调用执行时间。
  8. 根据权利要求6所述的系统,其特征是,所述的MFC计算模块根据二分图动态维护/更新模块中每个顶点的入度、权重为每个微服务计算在不同功率下的MFC,每个微服务包含一个MFC数列,数列的每一个值等于入度和该功率情况下总的执行时间的乘积。
  9. 根据权利要求6所述的系统,其特征是,所述的容器迁移控制模块对微服务在不同区域的迁移,实现微服务的升级或者降级,具体操作包括:
    i)当微服务从不确定微服务升级到关键微服务的时候,该模块在冷区域创建需要升级的微服务的容器复制版本,并且终止暖区域运行微服务的容器,从而实现微服务升级;
    ii)当微服务从不确定微服务降级到非关键微服务的时候,该模块在热区域创建需要升级的微服务的容器复制版本,并且终止暖区域运行微服务的容器,从而实现微服务降级。
  10. 根据权利要求6所述的系统,其特征是,所述的微服务层面管理系统中进一步设有用户请求采集模块统计访问应用的用户请求类型和没中类型的请求数量,直接收集了当前系统用户状态。
  11. 根据权利要求6所述的系统,其特征是,所述的微服务层面管理系统中进一步设有用户请求采集模块将当前系统用户请求信息传递给动态因素分析模块,根据动态因素分析模块计算出的结果。
  12. 根据权利要求6所述的系统,其特征是,所述的差异化功率分配模块在整体功率大于 供电功率时,调整不同区域的运行功率使得系统整体功率小于或者等于供电功率,保证冷区域的服务器运行在最高频率下,优先降低热区域服务器的运行功率来降低整体功耗;当热区域的服务器运行功耗降低到最低值仍不能达到目的,则降不确定区域服务器的运行功率;当仍然不能达到目的,则首先将暖区域的服务器逐一更新为热区域服务器,当应用的供电功率仍然大于供电功率,则开始将冷区域的服务器迁移到暖区域,直到应用的供电功率仍然小于等于供电功率。
PCT/CN2020/090958 2019-07-18 2020-05-19 数据中心面向微服务的电力资源分配的方法和系统 WO2021008225A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910648600.1 2019-07-18
CN201910648600.1A CN112241822B (zh) 2019-07-18 2019-07-18 数据中心面向微服务的电力资源分配的方法和系统

Publications (1)

Publication Number Publication Date
WO2021008225A1 true WO2021008225A1 (zh) 2021-01-21

Family

ID=74167413

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/090958 WO2021008225A1 (zh) 2019-07-18 2020-05-19 数据中心面向微服务的电力资源分配的方法和系统

Country Status (2)

Country Link
CN (1) CN112241822B (zh)
WO (1) WO2021008225A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988398A (zh) * 2021-04-26 2021-06-18 北京邮电大学 一种微服务动态伸缩及迁移方法和装置
CN113452141A (zh) * 2021-06-29 2021-09-28 湖南方心科技股份有限公司 基于物联数据的封闭式集成控制系统
CN113904448A (zh) * 2021-10-26 2022-01-07 珠海康晋电气股份有限公司 一种基于多维监控智能配电运维服务系统
CN114546396A (zh) * 2022-01-10 2022-05-27 东北大学 微服务的动态编排优化方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866614A (zh) * 2022-05-05 2022-08-05 浙江工业大学 基于网络环境和服务器负载的服务自适应弹性调整的方法
CN114895879B (zh) * 2022-07-14 2022-11-04 四川航天信息有限公司 管理系统设计方案确定方法、装置、设备及存储介质
CN117436768A (zh) * 2023-12-19 2024-01-23 湖南三湘银行股份有限公司 一种基于数据治理的统一监管指标方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809539A (zh) * 2014-01-29 2015-07-29 宏碁股份有限公司 数据中心服务器资源的动态规划方法
CN105306597A (zh) * 2015-11-19 2016-02-03 国家电网公司 一种云计算服务质量控制方法
CN109377052A (zh) * 2018-10-24 2019-02-22 南方电网科学研究院有限责任公司 一种电力负荷匹配方法、装置、设备及可读存储介质
CN109583770A (zh) * 2018-11-28 2019-04-05 清华四川能源互联网研究院 车辆调度方法及装置
WO2019109199A1 (en) * 2017-12-04 2019-06-13 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for allocating orders in an online on-demand service

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408207B (zh) * 2018-09-20 2021-10-22 北京小米移动软件有限公司 微服务访问控制方法、装置及存储介质
CN109614092A (zh) * 2018-10-23 2019-04-12 深圳壹账通智能科技有限公司 基于微服务架构的原子服务编排方法及装置、电子设备
CN109408200A (zh) * 2018-11-12 2019-03-01 国网信息通信产业集团有限公司 一种基于资源请求特征的微服务资源管理方法及系统
CN109711879A (zh) * 2018-12-25 2019-05-03 广东电网有限责任公司信息中心 基于微服务架构的电力业务应用智能交互方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809539A (zh) * 2014-01-29 2015-07-29 宏碁股份有限公司 数据中心服务器资源的动态规划方法
CN105306597A (zh) * 2015-11-19 2016-02-03 国家电网公司 一种云计算服务质量控制方法
WO2019109199A1 (en) * 2017-12-04 2019-06-13 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for allocating orders in an online on-demand service
CN109377052A (zh) * 2018-10-24 2019-02-22 南方电网科学研究院有限责任公司 一种电力负荷匹配方法、装置、设备及可读存储介质
CN109583770A (zh) * 2018-11-28 2019-04-05 清华四川能源互联网研究院 车辆调度方法及装置

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988398A (zh) * 2021-04-26 2021-06-18 北京邮电大学 一种微服务动态伸缩及迁移方法和装置
CN112988398B (zh) * 2021-04-26 2022-08-26 北京邮电大学 一种微服务动态伸缩及迁移方法和装置
CN113452141A (zh) * 2021-06-29 2021-09-28 湖南方心科技股份有限公司 基于物联数据的封闭式集成控制系统
CN113452141B (zh) * 2021-06-29 2022-04-08 方心科技股份有限公司 基于物联数据的封闭式集成控制系统
CN113904448A (zh) * 2021-10-26 2022-01-07 珠海康晋电气股份有限公司 一种基于多维监控智能配电运维服务系统
CN113904448B (zh) * 2021-10-26 2023-06-30 珠海康晋电气股份有限公司 一种基于多维监控智能配电运维服务系统
CN114546396A (zh) * 2022-01-10 2022-05-27 东北大学 微服务的动态编排优化方法
CN114546396B (zh) * 2022-01-10 2024-05-28 东北大学 微服务的动态编排优化方法

Also Published As

Publication number Publication date
CN112241822B (zh) 2022-07-12
CN112241822A (zh) 2021-01-19

Similar Documents

Publication Publication Date Title
WO2021008225A1 (zh) 数据中心面向微服务的电力资源分配的方法和系统
EP3507692B1 (en) Resource oversubscription based on utilization patterns in computing systems
Khoshkholghi et al. Energy-efficient algorithms for dynamic virtual machine consolidation in cloud data centers
US9246840B2 (en) Dynamically move heterogeneous cloud resources based on workload analysis
CN107003887B (zh) Cpu超载设置和云计算工作负荷调度机构
US9760429B2 (en) Fractional reserve high availability using cloud command interception
US20150172204A1 (en) Dynamically Change Cloud Environment Configurations Based on Moving Workloads
Alahmadi et al. Enhanced first-fit decreasing algorithm for energy-aware job scheduling in cloud
Deboosere et al. Efficient resource management for virtual desktop cloud computing
US11966792B2 (en) Resource processing method of cloud platform, related device, and storage medium
US8959367B2 (en) Energy based resource allocation across virtualized machines and data centers
Mosa et al. Dynamic virtual machine placement considering CPU and memory resource requirements
US20150169339A1 (en) Determining Horizontal Scaling Pattern for a Workload
Zhou et al. Energy-efficient virtual machine consolidation algorithm in cloud data centers
Sinha et al. Energy efficient dynamic integration of thresholds for migration at cloud data centers
CN106095581B (zh) 一种私有云条件下的网络存储虚拟化调度方法
US9594596B2 (en) Dynamically tuning server placement
Mao et al. Adaptive load balancing algorithm based on prediction model in cloud computing
CN109597674B (zh) 一种共享虚拟资源池份额调度方法及系统
US11513856B2 (en) Method, devices and computer program products for resource usage
CN111104203B (zh) 虚拟机分散调度方法、装置以及电子设备、存储介质
Thiam et al. An energy-efficient VM migrations optimization in cloud data centers
Xue et al. Communication-aware virtual machine migration in cloud data centres
US9367439B2 (en) Physical memory usage prediction
US20240004693A1 (en) Batch workload control based on capacity consumption

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20840242

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20840242

Country of ref document: EP

Kind code of ref document: A1