CN115543450A - Server-free computing dynamic dormancy method for resource optimization in edge scene and application - Google Patents

Server-free computing dynamic dormancy method for resource optimization in edge scene and application Download PDF

Info

Publication number
CN115543450A
CN115543450A CN202211141803.XA CN202211141803A CN115543450A CN 115543450 A CN115543450 A CN 115543450A CN 202211141803 A CN202211141803 A CN 202211141803A CN 115543450 A CN115543450 A CN 115543450A
Authority
CN
China
Prior art keywords
time
updated
edge
cold start
keep
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211141803.XA
Other languages
Chinese (zh)
Other versions
CN115543450B (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

Images

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 the keep-alive time, the cold start rate and the sleep time before updating of different function service instances in the edge system to update the Pareto distribution curve; determining an updated cold start rate based on the updated Pareto distribution curve; determining updated sleep time based on time intervals at which different function service instances receive requests; calculating the updated keep-alive time based on the updated sleep time and the updated cold start rate; and judging whether the error between the cold starting rates before and after the updating is within a preset error range or not so as to determine whether the configuration of the edge system is updated or not. The method dynamically adjusts the sleep time according to the time interval of receiving the request by different function service instances in the edge system so as to meet different types of service requests, reduce the starting time delay of the function service instances, improve the request execution efficiency and reduce the resource consumption of the edge system.

Description

Server-free computing dynamic dormancy method for 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 architectures and operation and maintenance technologies, such as virtual machines, containers, micro-services, are emerging, which also makes the micro-service architecture more popular. Nevertheless, these recent technological advances have not bridged the huge resource consumption of cloud computing in marginal scenarios and the lack of pay-on-demand and flexible scaling capabilities until the arrival of no server computing.
The service-free computing simplifies the deployment of the cloud computing application and improves the cost performance of computing, and the cost of creating/terminating the copy is very small relative to a mature virtual machine. In a serverless computing system in an edge scene, execution frequencies of different tasks may have great difference, some function instances may be in an idle state for a long time, and the number of function instances needs to be reduced to save resource consumption. However, the next arrival request time of the function cannot be estimated, and how to properly recycle resources when the instance is idle and generate the low delay of the function instance in advance before the next request arrives to meet the request becomes a difficult problem to be solved urgently.
At present, the problem of cold start of server-free computing in a marginal scene is still in a starting stage, and server-free computing cloud service providers in the industry use Chrome V8 engines to save the restart time of application programs, but technical experts familiar with the arrangement are needed to manage performance delay, so that technical requirements on managers are high. In the academic world, some researchers propose a timing dormancy strategy aiming at the cold start problem, a fixed function instance dormancy strategy is formulated, functions of all types are globally unified, namely, if all function instances do not receive a request for a fixed period of time, an instance recycling resource is destroyed by a system, and when a next request arrives, a function service instance is driven to generate.
In the prior art, characteristics of different function service types of an edge scene are not considered, arrival time intervals of requests of different services are different, globally uniform sleep time and keep-alive time of function instances are not adapted to all types, too short sleep time may cause frequent cold start of some function instances, too long keep-alive time may cause long-term idle load of some function instances after task execution and resource waste, and too long sleep time or too short keep-alive time may cause long-term sleep or low request execution efficiency of some function instances and affect user request quality.
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 globally uniform function instance dormancy time and keep-alive time cannot be adapted to different types of function services in the prior art scheme of the edge scene, so that different function service instances may have frequent cold start, low request execution efficiency and the like, and the user request quality is influenced.
In order to achieve the above object, an embodiment of the present invention provides a server-less computing dynamic hibernation method for resource optimization in an edge scene, where the method includes:
running the system based on the keep-alive time, the cold start rate and the sleep time before updating of different function service instances in the edge system to update a Pareto distribution curve;
determining the updated cold start rate based on the updated Pareto distribution curve;
determining the updated sleep time based on the time interval 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 starting rates before and after updating is within a preset error range or not so as to determine whether the configuration of the edge system is updated or not.
In one or more embodiments of the invention, the method further comprises:
and during initial operation, acquiring the keep-alive time and the cold start rate of different function service instances in the edge system before updating based on the Pareto distribution curve before updating so as to determine the sleep time of the different function service instances before updating.
In one or more embodiments of the present invention, the obtaining the keep-alive time and the cold start rate before updating of different function service instances in the edge system based on the Pareto distribution curve before updating to determine the sleep time before updating of the different function service instances specifically includes:
acquiring the keep-alive time and the cold start rate before updating of different function service instances in the edge system based on the relative optimal point of the Pareto distribution curve before updating;
calculating the sleep time before the update of the different function service instances based on the keep-alive time before the update 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 at which the request is received by the different function service instances in the edge system specifically includes:
counting the time interval distribution of different function service instances in the edge system for receiving requests in a preset time period by using a statistical histogram;
and when the time interval distribution conforms to 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 at which the different function service instances in the edge system receive the request specifically further includes:
and when the distribution of the time intervals of the different function service instances in the edge system for receiving the requests in the preset time period does not conform to the typical distribution rule, updating the sleep 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 an error between the cold start rates before and after the updating is within a preset error range to determine whether to update the configuration of the edge system specifically includes:
controlling the edge system to operate at the keep-alive time and the sleep time before the update when an error between the cold start rates before and after the update is within a preset error range.
In one or more embodiments of the present invention, the determining whether an error between the cold start rates before and after the updating is within a preset error range to determine whether to update the edge system configuration further includes:
and when the error between the cold starting rates before and after the updating is not within a preset error range, controlling the edge system to operate at the updated keep-alive time and the sleep time.
In another aspect of the present invention, there is also provided a server-less computing dynamic dormancy adjustment apparatus for edge-oriented scene resource optimization, the apparatus including:
the updating module is used for operating the system based on the keep-alive time, the cold starting rate and the sleep time before updating of different function service instances in the edge system so as to update the Pareto distribution curve;
the first determining module is used for determining the updated cold starting rate based on the updated Pareto distribution curve;
a second determining module, configured to determine the updated sleep time based on a time interval at which different function service instances in the edge system receive a request;
the calculating module is used for calculating the updated keep-alive time based on the updated dormancy time and the updated cold start rate;
and the judging module is used for judging whether the error between the cold starting 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 is further to: and during initial operation, acquiring the keep-alive time and the cold start rate of different function service instances in the edge system before updating based on the Pareto distribution curve before updating so as to determine the sleep time of the different function service instances before updating.
The update module is further to: acquiring the keep-alive time and the cold start rate before updating of different function service instances in the edge system based on the relative optimal point of the Pareto distribution curve before updating;
calculating the sleep time before the update of the different function service instances based on the keep-alive time before the update and the cold start rate.
The second determination module is further to: counting the time interval distribution of different function service instances in the edge system receiving requests in a preset time period by using a statistical histogram;
and when the time interval distribution conforms to a typical distribution rule, determining the updated sleep time by taking a minimum time interval as a boundary point.
The second determination module is further to: and when the distribution of the time intervals of the different function service instances in the edge system for receiving the requests in the preset time period does not conform to the typical distribution rule, updating the sleep time to zero.
The judging module is further configured to: controlling the edge system to operate at the keep-alive time and the sleep time before the update when an error between the cold start rates before and after the update is within a preset error range.
The judging module is further configured to: and when the error between the cold starting rates before and after updating is not within a preset error range, controlling the edge system to operate in the updated keep-alive time and the sleep time.
In another aspect of the present invention, there is also provided an electronic device, 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 computing dynamic hibernation method for resource optimization in edge scenarios 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 the server-less computing dynamic hibernation method for resource optimization in edge scenes as described above.
Compared with the prior art, the server-free computing dynamic dormancy method for resource optimization in the edge scene and the application thereof 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 provide proper cold start rate for intelligent tasks with different real-time requirements, reduce 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 diagram of a method for server-less computing dynamic dormancy for resource optimization in edge scenarios, 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 edge scenarios, according to an embodiment of the present invention;
FIG. 3 is a diagram of a Pareto distribution curve of a resource optimized serverless computational dynamic dormancy method in a marginal scenario, according to an embodiment of the invention;
FIG. 4 is a histogram of request time intervals for different functional service instances of a resource optimized serverless computational dynamic dormancy method in an edge scenario, according to an embodiment of the invention;
FIG. 5 is a graph of keep-alive time versus sleep time for a resource optimized serverless computational dynamic sleep method in an edge scenario in accordance with an embodiment of the invention;
FIG. 6 is a flowchart of a sleep time calculation for a resource optimized serverless computing dynamic sleep method in an edge scenario according to an embodiment of the invention;
FIG. 7 is a flow diagram of a dynamic dormancy policy for a resource-optimized serverless computing dynamic dormancy method in an edge scenario, according to an embodiment of the invention;
FIG. 8 is a schematic structural diagram of a server-less computing dynamic dormancy adjustment apparatus for edge-oriented scene resource optimization according to an embodiment of the present invention;
fig. 9 is a hardware block diagram of an electronic device for server-less computational dynamic dormancy adjustment for edge-oriented scene resource optimization according to an embodiment of the invention.
Detailed Description
The following detailed description of the present invention is provided in conjunction with the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
Throughout the specification and claims, unless explicitly stated otherwise, the term "comprise" or variations such as "comprises" or "comprising", etc., will be understood to imply the inclusion of a stated element or component but not the exclusion of any other element or component.
The essence of the serverless computing is that the server is completely managed to the cloud manufacturer, and resources are distributed according to requirements. Serverless computing can automatically allocate the resources required by each user, which describes a fine-grained deployment model, and application services composed of one or more functions can be uploaded to the platform and run, scale, and be billed based on the resource consumption at actual run time. Computing resources may be required on demand, support elasticity, simplify operations and maintenance, and the like. By serverless computing, the charging of edge scenes is driven by truly triggered events, i.e., allocated resources and the number of function triggers, the cost of using resources can be greatly reduced.
One important technique for achieving high throughput without server computation is function service instances, and the function instances which remain active are retained in a running environment after being generated once and wait for the next trigger event. However, if the function instance is in the idle state for a while, the system automatically releases the generated function instance, and when a new trigger event comes, the function instance is to be regenerated again, the steps of environment initialization related to the function, dependence required by function downloading and the like are required for loading the function instance, and a certain time is required, and the time is called as cold start time.
Referring to fig. 2, the present invention proposes a service dynamic dormancy policy for the cold start problem in the server-edge-less computing scenario. The strategy of the service dynamic dormancy is to find out the relative optimal points of the utilization rate of system resources and the cold start frequency and specify the dormancy time and the 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 arrive. 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 is linearly increased relative to functions and dependence with different scales, resources are recycled immediately after the function service instance is executed, the cold start time is introduced, the total completion time of the application is greatly influenced, and therefore the cold start frequency is reduced as much as possible.
The invention researches a server-free computing dynamic dormancy strategy facing to edge scene resource optimization by taking the dormancy time and the keep-alive time of a function service instance as entry points, and logically abstracts the dynamic dormancy strategy into two parts. The first part is to coordinate cold starting rate and utilization rate of edge system resources through a Pareto curve, the second part is to calculate sleep time and keep-alive time of function instances in an edge system environment according to the cold starting rate, and all the parts are connected with each other. 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.
Fig. 1 shows an embodiment of a server-less computing dynamic dormancy method for resource optimization in an edge scenario according to the present invention. In this embodiment, the method includes the following steps.
S101, operating the system based on the keep-alive time, the cold start rate and the sleep time before updating of different function service instances in the edge system to update a Pareto distribution curve.
In this embodiment, the keep-alive time, the cold start rate, and the sleep time are all environment configuration parameters of the edge system, wherein the cold start rate changes along with the operation of the system. In the normal operation process of the edge system, the sample points of a certain cold start rate of a certain keep-alive time can be increased, and the Pareto distribution curve is changed along with the increase of the sample points, so that the Pareto distribution curve is updated.
The Pareto distribution is a power law probability distribution that is used to describe observable phenomena. The system cold start rate and the resource utilization rate can be obtained from the previous system operation records to draw a Pareto distribution curve, as shown in fig. 3, the horizontal axis of the Pareto distribution curve represents the frequency C of cold start occurrence, the vertical axis represents the resource utilization rate U, and the connected curve represents the Pareto curve that 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 Are respectively resource benefitsWith revenue and cold start occurrence costs.
For tasks with different characteristics, the resource utilization benefits and the cold start occurrence costs are different. For example, for a real-time task of an edge system, the sensitivity to time is relatively high, when α 1 Less than average resource gain, α 2 More costly than an average cold start. α 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 according to the relatively optimal point (most beneficial point) of the updated Pareto distribution curve.
Referring to fig. 3, the two major indexes of the system resource utilization rate and the cold start frequency cannot be obtained at the same time, and a simple way to reduce the cold start frequency is to continuously increase the keep-alive time and reduce the sleep time, but the resource utilization rate will be reduced; the simple way to increase the resource utilization is to increase the sleep time or to recycle the instance after processing the request directly, but the cold start frequency will increase.
Therefore, in the embodiment, the Pareto distribution curve is introduced to coordinate the edge system resource utilization rate and the cold start rate. Finding out the relatively optimal benefit Max (P) of the system from the Pareto distribution curve, namely, the balance point which can make the system resource benefit maximum, 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 sleep time based on the time interval of the request received by the different function service instances in the edge system.
When the edge system is in normal operation, the sleep time can be dynamically adjusted according to the distribution of the time intervals of the requests received by different function service instances in the edge system. I.e. the service request arrival time intervals may differ for different applications. Statistically, about 45% of the service request time intervals are more than 1 hour, and about 81% of the service request time intervals are within 1 hour and more than 1 minute. Based on the time interval distribution, at least one sliding window representing the time period can be set to count the time interval distribution of the request received by each function service instance in the time period.
In this embodiment, the statistical histogram is used to count the distribution of the time intervals of the requests received by the different function service instances in the edge system within the preset time period, and the vertical axis of the statistical result is shown in fig. 4, where the vertical axis represents the occurrence frequency of the service request time intervals of each application, and the horizontal axis represents the service request time intervals of each application.
Referring to fig. 6, since service request arrival time intervals of different applications may be different, the cases of service request time intervals of different applications should be treated differently. In this embodiment, a service dynamic dormancy policy of a function service instance is set according to service request arrival time intervals of different applications. The service dynamic dormancy strategy mainly finds the relative optimal points of the resource utilization rate and the cold start frequency of the edge system and specifies the dormancy time of the function service instance.
Specifically, when the dispersion degree of the service request time interval of the application is large, it indicates that the statistics of the request time interval received by the function service instance is stable, and the distribution of the request time interval conforms to the typical distribution rule, and at this time, the updated sleep time may be set with the minimum request time interval as a boundary point. When the dispersion degree of the service request time intervals is small, namely the occurrence frequency of the request time intervals received by each function service instance is not large, or the request time intervals captured in the sliding window reach unstable, the distribution of the request time intervals does not conform to a typical distribution rule, under the condition, the sleep time is set to be 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.
Under special conditions, if a few service requests have too sparse time intervals and cannot be captured in a sliding window, the cost of cold start is lower than the loss of idle computing resources, namely, the sleep time is not set, the function service instance is destroyed after the service request is executed, the resources of the function service instance are recycled, 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 updated cold start rate.
Referring to fig. 5, the keep-alive time of the function service instance includes a task execution time e and a dead time k, the task execution time e refers to an effective working time of the function service instance computing resource for a certain application service, and the dead time k refers to a time taken by the function service instance to live without executing the task. Dead time occupies computing resources and decreases edge system resource utilization as dead time increases. The relationship among the task execution time e, the dead time k and the keep-alive time s is as follows: e = s-k.
The relation among the keep-alive time s, the cold start rate C and the sleep time u is as follows:
Figure BDA0003853846520000101
wherein alpha is 3 Is a parameter, and a 3 >0。
When the edge system is in normal operation, the sleep time u can be set according to the distribution of time intervals for receiving requests by 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 according to the above relation.
In one embodiment of the invention, during 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 sleep time before the update of the different function service instances.
That is, when the edge system is initially operated, the sleep time before update (or initial) of the function service instance is calculated according to the keep-alive time before update (or initial) and the cold start rate, and the keep-alive time before update (or initial) and the cold start rate can be obtained according to the relative optimal point of the Pareto distribution curve before update (or initial).
And S105, judging whether the error between the cold starting 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 rates before and after the 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, namely, the configuration of the system is not updated. And when the error between the cold starting rates before and after updating is not within the preset error range [ a, b ], controlling the system to operate according to the updated keep-alive time, the updated cold starting rate and the updated sleep time, namely endowing the updated keep-alive time, the updated cold starting rate and the updated sleep time to the system to operate as new environment configuration parameters.
Referring to fig. 7, fig. 7 is a flow of the server-less computing dynamic dormancy policy for edge-oriented scene resource optimization. When the edge system initially runs, firstly sampling is carried out from an edge system execution history record, a Pareto distribution curve before updating (or initial) is drawn, the keep-alive time and the cold start rate before updating (or initial) are obtained based on the Pareto distribution curve, and then the sleep time before updating (or initial) is calculated according to the keep-alive time and the cold start rate. The edge system then runs with the pre-update (or initial) sleep and keep-alive times as corresponding functions of the sleep and keep-alive times for the service instance within a preset time period (sliding window).
And (3) sampling and accumulating the edge system for a time period to obtain a new Pareto distribution curve, thereby obtaining a new cold start rate, namely the updated cold start rate. Meanwhile, the edge system sets new sleep time, namely updated sleep time, according to the time interval of receiving the request in the time period by the different function service instances. 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 (or initial) updating, judging whether the error of the two is within a preset error range [ a, b ], and if so, operating the edge system by using the sleep time and the keep-alive time before (or initial) updating; and if not, assigning the updated sleep time and the keep-alive time to the edge system for operation.
The edge system is operated iteratively according to the above rules. When the edge system runs to the Nth timeThe corresponding sleep time before update is u i Cold start rate of C i Keep alive time is s i Wherein i is greater than or equal to 0 and less than or equal to n-1, and the corresponding updated sleep time is u n Cold start rate of C n Keep alive time is s n If the cold start rate C is updated for the N-1 st time i And the cold start rate C of the Nth update n The error between the two is not in the preset error range [ a, b ]]In the step (b), the sleep time u of the Nth update is updated n And keep alive time s n And (5) giving the edge system operation.
Referring to fig. 8, a server-less computing dynamic dormancy adjustment apparatus for edge scene resource optimization according to an embodiment of the present invention is described.
In the embodiment of the invention, the device for adjusting the serverless computing dynamic dormancy of the edge scene resource optimization comprises an updating module 201, a first determining module 202, a second determining module 203, a computing module 204 and a judging module 205.
An updating module 201, configured to run the system based on keep-alive time, cold start rate, and sleep time before updating of different function service instances in the edge system, so as to update a 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 a time interval at which different function service instances in the edge system receive a request;
a calculating module 204, configured to calculate the updated keep-alive time based on the updated sleep time and cold start rate;
the determining module 205 is configured to determine whether an error between the cold start rates before and after the update 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 in initial operation, acquiring the keep-alive time and the cold start rate of different function service instances in the edge system before updating based on the Pareto distribution curve before updating so as to determine the sleep time of the different function service instances before updating.
The update module 201 is further configured to: acquiring the keep-alive time and the cold start rate before updating of different function service instances in the edge system based on the relative optimal point of the Pareto distribution curve before updating;
calculating the sleep time before the update of the different function service instances based on the keep-alive time before the update and the cold start rate.
The second determining module 203 is further configured to: counting the time interval distribution of different function service instances in the edge system receiving requests in a preset time period by using a statistical histogram;
and when the time interval distribution conforms to 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 distribution of the time intervals of the different function service instances in the edge system for receiving the requests in the preset time period does not conform to the typical distribution rule, updating the sleep time to zero.
The determining module 205 is further configured to: controlling the edge system to operate at the keep-alive time and the sleep time before the update when an error between the cold start rates before and after the update is within a preset error range.
The determining module 205 is further configured to: and when the error between the cold starting rates before and after the updating is not within a preset error range, controlling the edge system to operate at the updated keep-alive time and the sleep time.
Fig. 9 illustrates a hardware block diagram of an electronic device 30 for server-less computational dynamic dormancy adjustment for edge-oriented scene resource optimization according to an embodiment of the present description. As shown in fig. 9, the electronic device 30 may include at least one processor 301, a storage 302 (e.g., a non-volatile storage), a memory 303, and a communication interface 304, and the at least one processor 301, the storage 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 the memory 302.
It should be appreciated that the computer-executable instructions stored in the memory 302, when executed, cause the at least one processor 301 to perform the various operations and functions described above in connection with fig. 1-7 in the various embodiments of the present specification.
In embodiments of the present description, the 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), handheld devices, messaging devices, wearable computing devices, consumer electronics, 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., elements described above as being implemented in software) that, when executed by a computer, cause the computer to perform various operations and functions described above in connection with fig. 1-7 in various embodiments of the present specification. Specifically, a system or apparatus may be provided which is provided with a readable storage medium on which software program code implementing the functions of any of the above embodiments is stored, and causes a computer or processor of the system or apparatus to read out and execute instructions stored in the readable storage medium.
According to the server-free computing dynamic dormancy method for resource optimization in the edge scene and the application thereof, the dormancy time of the function service instance is dynamically adjusted according to the time interval of receiving the request by the 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 provide proper cold start rate for intelligent tasks with different real-time requirements in the edge scene, reduce dead time of computing resources in each service, improve the utilization rate of system resources and further improve the benefit of the system resources.
As will be appreciated by one skilled in the art, 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 has been 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 description of specific exemplary embodiments of the invention has been presented for the 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 certain principles of the invention and its practical application to enable one skilled in the art to make and use various exemplary embodiments of the invention and various alternatives and 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 server-free computing dynamic hibernation method for resource optimization in edge scenes, the method comprising:
running the system based on the keep-alive time, the cold start rate and the sleep time before updating of different function service instances in the edge system to update a Pareto distribution curve;
determining the updated cold start rate based on the updated Pareto distribution curve;
determining the updated sleep time based on the time interval 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 starting rates before and after updating is within a preset error range or not so as to determine whether the configuration of the edge system is updated or not.
2. The method for server-less computing dynamic dormancy for resource optimization in edge scenes of claim 1, further comprising:
and in initial operation, acquiring the keep-alive time and the cold start rate of different function service instances in the edge system before updating based on the Pareto distribution curve before updating so as to determine the sleep time of the different function service instances before updating.
3. The server-less computing dynamic dormancy method for resource optimization in an edge scene according to claim 2, wherein the obtaining of the keep-alive time and the cold start rate before updating of different function service instances in the edge system based on the Pareto distribution curve before updating to determine the dormancy time before updating of different function service instances specifically comprises:
acquiring the keep-alive time and the cold start rate before updating of different function service instances in the edge system based on the relative optimal point of the Pareto distribution curve before updating;
calculating the sleep time before updating of different function service instances based on the keep-alive time before updating and the cold start rate.
4. The method of claim 1, wherein the determining the updated sleep time based on the time interval at which the request is received by the different function service instances in the edge system comprises:
counting the time interval distribution of different function service instances in the edge system for receiving requests in a preset time period by using a statistical histogram;
and when the time interval distribution conforms to a typical distribution rule, determining the updated sleep time by taking a minimum time interval as a boundary point.
5. The server-less computing dynamic dormancy method of resource optimization in an edge scenario of claim 4, wherein the updated dormancy time is determined based on time intervals at which different function service instances in the edge system receive requests, further comprising:
and when the distribution of the time intervals of the different function service instances in the edge system for receiving the requests in a preset time period does not accord with a typical distribution rule, updating the sleep time to be zero.
6. The method according to claim 1, wherein the configuration of the edge system includes the keep-alive time, the cold start rate, and the sleep time, and the determining whether an 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:
controlling the edge system to operate at the keep-alive time and the sleep time before the update when an error between the cold start rates before and after the update is within a preset error range.
7. The server-less computing dynamic dormancy method for resource optimization in an edge scene as claimed in claim 1, wherein 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 further comprises:
and when the error between the cold starting rates before and after the updating is not within a preset error range, controlling the edge system to operate at the updated keep-alive time and the sleep time.
8. A device for resource-optimized serverless computing dynamic hibernation in edge scenes, the device comprising:
the updating module is used for operating the system based on the keep-alive time, the cold starting rate and the sleep time before updating of different function service instances in the edge system so as to update the Pareto distribution curve;
a first determining module, configured to determine the updated cold start rate based on the updated Pareto distribution curve;
a second determining module, configured to determine the updated sleep time based on a time interval at which different function service instances in the edge system receive a request;
a calculation module, configured to calculate the updated keep-alive time based on the updated sleep time and cold start rate;
and the judging module is used for judging whether the error between the cold starting rates before and after updating is within a preset error range so as to determine whether to update the configuration of the edge system.
9. An electronic device, characterized in that the electronic device comprises:
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 computing dynamic hibernation method for resource optimization in edge scenes of any of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements a server-less computing dynamic hibernation method for resource optimization in edge scenarios as claimed in 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 true CN115543450A (en) 2022-12-30
CN115543450B 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
缪巍巍 等: "一种面向多物联代理在线应用的弹性资源调度算法", 重庆理工大学学报, vol. 36, no. 2, pages 151 - 160 *

Also Published As

Publication number Publication date
CN115543450B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN108958916B (en) Workflow unloading optimization method under mobile edge environment
CN109783218B (en) Kubernetes container cluster-based time-associated container scheduling method
WO2021233261A1 (en) Multi-task dynamic resource scheduling method
US10101910B1 (en) Adaptive maximum limit for out-of-memory-protected web browser processes on systems using a low memory manager
US7137115B2 (en) Method for controlling multithreading
CN113672383A (en) Cloud computing resource scheduling method, system, terminal and storage medium
CN110990138A (en) Resource scheduling method, device, server and storage medium
CN109597378B (en) Resource-limited hybrid task energy consumption sensing method
US20160291672A1 (en) Preformance state aware thread scheduling
KR101770736B1 (en) Method for reducing power consumption of system software using query scheduling of application and apparatus for reducing power consumption using said method
US10248321B1 (en) Simulating multiple lower importance levels by actively feeding processes to a low-memory manager
CN115878260A (en) Low-carbon self-adaptive cloud host task scheduling system
CN109889406B (en) Method, apparatus, device and storage medium for managing network connection
CN114490048A (en) Task execution method and device, electronic equipment and computer storage medium
CN114339891A (en) Edge unloading resource allocation method and system based on Q learning
CN115543450B (en) Method for dynamically dormancy of server-free calculation of resource optimization in edge scene and application
US20160179716A1 (en) Timer management apparatus
CN117555683A (en) Cloud cluster resource scheduling method based on deep reinforcement learning
CN116541167A (en) System flow control method, device, electronic equipment and computer readable medium
CN112214303A (en) Kubernetes cluster automatic scaling system
CN113590324B (en) Heuristic task scheduling method and system for cloud side-end collaborative computing
CN111090627B (en) Log storage method and device based on pooling, computer equipment and storage medium
CN114138401A (en) Container configuration method, device, equipment and medium based on artificial intelligence
CN109408242B (en) Server resource online and offline method and device
CN113296934A (en) Method and device for scheduling process

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