CN115629858A - Self-adaptive method for number of function examples in server-free background and application - Google Patents

Self-adaptive method for number of function examples in server-free background and application Download PDF

Info

Publication number
CN115629858A
CN115629858A CN202211271418.7A CN202211271418A CN115629858A CN 115629858 A CN115629858 A CN 115629858A CN 202211271418 A CN202211271418 A CN 202211271418A CN 115629858 A CN115629858 A CN 115629858A
Authority
CN
China
Prior art keywords
function
task requests
instances
load data
prediction model
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.)
Pending
Application number
CN202211271418.7A
Other languages
Chinese (zh)
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.)
Nanjing University of Aeronautics and Astronautics
Original Assignee
Nanjing University of Aeronautics and Astronautics
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 Nanjing University of Aeronautics and Astronautics filed Critical Nanjing University of Aeronautics and Astronautics
Priority to CN202211271418.7A priority Critical patent/CN115629858A/en
Publication of CN115629858A publication Critical patent/CN115629858A/en
Pending legal-status Critical Current

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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • 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/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a self-adaptive method for the number of function examples in a server-free background and application thereof, wherein the method comprises the following steps: acquiring historical request load data of a function instance; training a prediction model based on historical request load data; inputting the trained prediction model into a remote procedure call server so that the remote procedure call server outputs the number of predicted task requests; the number of function instances is dynamically adjusted based on the number of predicted task requests. According to the method, historical request load data of function instances are used as training data of a prediction model, the trained prediction model is input into a remote process call server to obtain the number of predicted task requests, and finally the number of the function instances is dynamically adjusted according to the number of the predicted task requests, so that the number of the function instances of host machines in a host machine cluster can be adjusted in advance, and the queuing time of the task requests in an application system is reduced; meanwhile, when the load of the task request is not high, the idle function instance is released, and the held resources are recycled.

Description

Self-adaptive method for number of function examples in server-free background and application
Technical Field
The invention relates to the technical field of cloud computing, in particular to a function instance quantity self-adaption method and application in a server-free background.
Background
Serverless computing is a new business model for cloud computing, and ease of use and low cost are the main reasons why serverless computing is becoming more and more popular. Different from the traditional infrastructure, namely service, on a server-free computing platform, a user only needs to write and submit own functions without managing a bottom running environment related to function running, the platform charges according to resources consumed during function running, and the platform does not charge when no request comes from a function instance.
Because idle function instance platforms do not charge, the platforms tend to release these idle function instances, reclaiming resources. But releasing the function instance too aggressively also causes problems. When the next request for a function arrives, the request is queued because no instance can process it, and the function instance generation takes a certain amount of time, which is called the cold start time. The function execution time on most serverless computing platforms is very short, in less than 1 second to even tens of milliseconds, while the cold start time can reach over 2 seconds, which is unacceptable for delay sensitive functions.
Therefore, most serverless computing platforms keep the idle instance alive for a fixed time, and sacrifice the overhead on resources to avoid the situation of increased delay caused by the handleability of the non-function instance when the next request arrives. For example, openWhisk takes the function instance keep alive for a fixed time of 10 minutes, and the next time a request comes, the 10 minute timer is reset.
Meanwhile, in order to avoid the situation that too few function instances cannot process too many concurrent requests, researchers have proposed a method for calculating the number of function instances to be generated according to the number of queued requests in a queue and the processing speed of the function instances, but this method still does not solve the problem of how to release idle function instances to recycle resources.
Disclosure of Invention
The invention aims to provide a function instance quantity self-adaption method and application in a server-free background, which are used for solving the technical problems that the time delay is increased due to the fact that a task request lacks corresponding function instance processing and how to release idle function instances to recover resources in the prior art.
To achieve the above object, an embodiment of the present invention provides a method for adaptive quantity of function instances in a server-free context, where the method includes:
acquiring historical request load data of a function instance, wherein the historical request load data comprises the number of task requests received by the function instance in each equal time interval;
training a predictive model based on the historical request load data;
inputting the trained prediction model into a remote procedure call server so that the remote procedure call server outputs the number of predicted task requests;
and dynamically adjusting the number of function instances based on the number of predicted task requests.
In one or more embodiments of the present invention, inputting the trained prediction model into a remote procedure call server, so that the remote procedure call server outputs a predicted task request number, specifically including: setting a sliding window, and adding the number of task requests received by the function instance in the current time interval into the sliding window; inputting the sliding window and the category of the function instance into the remote procedure call server so that the remote procedure call server loads a target prediction model corresponding to the function instance; determining a number of predicted task requests based on the target prediction model and a sliding window.
In one or more embodiments of the present invention, determining the number of predicted task requests based on the target prediction model and the sliding window specifically includes: and predicting the number of task requests added in the next time step after the sliding window passes through the current time interval by adopting a multi-step time sequence prediction algorithm based on the target prediction model so as to determine the predicted task request number.
In one or more embodiments of the present invention, dynamically adjusting the number of function instances based on the number of predicted task requests specifically includes: comparing the number of predicted task requests with the number of existing function instances in the host cluster; if the quantity of the predicted task requests is larger than the quantity of the existing function instances in the host machine cluster, generating the function instances in the host machine cluster; if the quantity of the prediction task requests is smaller than the quantity of the existing function instances in the host machine cluster, deleting the function instances in the host machine cluster; and the generation quantity or the deletion quantity of the function instances is the difference value between the quantity of the predicted task requests and the quantity of the existing function instances in the host machine cluster.
In one or more embodiments of the invention, the method further comprises: and based on the historical request load data of the function instance, incrementally updating the prediction model corresponding to the function instance once every updating time interval.
In one or more embodiments of the invention, the method further comprises: setting a sliding window, dividing all request load data of a group of function examples into a plurality of groups in a mode of taking the request load data of the function examples at each time step of rolling the sliding window, and constructing the plurality of groups of request load data into a sample data set; the sample data set is divided into a training set and a test set to train the predictive model.
In one or more embodiments of the invention, the predictive model is a long-short term memory network model.
In another aspect of the present invention, there is provided an apparatus for adaptive number of function instances in a serverless context, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring historical request load data of a function instance, and the historical request load data comprises the number of task requests received by the function instance in each equal time interval;
a training module to train a predictive model based on the historical request load data;
the operation module is used for inputting the trained prediction model into a remote process call server so as to enable the remote process call server to output the number of prediction task requests;
and the adjusting module is used for dynamically adjusting the number of the function examples based on the number of the predicted task requests.
In one or more embodiments of the present invention, the obtaining module is specifically configured to: setting a sliding window, dividing all request load data of a group of function examples into a plurality of groups in a mode of taking the request load data of the function examples at each time step of rolling the sliding window, and constructing the plurality of groups of request load data into a sample data set; the sample data set is partitioned into a training set and a test set to train the predictive model.
In one or more embodiments of the present invention, the operation module is specifically configured to: setting a sliding window, and adding the number of task requests received by the function instance in the current time interval into the sliding window; inputting the sliding window and the category of the function instance into the remote procedure call server so that the remote procedure call server loads a target prediction model corresponding to the function instance; determining a number of predicted task requests based on the target prediction model and a sliding window.
In one or more embodiments of the present invention, the operation module is further specifically configured to: and predicting the number of task requests added in the next time step after the sliding window passes through the current time interval by adopting a multi-step time sequence prediction algorithm based on the target prediction model so as to determine the predicted task request number.
In one or more embodiments of the present invention, the adjusting module is specifically configured to: comparing the number of predicted task requests with the number of existing function instances in the host cluster; if the quantity of the predicted task requests is larger than the quantity of the existing function instances in the host machine cluster, generating the function instances in the host machine cluster; if the quantity of the prediction task requests is smaller than the quantity of the existing function instances in the host machine cluster, deleting the function instances in the host machine cluster; and the generation quantity or the deletion quantity of the function instances is the difference value between the quantity of the predicted task requests and the quantity of the existing function instances in the host machine cluster.
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 the method for adaptive number of instances of functions in a serverless context 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 method for adapting a number of instances of a function in a serverless context as described above.
Compared with the prior art, according to the self-adaptive method and application of the function instance quantity in the server-free background, the historical request load data of the function instance is used as the training data of the prediction model, the trained prediction model is input into the remote process call server to obtain the predicted task request quantity, and finally the function instance quantity is dynamically adjusted according to the predicted task request quantity, so that the function instance quantity of the host machines in the host machine cluster can be adjusted in advance, the end-to-end time delay of the function request cannot be influenced by cold start time, and the queuing time of the task request in an application system is reduced; meanwhile, when the load of the task request is not high, the idle function instance is released, and the held resources are recycled.
Drawings
FIG. 1 is a flow chart of a method for adaptive number of function instances in a serverless context according to an embodiment of the invention;
FIG. 2 is a diagram of application system scheduling components of a method for adaptive number of function instances in a serverless context, in accordance with one embodiment of the invention;
FIG. 3 is a schematic diagram illustrating the partitioning of historical request load data for a function instance quantity adaptive method in a server-less context according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a multi-step time series prediction algorithm for obtaining the number of predicted task requests in a function instance number adaptive method in a server-free context according to an embodiment of the present invention;
FIG. 5 is a block diagram of an example function quantity adaptive device in a server-less context according to an embodiment of the present invention;
fig. 6 is a hardware block diagram of an electronic device with adaptive number of function instances in a serverless context according to an embodiment of the invention.
Detailed Description
Specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
The present application will be described in detail below with reference to various embodiments shown in the accompanying drawings. The embodiments are not limited to the embodiments, and structural, methodological, or functional changes made by those skilled in the art according to the embodiments are included in the scope of the present disclosure.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "corresponding" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to FIG. 2, a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application is shown. The implementation environment comprises a scheduler of the application system, a Remote Procedure Call (RPC) server and a host cluster, wherein the application system can run the scheduler and the RPC server, and meanwhile, the scheduler is respectively communicated with the RPC server and the host cluster.
The host machine cluster comprises a plurality of host machines, and each host machine comprises at least one function example for processing the issued task request. The RPC server can request services from a remote computer program over the network without having to know the protocols of the underlying network technology.
In this embodiment, the RPC server loads the prediction model corresponding to the function instance to predict the number of task requests to be arrived, so that the number of function instances of the host in the host cluster can be adjusted in advance, it is ensured that the task requests are processed by the corresponding function instances after arriving, and the queuing time of the task requests in the application system is reduced.
Referring to fig. 1, an embodiment of a method for adaptive quantity of function instances in the context of serverless application is described. In this embodiment, the method includes the following steps.
S101, obtaining historical request load data of the function instance, wherein the historical request load data comprises the number of task requests received by the function instance in each equal time interval.
In this embodiment, the historical request load data of the function instance X may be obtained by using a multi-step time series prediction algorithm, the time interval T is an interval between adjacent time steps, the request data of a plurality of previous time steps is used as the input of the multi-step time series prediction algorithm to obtain the request data of the next time step, and this operation is repeated, so that all the historical request load data Workload of the function instance X may be obtained X The history requests load data Workload X Also reflecting the tasks received by function instance X each time an equal time interval T has elapsedA change in the number n of requests.
And S102, training a prediction model based on the historical request load data.
In this embodiment, the prediction model may be a Long-Short Term Memory network (LSTM) model, and the LSTM is a time-cyclic neural network that can effectively process sequence data. The acquired historical request load data is input into the predictive model for training thereof.
Specifically, referring to fig. 3, first, a sliding window S is set X And with sliding window S X All the historical request load data Workload of the function instance X are obtained in a mode of taking a group of request load data every time step of rolling X And dividing the data into a plurality of groups, and constructing the plurality of groups of request load data into a sample data set as training data of the prediction model.
And randomly selecting 80% of sample data from the sample data set as a training set, using the rest 20% of the sample data as a test set, inputting the training set and the test set into the prediction model, training the prediction model by using the training set, and testing the accuracy of the trained prediction model by using the test set.
Further, the trained prediction model can be evaluated using Mean Absolute Error (MAE) as an accuracy evaluation index.
S103, inputting the trained prediction model into a remote process call server so that the remote process call server outputs the number of prediction task requests.
Specifically, the application system runs the remote procedure call server outside the scheduler, and the scheduler adds the number n of task requests received by the function instance X corresponding to the current time interval T into the set sliding window S X Inner and sliding window S X The change condition of the number n of the task requests corresponding to each previous time interval T is recorded, and a sliding window S is formed X The maximum upper limit of (c) is MAXs time steps.
The scheduler will slide the window S X And type of class of function instance X X Inputting a remote procedure call server, the remoteThe procedure call server can be based on the type of the function instance X X And loading the target prediction model corresponding to the function instance X.
Referring to FIG. 4, the target prediction model predicts a sliding window S according to a multi-step time series prediction algorithm X And (3) the number n of task requests added in the next time step after the current time interval T, so as to obtain the predicted number n' of task requests. Finally, the remote procedure call server sends the obtained predicted task request number n' to the scheduler.
And S104, dynamically adjusting the number of function instances based on the number of the predicted task requests.
Each function instance X has a respective independent request queue in the scheduler, and the scheduler issues a function instance generation command or a deletion command to the host in the host cluster according to the prediction result output by the remote procedure call server.
Specifically, the scheduler compares the obtained predicted task request number n' with the existing function instance number C observed in the host cluster exist Comparing, if the number n' of the predicted task requests is larger than the number C of the existing function instances in the host cluster exist The dispatcher issues a function instance generation command, and the application system generates a function instance X in the host cluster; if the number n' of the predicted task requests is less than the number C of the existing function instances in the host cluster exist And the scheduler issues a function instance deleting command, and the application system deletes the function instance X in the host machine cluster.
The generation quantity or the deletion quantity of the function instances X is the quantity n' of the predicted task requests and the quantity C of the existing function instances in the host cluster exist The difference between |. N' -C exist ∣。
Further, in the present embodiment, the historical request load data Workload based on the function instance X X And when the application system passes a preset updating time interval T ', the request load data collected in the updating time interval T' is subjected to one-time incremental training on the prediction model so as to update the model.
Referring to fig. 5, an embodiment of the function instance quantity adaptive device in the non-server context of the present application is described. In this embodiment, the apparatus for adaptive number of function instances in a serverless context includes an obtaining module 201, a training module 202, an operating module 203, and an adjusting module 204.
An obtaining module 201, configured to obtain historical request load data of a function instance, where the historical request load data includes a number of task requests received by the function instance in each equal time interval; a training module 202 for training a predictive model based on the historical request load data; the operation module 203 is configured to input the trained prediction model into a remote procedure call server, so that the remote procedure call server outputs a predicted task request number; an adjusting module 204, configured to dynamically adjust the number of function instances based on the number of predicted task requests.
In one or more embodiments of the present invention, the obtaining module 201 is specifically configured to: setting a sliding window, dividing all request load data of a group of function examples into a plurality of groups in a mode of taking the request load data of the function examples at each time step of rolling the sliding window, and constructing the plurality of groups of request load data into a sample data set; the sample data set is divided into a training set and a test set to train the predictive model.
In one or more embodiments of the present invention, the operation module 203 is specifically configured to: setting a sliding window, and adding the number of task requests received by the function instance in the current time interval into the sliding window; inputting the sliding window and the category of the function instance into the remote procedure call server so that the remote procedure call server loads a target prediction model corresponding to the function instance; determining a number of predicted task requests based on the target prediction model and a sliding window.
In one or more embodiments of the present invention, the operation module 203 is further specifically configured to: and predicting the number of task requests added in the next time step after the sliding window passes through the current time interval by adopting a multi-step time sequence prediction algorithm based on the target prediction model so as to determine the predicted task request number.
In one or more embodiments of the present invention, the adjusting module 204 is specifically configured to: comparing the number of predicted task requests with the number of existing function instances in the host cluster; if the quantity of the prediction task requests is larger than the quantity of the existing function examples in the host cluster, generating the function examples in the host cluster; if the quantity of the prediction task requests is smaller than the quantity of the existing function instances in the host machine cluster, deleting the function instances in the host machine cluster; and the generation quantity or the deletion quantity of the function instances is the difference value between the quantity of the predicted task requests and the quantity of the existing function instances in the host machine cluster.
As described above with reference to fig. 1 to 4, a function example number adaptive method in a server-less context according to an embodiment of the present specification is described. The details mentioned in the above description of the method embodiments also apply to the function instance number adaptation means in the server-less context of the embodiments of the present description. The function instance number adaptive device in the above non-server context may be implemented by hardware, or may be implemented by software, or a combination of hardware and software.
Fig. 6 shows a hardware configuration diagram of an electronic device 30 with adaptive number of function instances in a serverless context according to an embodiment of the present description. As shown in fig. 6, 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-4 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), handsets, 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-4 in the 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.
In this case, the program code itself read from the readable storage medium can realize the functions of any one of the above-described embodiments, and thus the computer readable code and the readable storage medium storing the computer readable code constitute a part of this specification.
Examples of the readable storage medium include floppy disks, hard disks, magneto-optical disks, optical disks (e.g., CD-ROMs, CD-R, CD-RWs, DVD-ROMs, DVD-RAMs, DVD-RWs), magnetic tapes, nonvolatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or from the cloud via a communications network.
According to the method and the application for selecting the input horizontal energy analysis convolutional neural network, historical request load data of a function instance is used as training data of a prediction model, the prediction model corresponding to the function instance is loaded through an RPC server after training, and the number of task requests to be arrived is predicted by adopting a multi-step time sequence prediction algorithm, so that the number of the function instances of hosts in a host cluster can be adjusted in advance, the end-to-end time delay of the function requests cannot be influenced by cold start time, and the queuing time of the task requests in an application system is reduced; meanwhile, when the load of the task request is not high, the idle function instance is released, and the held resources are recycled.
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 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 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 method for adaptive quantity of function instances in a serverless context, the method comprising:
acquiring historical request load data of a function instance, wherein the historical request load data comprises the number of task requests received by the function instance in each equal time interval;
training a predictive model based on the historical request load data;
inputting the trained prediction model into a remote procedure call server so that the remote procedure call server outputs the number of predicted task requests;
dynamically adjusting the number of function instances based on the number of predicted task requests.
2. The method of claim 1, wherein inputting the trained prediction model into a remote procedure call server to enable the remote procedure call server to output a predicted task request quantity, specifically comprises:
setting a sliding window, and adding the number of task requests received by the function instance in the current time interval into the sliding window;
inputting the sliding window and the category of the function instance into the remote procedure call server so that the remote procedure call server loads a target prediction model corresponding to the function instance;
determining a number of predicted task requests based on the target prediction model and a sliding window.
3. The method of claim 2, wherein determining the number of predicted task requests based on the target prediction model and a sliding window comprises:
and predicting the number of task requests added in the next time step after the sliding window passes through the current time interval by adopting a multi-step time sequence prediction algorithm based on the target prediction model so as to determine the predicted task request number.
4. The method of claim 1, wherein dynamically adjusting the number of function instances based on the number of predicted task requests comprises:
comparing the number of predicted task requests with the number of existing function instances in the host cluster;
if the quantity of the predicted task requests is larger than the quantity of the existing function instances in the host machine cluster, generating the function instances in the host machine cluster;
if the quantity of the prediction task requests is smaller than the quantity of the existing function instances in the host machine cluster, deleting the function instances in the host machine cluster;
and the generation quantity or the deletion quantity of the function instances is the difference value between the prediction task request quantity and the quantity of the existing function instances in the host cluster.
5. The method for adaptive number of instances of a function in a serverless context of claim 1, the method further comprising:
and based on the historical request load data of the function instance, incrementally updating the prediction model corresponding to the function instance once every updating time interval.
6. The method for adaptive number of instances of a function in a serverless context of claim 1, the method further comprising:
setting a sliding window, dividing all request load data of a group of function examples into a plurality of groups in a mode of taking the request load data of the function examples at each time step of rolling the sliding window, and constructing the plurality of groups of request load data into a sample data set;
the sample data set is divided into a training set and a test set to train the predictive model.
7. The method for adaptive number of instances of a function in a serverless context of claim 1 wherein the predictive model is a long-short term memory network model.
8. An apparatus for adaptive number of function instances in a serverless context, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring historical request load data of a function instance, and the historical request load data comprises the number of task requests received by the function instance in each equal time interval;
a training module to train a predictive model based on the historical request load data;
the operation module is used for inputting the trained prediction model into a remote process call server so as to enable the remote process call server to output the number of prediction task requests;
and the adjusting module is used for dynamically adjusting the number of the function examples based on the number of the predicted task requests.
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 method of adaptive number of instances of functions in a serverless context of any of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, implements the method for adapting a number of instances of a function in a serverless context as claimed in any one of claims 1 to 7.
CN202211271418.7A 2022-10-17 2022-10-17 Self-adaptive method for number of function examples in server-free background and application Pending CN115629858A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211271418.7A CN115629858A (en) 2022-10-17 2022-10-17 Self-adaptive method for number of function examples in server-free background and application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211271418.7A CN115629858A (en) 2022-10-17 2022-10-17 Self-adaptive method for number of function examples in server-free background and application

Publications (1)

Publication Number Publication Date
CN115629858A true CN115629858A (en) 2023-01-20

Family

ID=84907547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211271418.7A Pending CN115629858A (en) 2022-10-17 2022-10-17 Self-adaptive method for number of function examples in server-free background and application

Country Status (1)

Country Link
CN (1) CN115629858A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740194A (en) * 2019-11-18 2020-01-31 南京航空航天大学 Micro-service combination method based on cloud edge fusion and application
CN110990138A (en) * 2019-12-04 2020-04-10 北京三快在线科技有限公司 Resource scheduling method, device, server and storage medium
CN112860403A (en) * 2021-02-22 2021-05-28 中国联合网络通信集团有限公司 Cluster load resource scheduling method, device, equipment, medium and product
US20210184941A1 (en) * 2019-12-13 2021-06-17 Hewlett Packard Enterprise Development Lp Proactively accomodating predicted future serverless workloads using a machine learning prediction model and a feedback control system
CN113553149A (en) * 2021-07-02 2021-10-26 深圳先进技术研究院 Cloud server cluster load scheduling method, system, terminal and storage medium
CN114443310A (en) * 2022-03-17 2022-05-06 中国工商银行股份有限公司 Resource scheduling method, device, equipment, medium and program product

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740194A (en) * 2019-11-18 2020-01-31 南京航空航天大学 Micro-service combination method based on cloud edge fusion and application
CN110990138A (en) * 2019-12-04 2020-04-10 北京三快在线科技有限公司 Resource scheduling method, device, server and storage medium
US20210184941A1 (en) * 2019-12-13 2021-06-17 Hewlett Packard Enterprise Development Lp Proactively accomodating predicted future serverless workloads using a machine learning prediction model and a feedback control system
CN112860403A (en) * 2021-02-22 2021-05-28 中国联合网络通信集团有限公司 Cluster load resource scheduling method, device, equipment, medium and product
CN113553149A (en) * 2021-07-02 2021-10-26 深圳先进技术研究院 Cloud server cluster load scheduling method, system, terminal and storage medium
CN114443310A (en) * 2022-03-17 2022-05-06 中国工商银行股份有限公司 Resource scheduling method, device, equipment, medium and program product

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐政钧: "无服务器云计算平台中函数启动加速器的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 5, pages 139 - 35 *

Similar Documents

Publication Publication Date Title
US11392843B2 (en) Utilizing a machine learning model to predict a quantity of cloud resources to allocate to a customer
Bhattacharjee et al. Barista: Efficient and scalable serverless serving system for deep learning prediction services
EP3401787B1 (en) Analyzing resource utilization of a cloud computing resource in a cloud computing environment
US20190130327A1 (en) Applying machine learning to dynamically scale computing resources to satisfy a service level agreement (sla)
US20180316750A1 (en) Deployment of multi-task analytics applications in multi-clouds
US11029961B2 (en) Calculating wait time for batch scheduler jobs
US20200219028A1 (en) Systems, methods, and media for distributing database queries across a metered virtual network
US11182216B2 (en) Auto-scaling cloud-based computing clusters dynamically using multiple scaling decision makers
US10705872B2 (en) Predictive virtual server scheduling and optimization of dynamic consumable resources to achieve priority-based workload performance objectives
US10070290B2 (en) System and method for scheduling background synchronization of application data
CN113485833B (en) Resource prediction method and device
CN108595250B (en) IaaS cloud platform-oriented resource scheduling efficiency optimization method and system
US11381657B2 (en) Enhanced file sharing systems and methods
JP2009193205A (en) Automatic tuning system, automatic tuning device, and automatic tuning method
CN113254191A (en) Method, electronic device and computer program product for running applications
CN115629858A (en) Self-adaptive method for number of function examples in server-free background and application
Fan et al. Knative autoscaler optimize based on double exponential smoothing
JP2017091001A (en) Virtual instance arrangement position determination device, virtual instance arrangement position determination method, and virtual instance arrangement position determination program
Ambati et al. Modeling and analyzing waiting policies for cloud-enabled schedulers
CN113254200B (en) Resource arrangement method and intelligent agent
US11121805B2 (en) Systems and methods for determining initial channel quality conditions of a channel for provision of content
CN113886746A (en) Page loading method, device, equipment and medium
Moussa et al. Toward better service performance management via workload prediction
EP3719719A1 (en) Utilizing a machine learning model to predict a quantity of cloud resources to allocate to a customer
US20230075828A1 (en) Neural paths for workload execution

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