CN115543450B - Method for dynamically dormancy of server-free calculation of resource optimization in edge scene and application - Google Patents

Method for dynamically dormancy of server-free calculation of resource optimization in edge scene and application Download PDF

Info

Publication number
CN115543450B
CN115543450B CN202211141803.XA CN202211141803A CN115543450B CN 115543450 B CN115543450 B CN 115543450B CN 202211141803 A CN202211141803 A CN 202211141803A CN 115543450 B CN115543450 B CN 115543450B
Authority
CN
China
Prior art keywords
time
cold start
updated
dormancy
edge
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.)
Active
Application number
CN202211141803.XA
Other languages
Chinese (zh)
Other versions
CN115543450A (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.)
State Grid Jiangsu Electric Power Co Ltd
Information and Telecommunication Branch of State Grid Jiangsu Electric Power Co Ltd
Original Assignee
State Grid Jiangsu Electric Power Co Ltd
Information and Telecommunication Branch of State Grid Jiangsu Electric Power Co Ltd
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 State Grid Jiangsu Electric Power Co Ltd, Information and Telecommunication Branch of State Grid Jiangsu Electric Power Co Ltd filed Critical State Grid Jiangsu Electric Power Co Ltd
Priority to CN202211141803.XA priority Critical patent/CN115543450B/en
Publication of CN115543450A publication Critical patent/CN115543450A/en
Application granted granted Critical
Publication of CN115543450B publication Critical patent/CN115543450B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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 Security & Cryptography (AREA)
  • Mathematical Physics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a server-free computing dynamic dormancy method for resource optimization in an edge scene and application thereof, wherein the method comprises the following steps: running the system based on keep-alive time, cold start rate and dormancy time before updating different function service examples in the edge system so as to update the Pareto distribution curve; determining an updated cold start rate based on the updated Pareto profile; determining updated sleep time based on time intervals at which different function service instances receive requests; calculating updated keep-alive time based on the updated sleep time and cold start rate; and judging whether the error between the cold start rates before and after updating is within a preset error range so as to determine whether to update the configuration of the edge system. According to the method, the dormant time is dynamically adjusted according to the time intervals of receiving requests of different function service instances in the edge system, so that different types of service requests can be met, the starting time delay of the function service instances is reduced, the request execution efficiency is improved, and the resource consumption of the edge system is reduced.

Description

Method for dynamically dormancy of server-free calculation of resource optimization in edge scene and application
Technical Field
The invention relates to the technical field of cloud computing, in particular to a server-free computing dynamic dormancy method for resource optimization in an edge scene and application thereof.
Background
With the development of cloud computing technology, many new architecture and operation and maintenance technologies such as virtual machines, containers, and micro services are emerging, which also makes micro service architecture more popular. Nevertheless, these recent technological advances do not bridge the huge resource consumption of cloud computing in edge scenarios and the lack of pay-per-view and flexible scaling until no server computing comes.
The out-of-service computing simplifies cloud computing application deployment and improves computing cost performance, with the overhead of creating/terminating copies being very small relative to mature virtual machines. In a server-less computing system in an edge scenario, there may be a large difference in execution frequency of different tasks, and some function instances may be in an idle state for a long time, so that the number of function instances needs to be reduced to save resource consumption. However, the next arrival request time of the function is often unpredictable, and how to properly recover resources when the instance is empty, and to generate a low time delay for the function instance to meet the request in advance before the next request comes becomes a difficult problem to be solved.
At present, the cold start problem of no-server computing in the edge scene is still in a starting stage, and industrial no-server computing cloud service providers use a Chrome V8 engine to save the restart time of an application program, but technical experts familiar with the arrangement are required to manage the performance delay, so that the technical requirements of management personnel are high. In academia, some researchers put forward a timing dormancy strategy aiming at the cold start problem, and a fixed function instance dormancy strategy is formulated, so that the functions of all types are globally unified, namely, all function instances destroy instance recovery resources if a request system is not received for a fixed period of time, and function service instance generation is driven when the next request arrives.
In the prior art, characteristics of different function service types of an edge scene are not considered, request arrival time intervals of different services are different, the overall unified function instance dormancy time and keep-alive time are not suitable for all types, too short dormancy time can cause frequent cold start of some function instances, too long keep-alive time can cause some function instances to be idle for a long time after the task is executed, resources are wasted, and too long dormancy time or too short keep-alive time can cause some function instances to be dormant for a long time or the request execution efficiency is low, and user request quality is affected.
Disclosure of Invention
The invention aims to provide a server-free computing dynamic dormancy method for resource optimization in an edge scene and application thereof, which are used for solving the technical problems that in the prior art scheme of the edge scene, the dormancy time and the keep-alive time of a globally unified function instance cannot be adapted to different types of function services, so that different function service instances can have frequent cold start, low request execution efficiency and the like, and the request quality of a user is influenced.
To achieve the above object, an embodiment of the present invention provides a method for dynamic dormancy of server-free computing for resource optimization in an edge scenario, the method comprising:
running the system based on keep-alive time, cold start rate and dormancy time before updating different function service examples in the edge system to update the Pareto distribution curve;
determining the updated cold start rate based on the updated Pareto distribution curve;
determining the updated dormancy time based on the time intervals of receiving requests by different function service instances in the edge system;
calculating the updated keep-alive time based on the updated sleep time and cold start rate;
and judging whether the error between the cold start rates before and after updating is within a preset error range so as to determine whether to update the configuration of the edge system.
In one or more embodiments of the invention, the method further comprises:
and during initial operation, acquiring keep-alive time and cold start rate before updating different function service instances in the edge system based on the Pareto distribution curve before updating so as to determine sleep time before updating the different function service instances.
In one or more embodiments of the present invention, the acquiring, based on the Pareto distribution curve before updating, keep-alive time and cold start rate before updating different function service instances in the edge system to determine sleep time before updating different function service instances specifically includes:
acquiring the keep-alive time and the cold start rate before updating different function service instances in an edge system based on the relative optimal point of the Pareto distribution curve before updating;
and calculating the dormancy time before updating the different function service examples based on the keep-alive time before updating and the cold start rate.
In one or more embodiments of the present invention, the determining the updated sleep time based on the time interval between receiving requests by different function service instances in the edge system specifically includes:
counting the time interval distribution of the receiving requests of different function service examples in the edge system in a preset time period by using a statistical histogram;
and when the time interval distribution accords with a typical distribution rule, determining the updated sleep time by taking a minimum time interval as a boundary point.
In one or more embodiments of the present invention, the determining the updated sleep time based on the time interval of the request received by the different function service instances in the edge system specifically further includes:
and when the time interval distribution of the different function service instances in the edge system for receiving the request in the preset time period does not accord with the typical distribution rule, updating the dormant time to zero.
In one or more embodiments of the present invention, the configuration of the edge system includes the keep-alive time, the cold start rate, and the sleep time, and the determining whether the error between the cold start rates before and after the update is within a preset error range, to determine whether to update the configuration of the edge system specifically includes:
and when the error between the cold start rates before and after updating is within a preset error range, controlling the edge system to operate at the keep-alive time and the sleep time before updating.
In one or more embodiments of the present invention, the determining whether the error between the cold start rates before and after the update is within a preset error range to determine whether to update the edge system configuration specifically further includes:
and when the error between the cold start rates before and after updating is not in a preset error range, controlling the edge system to operate with the updated keep-alive time and the updated dormancy time.
In another aspect of the present invention, there is also provided a server-less computing dynamic dormancy adjustment device for edge-oriented scene resource optimization, the device comprising:
the updating module is used for running the system based on the keep-alive time, the cold start rate and the dormancy time before updating different function service examples in the edge system so as to update the Pareto distribution curve;
the first determining module is used for determining the updated cold start rate based on the updated Pareto distribution curve;
the second determining module is used for determining the updated dormancy time based on the time interval of receiving the request by different function service examples in the edge system;
the calculating module is used for calculating the updated keep-alive time based on the updated sleep time and the updated cold start rate;
and the judging module is used for judging whether the error between the cold start rates before and after updating is in a preset error range so as to determine whether to update the configuration of the edge system.
The update module is further configured to: and during initial operation, acquiring keep-alive time and cold start rate before updating different function service instances in the edge system based on the Pareto distribution curve before updating so as to determine sleep time before updating the different function service instances.
The update module is further configured to: acquiring the keep-alive time and the cold start rate before updating different function service instances in an edge system based on the relative optimal point of the Pareto distribution curve before updating;
and calculating the dormancy time before updating the different function service examples based on the keep-alive time before updating and the cold start rate.
The second determining module is further configured to: counting the time interval distribution of the receiving requests of different function service examples in the edge system in a preset time period by using a statistical histogram;
and when the time interval distribution accords with a typical distribution rule, determining the updated sleep time by taking a minimum time interval as a boundary point.
The second determining module is further configured to: and when the time interval distribution of the different function service instances in the edge system for receiving the request in the preset time period does not accord with the typical distribution rule, updating the dormant time to zero.
The judging module is further used for: and when the error between the cold start rates before and after updating is within a preset error range, controlling the edge system to operate at the keep-alive time and the sleep time before updating.
The judging module is further used for: and when the error between the cold start rates before and after updating is not in a preset error range, controlling the edge system to operate with the updated keep-alive time and the updated dormancy time.
In another aspect of the present invention, there is also provided an electronic apparatus including:
at least one processor; and
a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform a server-less computational dynamic hibernation method of resource optimization in an edge scenario as described above.
In another aspect of the present invention, there is also provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a server-less computational dynamic dormancy method of resource optimization in an edge scenario as described above.
Compared with the prior art, the method and the application for calculating the dynamic dormancy of the resource optimization server-free in the edge scene in the embodiment of the invention dynamically adjust the dormancy time of the function service instance according to the time interval of receiving the request of different function service instances in the edge system, realize that the dormancy time and the keep-alive time meet different types of service requests, reduce the starting time delay of the function service instance and improve the request execution efficiency; the method can give out proper cold start rate to intelligent tasks with different real-time requirements, reduce the dead time of computing resources in each service, improve the utilization rate of system resources, and further improve the benefit of the system resources.
Drawings
FIG. 1 is a flow chart of a method of dynamic dormancy of server-less computing for resource optimization in an edge scenario, according to an embodiment of the invention;
FIG. 2 is a functional architecture diagram of a server-less computing dynamic dormancy method for resource optimization in an edge scenario according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a Pareto distribution curve of a server-less computational dynamic dormancy method for resource optimization in an edge scene according to an embodiment of the present invention;
FIG. 4 is a histogram of request time intervals for different function service instances of a resource optimized serverless computing dynamic dormancy method in an edge scene according to an embodiment of the present invention;
FIG. 5 is a graph of keep-alive time versus sleep time for a resource-optimized server-less computing dynamic sleep method in an edge scenario according to an embodiment of the invention;
FIG. 6 is a sleep time calculation flow diagram of a method for dynamic sleep of server-less computing for resource optimization in an edge scenario according to an embodiment of the present invention;
FIG. 7 is a dynamic dormancy strategy flowchart of a method for dynamic dormancy of server-less computing for resource optimization in an edge scenario, according to an embodiment of the invention;
FIG. 8 is a schematic diagram of the architecture of a server-less computing dynamic dormancy adjustment device for edge-oriented scene resource optimization according to an embodiment of the invention;
FIG. 9 is a hardware architecture diagram of an electronic device for edge-oriented scene resource optimization with server-less computing dynamic sleep adjustment in accordance with an embodiment of the invention.
Detailed Description
The following detailed description of embodiments of the invention is, therefore, to be taken in conjunction with the accompanying drawings, and it is to be understood that the scope of the invention is not limited to the specific embodiments.
Throughout the specification and claims, unless explicitly stated otherwise, the term "comprise" or variations thereof such as "comprises" or "comprising", etc. will be understood to include the stated element or component without excluding other elements or components.
The essence of serverless computing is to host server ownership to cloud vendors, allocating resources on demand. Serverless computing can automatically allocate each user's required resources, describing a fine-grained deployment model, where application services consisting of one or more functions can be uploaded to the platform, run, scale and bill based on actual run-time resource consumption. The computing resources can be required, flexible supported, operation and maintenance simplified, etc. as required. By server-less calculation, the charging of the edge scene is driven by the events that are actually triggered, i.e. the allocated resources and the number of times the function is triggered, the cost of using the resources can be greatly reduced.
An important technology for achieving high throughput in server-free computing is a function service instance, wherein the function instance which remains active remains in the running environment after one generation and waits for the next trigger event. However, if the function instance is in an idle state for a period of time, the system will automatically release the generated function instance, and when a new trigger event arrives, to regenerate the function instance, the function instance needs to be loaded, such steps as initializing the function environment, downloading the function, and the like, and a certain time is required to be consumed, and this time is called cold start time.
Referring to fig. 2, the present invention proposes a service dynamic dormancy policy for the cold start problem in a serverless edge computing scenario. The strategy for service dynamic dormancy is to find the relative optimal point of system resource utilization and cold start frequency, and specify the dormancy time and keep-alive time of the function instance. The sleep time represents the time that the function service instance does not occupy the resources after the resources are recovered, and the keep-alive time represents the time that the function service instance does not recover and waits for the next request to come. The sleep time is used for reducing the idle resource consumption of the function service instance, the keep-alive time is used for reducing the cold start frequency as much as possible, the cold start time linearly increases relative to functions and dependence of different scales, resources are recovered by a standing horse after the function service instance is executed, and the cold start time is introduced, so that the total completion time of the application is greatly influenced, and therefore, the cold start frequency is reduced as much as possible.
According to the method, the sleep time and the keep-alive time of the function service instance are taken as the cut-in points, the server-free calculation dynamic sleep strategy oriented to the edge scene resource optimization is researched, and the dynamic sleep strategy logic is abstracted into two parts. The first part coordinates the cold start rate and the edge system resource utilization rate through a Pareto curve, and the second part calculates the function instance dormancy time and the keep-alive time in the edge system environment according to the cold start rate, and the parts are mutually connected. On the basis of ensuring the effectiveness of the application service, the resource benefit of the edge system and the service experience of the user are improved as much as possible.
As shown in FIG. 1, an embodiment of a method for dynamic dormancy of server-less computing for resource optimization in an edge scenario of the present invention is described. In this embodiment, the method includes the following steps.
S101, running the system based on keep-alive time, cold start rate and dormancy time before updating different function service examples in the edge system to update the Pareto distribution curve.
In this embodiment, the keep-alive time, the cold start rate, and the sleep time are all environmental configuration parameters of the edge system, where the cold start rate changes with the operation of the system. In the normal operation process of the edge system, a sample point of a certain cold start rate of a certain keep-alive time is increased, and the Pareto distribution curve is changed along with the increase of the sample point, so that the edge system is updated.
The Pareto distribution is a power law probability distribution that describes the observable phenomenon. The system cold start rate and the resource utilization rate can be obtained from the previous system operation record to draw a Pareto distribution curve, as shown in fig. 3, the horizontal axis of the Pareto distribution curve represents the occurrence frequency C of cold start, the vertical axis of the Pareto distribution curve represents the resource utilization rate U, and the connected curves represent Pareto curves in which each fixed keep-alive time s does not introduce sleep time.
The system benefit P is defined as:
P=α 1 U s2 C s1 >0,α 2 >0)
wherein alpha is 1 And alpha 2 Resource utilization benefits and cold start occurrence costs, respectively.
The resource utilization benefits and cold start occurrence costs are also different for tasks of different characteristics. For example, for real-time tasks of an edge system, the sensitivity to time is relatively high, where α 1 Less than average resource benefit, alpha 2 More costly than average cold starts. Alpha for a particular service 1 、α 2 The settings may be obtained by historical data calculations.
S102, determining the updated cold start rate based on the updated Pareto distribution curve.
In this embodiment, the updated cold start rate may be determined based on the relative optimal point (most efficient point) of the updated Pareto profile.
Referring to fig. 3, two indexes of the system resource utilization rate and the cold start frequency cannot be obtained, the simple method for reducing the cold start frequency is to continuously improve the keep-alive time and reduce the sleep time, but the resource utilization rate is reduced; the simple way to increase the resource utilization is to increase the sleep time or to directly recycle the instance after processing the request, but the cold start frequency will increase.
Therefore, the edge system resource utilization and the cold start rate are coordinated by introducing a Pareto distribution curve in the present embodiment. Finding out the relatively optimal benefit Max (P) of the system from the Pareto distribution curve, and obtaining the balance point with the maximum benefit of the system resource, wherein the cold start rate corresponding to the balance point is the optimal cold start rate of the system at the moment.
S103, determining the updated dormancy time based on the time interval of receiving the request by different function service examples in the edge system.
During normal operation of the edge system, the sleep time can be dynamically adjusted according to the time interval distribution of the requests received by different function service instances in the edge system. I.e. the service request arrival time intervals for different applications may be different. Statistically, about 45% of service request time intervals are above 1 hour, 81% of service request time intervals are within 1 hour and above 1 minute. Based on this, at least one sliding window representing a time period may be set to count the time interval distribution of the requests received by each function service instance during the time period.
In this embodiment, the statistics histogram is used to count the time interval distribution of the service instances of different functions in the edge system for receiving the requests in the preset time period, the statistics result is shown in fig. 4, the vertical axis represents the occurrence frequency of the service request time interval of each application, and the horizontal axis represents the service request time interval of each application.
Referring to fig. 6, since service request arrival time intervals of different applications may be different, the case of service request time intervals of different applications should be treated differently. In this embodiment, the service dynamic dormancy policy of the function service instance is set according to the service request arrival time intervals of different applications. The service dynamic dormancy strategy mainly finds the relative optimal point of the edge system resource utilization rate and the cold start frequency, and specifies the dormancy time of the function service instance.
Specifically, when the degree of dispersion of the service request time interval of the application is large, the request time interval received by the function service instance is shown to be statistically stable, the distribution of the request time interval accords with a typical distribution rule, and the updated sleep time can be set by taking the minimum request time interval as a boundary point. When the degree of dispersion of the service request time interval is smaller, that is, the occurrence frequency of the request time interval received by each function service instance is not great, or the request time interval captured in the sliding window arrives unstably, the distribution of the request time interval does not accord with the typical distribution rule, in this case, the sleep time is set to zero, the corresponding function service instance is always in a keep-alive state, and the service request is always operated in a hot start mode.
In special cases, if there are very few service request time intervals too sparse to capture in the sliding window, the cost of cold start is less than the loss of no load of computing resources, i.e. the sleep time is not set, the function service instance is destroyed after executing the service request, and the resources are recovered, and the function service instance is driven to generate when the next service request arrives.
S104, calculating the updated keep-alive time based on the updated sleep time and the cold start rate.
Referring to fig. 5, the keep-alive time of a function service instance includes a task execution time e, which is the effective working time of the function service instance computing resource for a certain application service, and a dead time k, which is the time taken for the function service instance to survive without executing a task. Dead time occupies computing resources and as dead time increases, edge system resource utilization is reduced. The relationship between task execution time e, dead time k, and keep-alive time s is: e=s-k.
Keep-alive time s, cold startThe relation between the dynamic rate C and the sleep time u is:wherein alpha is 3 Is a parameter, and alpha 3 >0。
When the edge system operates normally, the sleep time u can be set according to the time interval distribution of the receiving requests of different function service instances in the edge system; the cold start rate C can be obtained from the Pareto distribution curve, and therefore the keep-alive time s can be calculated from the above-described relational expression.
In one embodiment of the invention, at the initial operation, the edge system acquires the keep-alive time and the cold start rate before the update of different function service instances in the edge system based on the Pareto distribution curve before the update so as to determine the dormancy time before the update of the different function service instances.
That is, when the edge system is initially running, the pre-update (or initial) dormancy time of the function service instance is calculated according to the pre-update (or initial) keep-alive time and the cold start rate, and the pre-update (or initial) keep-alive time and the cold start rate can be obtained according to the relative optimal point of the pre-update (or initial) Pareto distribution curve.
S105, judging whether the error between the cold start rates before and after updating is within a preset error range, so as to determine whether to update the configuration of the edge system.
Assuming that the preset error range is [ a, b ], wherein 0 < b < a, when the error between the cold start rate before and after updating is within the preset error range [ a, b ], the control system continues to operate with the keep-alive time, the cold start rate and the sleep time before (or initially) updating, i.e. the configuration of the system is not updated. When the error between the cold start rates before and after updating is not in the preset error range [ a, b ], the control system operates with the updated keep-alive time, cold start rate and sleep time, namely, the updated keep-alive time, cold start rate and sleep time are given to the system to operate as new environment configuration parameters.
Referring to fig. 7, fig. 7 illustrates a dynamic dormancy policy flow for the server-less calculation of edge-oriented scene resource optimization. When the edge system is in initial operation, firstly sampling from the execution history of the edge system, drawing a Pareto distribution curve before update (or initial), acquiring the keep-alive time and the cold start rate before update (or initial) based on the Pareto distribution curve, and then calculating the sleep time before update (or initial) according to the keep-alive time and the cold start rate. The edge system then runs with the pre-update (or initial) sleep time and keep-alive time as the sleep time and keep-alive time of the corresponding function service instance for a preset time period (sliding window).
The edge system is subjected to sampling accumulation for a period of time to obtain a new Pareto distribution curve, so that a new cold start rate, namely an updated cold start rate, is obtained. And meanwhile, the edge system sets a new sleep time, namely the updated sleep time, according to the time interval of the different function service instances for receiving the request in the time period. And calculating the updated keep-alive time according to the updated cold start rate and the updated sleep time.
Comparing the updated cold start rate with the cold start rate before update (or initial), judging whether the errors of the updated cold start rate and the cold start rate are within a preset error range [ a, b ], and if so, operating the edge system still with the sleep time before update (or initial) and the keep-alive time; if not, the updated sleep time and keep-alive time are given to the edge system operation.
The edge system is operated iteratively according to the rules. When the edge system runs to the Nth time, the corresponding dormancy time before updating is u i Cold start rate C i Keep-alive time s i Wherein i is more than or equal to 0 and less than or equal to n-1, and the corresponding updated dormancy time is u n Cold start rate C n Keep-alive time s n If the cold start rate C of the N-1 th update i And the cold start rate C of the nth update n The error between them is not within the preset error range [ a, b ]]In, the sleep time u of the Nth update is updated n And keep-alive time s n And (5) giving operation to the edge system.
Referring to fig. 8, a server-less computing dynamic dormancy adjustment device for edge-oriented scene resource optimization according to an embodiment of the present invention is described.
In an embodiment of the present invention, the server-less computing dynamic dormancy adjustment device for edge scene resource optimization includes an update module 201, a first determination module 202, a second determination module 203, a computation module 204, and a judgment module 205.
An updating module 201, configured to operate the system based on keep-alive time, cold start rate and sleep time before updating different function service instances in the edge system, so as to update the Pareto distribution curve;
a first determining module 202, configured to determine the updated cold start rate based on the updated Pareto distribution curve;
a second determining module 203, configured to determine the updated sleep time based on time intervals at which different function service instances in the edge system receive the request;
a calculating module 204, configured to calculate the updated keep-alive time based on the updated sleep time and cold start rate;
and the judging module 205 is configured to judge whether an error between the cold start rates before and after updating is within a preset error range, so as to determine whether to update the configuration of the edge system.
The update module 201 is further configured to: and during initial operation, acquiring keep-alive time and cold start rate before updating different function service instances in the edge system based on the Pareto distribution curve before updating so as to determine sleep time before updating the different function service instances.
The update module 201 is further configured to: acquiring the keep-alive time and the cold start rate before updating different function service instances in an edge system based on the relative optimal point of the Pareto distribution curve before updating;
and calculating the dormancy time before updating the different function service examples based on the keep-alive time before updating and the cold start rate.
The second determining module 203 is further configured to: counting the time interval distribution of the receiving requests of different function service examples in the edge system in a preset time period by using a statistical histogram;
and when the time interval distribution accords with a typical distribution rule, determining the updated sleep time by taking a minimum time interval as a boundary point.
The second determining module 203 is further configured to: and when the time interval distribution of the different function service instances in the edge system for receiving the request in the preset time period does not accord with the typical distribution rule, updating the dormant time to zero.
The judging module 205 is further configured to: and when the error between the cold start rates before and after updating is within a preset error range, controlling the edge system to operate at the keep-alive time and the sleep time before updating.
The judging module 205 is further configured to: and when the error between the cold start rates before and after updating is not in a preset error range, controlling the edge system to operate with the updated keep-alive time and the updated dormancy time.
Fig. 9 shows a hardware block diagram of an electronic device 30 for serverless computing dynamic sleep adjustment for edge-oriented scene resource optimization according to an embodiment of the present disclosure. As shown in fig. 9, the electronic device 30 may include at least one processor 301, a memory 302 (e.g., a non-volatile memory), a memory 303, and a communication interface 304, and the at least one processor 301, the memory 302, the memory 303, and the communication interface 304 are connected together via a bus 305. The at least one processor 301 executes at least one computer readable instruction stored or encoded in memory 302.
It should be appreciated that the computer-executable instructions stored in memory 302, when executed, cause at least one processor 301 to perform the various operations and functions described above in connection with fig. 1-7 in various embodiments of the present specification.
In embodiments of the present description, electronic device 30 may include, but is not limited to: personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile computing devices, smart phones, tablet computers, cellular phones, personal Digital Assistants (PDAs), handsets, messaging devices, wearable computing devices, consumer electronic devices, and the like.
According to one embodiment, a program product, such as a computer readable storage medium, is provided. The computer-readable storage medium may have instructions (i.e., the elements described above implemented in software) that, when executed by a computer, cause the computer to perform the various operations and functions described above in connection with fig. 1-7 in various embodiments of the present specification. In particular, a system or apparatus provided with a readable storage medium having stored thereon software program code implementing the functions of any of the above embodiments may be provided, and a computer or processor of the system or apparatus may be caused to read out and execute instructions stored in the readable storage medium.
According to the server-free computing dynamic dormancy method and the application of resource optimization in the edge scene, the dormancy time of the function service instance is dynamically adjusted according to the time interval of the request receiving of different function service instances in the edge system, so that the dormancy time and the keep-alive time meet different types of service requests, the starting time delay of the function service instance is reduced, and the request execution efficiency is improved; the method can give out proper cold start rate to intelligent tasks with different real-time requirements in the edge scene, reduce the dead time of computing resources in each service, improve the utilization rate of system resources and further improve the benefit of the system resources.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing descriptions of specific exemplary embodiments of the present invention are presented for purposes of illustration and description. It is not intended to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application to thereby enable one skilled in the art to make and utilize the invention in various exemplary embodiments and with various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims and their equivalents.

Claims (10)

1. A method for dynamic dormancy of server-less computing for resource optimization in an edge scenario, the method comprising:
running the system based on keep-alive time, cold start rate and dormancy time before updating different function service examples in the edge system to update the Pareto distribution curve;
determining the updated cold start rate based on the updated Pareto distribution curve;
determining the updated dormancy time based on the time intervals of receiving requests by different function service instances in the edge system;
calculating the updated keep-alive time based on the updated sleep time and cold start rate;
wherein, the relation among the keep-alive time s, the cold start rate C and the dormant time u is as follows:wherein alpha is 3 Is a parameter, and alpha 3 >0;
And judging whether the error between the cold start rates before and after updating is within a preset error range so as to determine whether to update the configuration of the edge system.
2. The server-less computing dynamic dormancy method of resource optimization in an edge scene of claim 1, wherein said method further comprises:
and during initial operation, acquiring keep-alive time and cold start rate before updating different function service instances in the edge system based on the Pareto distribution curve before updating so as to determine sleep time before updating the different function service instances.
3. The method for dynamically dormancy calculation without server for resource optimization in an edge scene according to claim 2, wherein the step of obtaining the keep-alive time and the cold start rate before updating different function service instances in the edge system based on the Pareto distribution curve before updating to determine the dormancy time before updating the different function service instances specifically comprises the steps of:
acquiring the keep-alive time and the cold start rate before updating different function service instances in an edge system based on the relative optimal point of the Pareto distribution curve before updating;
and calculating the dormancy time before updating the different function service examples based on the keep-alive time before updating and the cold start rate.
4. The method for dynamic dormancy calculation without server for resource optimization in an edge scene according to claim 1, wherein said determining the updated dormancy time based on the time interval of the request received by the different function service instances in the edge system comprises:
counting the time interval distribution of the receiving requests of different function service examples in the edge system in a preset time period by using a statistical histogram;
and when the time interval distribution accords with a typical distribution rule, determining the updated sleep time by taking a minimum time interval as a boundary point.
5. The method for dynamic dormancy calculation without server for resource optimization in an edge scene according to claim 4, wherein said determining the updated dormancy time based on the time interval of the request received by the different function service instances in the edge system further comprises:
and when the time interval distribution of the different function service instances in the edge system for receiving the request in the preset time period does not accord with the typical distribution rule, updating the dormant time to zero.
6. The method for dynamic dormancy calculation without server for resource optimization in an edge scene according to claim 1, wherein the configuration of the edge system includes the keep-alive time, the cold start rate and the dormancy time, and the determining whether the error between the cold start rates before and after the update is within a preset error range to determine whether to update the configuration of the edge system specifically includes:
and when the error between the cold start rates before and after updating is within a preset error range, controlling the edge system to operate at the keep-alive time and the sleep time before updating.
7. The method for dynamic dormancy calculation without server for resource optimization in an edge scene according to claim 1, wherein said determining whether an error between said cold start rates before and after update is within a preset error range to determine whether to update a configuration of said edge system further comprises:
and when the error between the cold start rates before and after updating is not in a preset error range, controlling the edge system to operate with the updated keep-alive time and the updated dormancy time.
8. A server-less computing dynamic dormancy method apparatus for resource optimization in an edge scene, the apparatus comprising:
the updating module is used for running the system based on the keep-alive time, the cold start rate and the dormancy time before updating different function service examples in the edge system so as to update the Pareto distribution curve;
the first determining module is used for determining the updated cold start rate based on the updated Pareto distribution curve;
the second determining module is used for determining the updated dormancy time based on the time interval of receiving the request by different function service examples in the edge system;
the calculating module is used for calculating the updated keep-alive time based on the updated sleep time and the updated cold start rate; wherein, the relation among the keep-alive time s, the cold start rate C and the dormant time u is as follows:wherein alpha is 3 Is a parameter, and alpha 3 >0;
And the judging module is used for judging whether the error between the cold start rates before and after updating is in a preset error range so as to determine whether to update the configuration of the edge system.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the server-less computational dynamic dormancy method of resource optimization in an edge scene of any one of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements a server-less computational dynamic dormancy method of resource optimisation in an edge scenario according to any one of claims 1 to 7.
CN202211141803.XA 2022-09-20 2022-09-20 Method for dynamically dormancy of server-free calculation of resource optimization in edge scene and application Active CN115543450B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211141803.XA CN115543450B (en) 2022-09-20 2022-09-20 Method for dynamically dormancy of server-free calculation of resource optimization in edge scene and application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211141803.XA CN115543450B (en) 2022-09-20 2022-09-20 Method for dynamically dormancy of server-free calculation of resource optimization in edge scene and application

Publications (2)

Publication Number Publication Date
CN115543450A CN115543450A (en) 2022-12-30
CN115543450B true CN115543450B (en) 2024-02-23

Family

ID=84727847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211141803.XA Active CN115543450B (en) 2022-09-20 2022-09-20 Method for dynamically dormancy of server-free calculation of resource optimization in edge scene and application

Country Status (1)

Country Link
CN (1) CN115543450B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020263374A1 (en) * 2019-06-27 2020-12-30 Intel Corporation Automated resource management for distributed computing
CN112188143A (en) * 2020-09-14 2021-01-05 浙江华创视讯科技有限公司 Method and device for releasing resources
CN113176947A (en) * 2021-05-08 2021-07-27 武汉理工大学 Dynamic task placement method based on delay and cost balance in serverless computing
US11163603B1 (en) * 2020-07-06 2021-11-02 International Business Machines Corporation Managing asynchronous operations in cloud computing environments
CN113721751A (en) * 2021-08-11 2021-11-30 威胜信息技术股份有限公司 Low-power-consumption management method and system based on event and dormancy timer

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020263374A1 (en) * 2019-06-27 2020-12-30 Intel Corporation Automated resource management for distributed computing
CN113795826A (en) * 2019-06-27 2021-12-14 英特尔公司 Automated resource management for distributed computing
US11163603B1 (en) * 2020-07-06 2021-11-02 International Business Machines Corporation Managing asynchronous operations in cloud computing environments
CN112188143A (en) * 2020-09-14 2021-01-05 浙江华创视讯科技有限公司 Method and device for releasing resources
CN113176947A (en) * 2021-05-08 2021-07-27 武汉理工大学 Dynamic task placement method based on delay and cost balance in serverless computing
CN113721751A (en) * 2021-08-11 2021-11-30 威胜信息技术股份有限公司 Low-power-consumption management method and system based on event and dormancy timer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种面向多物联代理在线应用的弹性资源调度算法;缪巍巍 等;重庆理工大学学报;第36卷(第2期);第151-160页 *

Also Published As

Publication number Publication date
CN115543450A (en) 2022-12-30

Similar Documents

Publication Publication Date Title
WO2021233261A1 (en) Multi-task dynamic resource scheduling method
CN113672383A (en) Cloud computing resource scheduling method, system, terminal and storage medium
WO2016115956A1 (en) Scheduling method and scheduling device for business system based on cloud computing
CN108983946B (en) Server power consumption control method, system and equipment
CN113535409B (en) Server-free computing resource distribution system oriented to energy consumption optimization
CN109597378B (en) Resource-limited hybrid task energy consumption sensing method
CN110633152A (en) Method and device for realizing horizontal scaling of service cluster
CN101661327A (en) Method for adjusting basic frequency of central processing unit (CPU) and device thereof
KR101770736B1 (en) Method for reducing power consumption of system software using query scheduling of application and apparatus for reducing power consumption using said method
US20160291672A1 (en) Preformance state aware thread scheduling
CN107132903B (en) Energy-saving management implementation method, device and network equipment
CN115543450B (en) Method for dynamically dormancy of server-free calculation of resource optimization in edge scene and application
CN114339891A (en) Edge unloading resource allocation method and system based on Q learning
CN117251044A (en) Cloud server dynamic energy consumption management method and system based on ARIMA technology
US20160179716A1 (en) Timer management apparatus
CN103034539A (en) Server system and power management method thereof
CN111782378A (en) Adaptive processing performance adjusting method, server and readable storage medium
CN112214303A (en) Kubernetes cluster automatic scaling system
CN111090627B (en) Log storage method and device based on pooling, computer equipment and storage medium
CN105279008A (en) Virtual machine migration method for energy saving of virtual machine cluster and virtual machine migration device for energy saving of virtual machine cluster
CN102385529B (en) Multi-CPU (Central Processing Unit) domain mobile electronic device and operating method thereof
CN109408242B (en) Server resource online and offline method and device
CN112052087A (en) Deep learning training system and method for dynamic resource adjustment and migration
WO2016058149A1 (en) Method for predicting utilization rate of processor, processing apparatus and terminal device
CN113835896B (en) Iterative computation-oriented parallelism dynamic adjustment method in Gaia system

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