CN113515355A - Resource scheduling method, device, server and computer readable storage medium - Google Patents

Resource scheduling method, device, server and computer readable storage medium Download PDF

Info

Publication number
CN113515355A
CN113515355A CN202110368376.8A CN202110368376A CN113515355A CN 113515355 A CN113515355 A CN 113515355A CN 202110368376 A CN202110368376 A CN 202110368376A CN 113515355 A CN113515355 A CN 113515355A
Authority
CN
China
Prior art keywords
task
specified type
online
resource
resources
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.)
Withdrawn
Application number
CN202110368376.8A
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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology 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 Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202110368376.8A priority Critical patent/CN113515355A/en
Publication of CN113515355A publication Critical patent/CN113515355A/en
Withdrawn 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/5016Allocation 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 the resource being the memory
    • 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/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; 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/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Abstract

The disclosure provides a resource scheduling method, a resource scheduling device, a server and a computer readable storage medium, and belongs to the technical field of internet. The method comprises the following steps: when the online tasks of the specified type are in the low peak period of the flow, an elastic mixed resource pool is constructed according to idle resources of the online tasks of the specified type; determining the resource type required by the offline task of the specified type; and calling the corresponding type of resources in the elastic mixed resource pool to execute the specified type of offline tasks. According to the method, the online tasks and the offline tasks are divided into different types, when the online tasks are in the low peak period of flow, idle resources of the online tasks are adopted to process the offline tasks of the same type, and since the resource types depended on by the tasks of the same type are the same and resource scheduling is carried out on the resource types required by the offline tasks of the same type during scheduling, reasonable utilization of resources can be achieved from resource granularity, and therefore the utilization rate of the resources is greatly improved.

Description

Resource scheduling method, device, server and computer readable storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a resource scheduling method, apparatus, server, and computer-readable storage medium.
Background
The traffic of many internet companies presents very obvious peak-to-peak differences, usually the peak period of the traffic in the middle of the day, and the peak period of the traffic from 23 o 'clock in the evening to 9 o' clock in the morning of the next day, and the traffic in the peak period is often hundreds of times or even thousands of times of the traffic in the peak period. To alleviate peak traffic pressures, internet companies tend to deploy a large number of redundant online resources. However, these resources are wasted very severely during the low peak period of the traffic, for example, the utilization rate of the CPU (Central Processing Unit) in the high peak period of the traffic is as high as 80%, and the utilization rate of the CPU in the low peak period of the traffic is as low as 10% or less. In order to solve the problem of resource waste and improve the resource utilization rate, resources need to be reasonably scheduled.
Currently, many internet companies use redundant online resources for online task computation during peak periods of traffic; and scheduling the offline tasks to the online clusters for calculation in the low peak period of the traffic.
However, the offline task and the online task have both a heavy IO (Input Output) type task and a heavy computation type task, and generally, different types of tasks consume different types of resources, and related technologies perform scheduling randomly when performing resource scheduling, which results in a low resource utilization rate.
Disclosure of Invention
The embodiment of the disclosure provides a resource scheduling method, a resource scheduling device, a server and a computer-readable storage medium, which can improve the utilization rate of resources. The technical scheme is as follows:
in a first aspect, a method for scheduling resources is provided, where the method includes:
when the online task of the specified type is in the low peak period of the flow, constructing an elastic mixed resource pool according to the idle resources of the online task of the specified type;
determining the resource type required by the offline task of the specified type;
and calling the resources of the corresponding type in the elastic mixed resource pool to execute the offline task of the specified type.
In another embodiment of the present disclosure, before constructing the elastic blending resource pool according to the resource idle by the online task of the specified type, the method further includes:
acquiring a storage coefficient corresponding to the online task of the specified type, wherein the storage coefficient represents the percentage of storage resources required by the online task of the specified type in the low peak period of flow;
and determining the idle storage resources of the online task of the specified type according to the storage coefficient.
In another embodiment of the present disclosure, the constructing an elastic blending resource pool according to the resource idle by the online task of the specified type includes:
setting a first IP (Internet Protocol) address and a first port number for the computing resource of the specified type of the online task in idle, and setting a second IP address and a second port number for the storage resource of the specified type of the online task in idle;
establishing a first corresponding relation between the computing resources of the online task of the specified type and the first IP address and the first port number, and establishing a second corresponding relation between the storage resources of the online task of the specified type and the second IP address and the second port number;
and constructing the elastic mixed resource pool based on the first corresponding relation and the second corresponding relation.
In another embodiment of the present disclosure, the invoking the resource of the corresponding type in the elastic blending resource pool to execute the offline task of the specified type includes:
distributing a corresponding IP address and a port number for the offline task of the specified type according to the resource type required by the offline task of the specified type;
and calling the corresponding type of resources in the elastic step-mixing resource pool to execute the specified type of offline tasks based on the allocated IP address and the allocated port number.
In another embodiment of the present disclosure, after the invoking the resource of the corresponding type in the elastic blending resource pool to execute the offline task of the specified type, the method further includes:
and when the online task of the specified type is in the peak period of the flow, stopping executing the offline task of the specified type, and returning the resources in the elastic mixed distribution resource pool to the online task of the specified type.
In another embodiment of the present disclosure, the online task of the specified type includes an inference task in deep learning, and the offline task of the specified type includes at least one of a training task, an analysis task, and an extraction task in deep learning.
In a second aspect, an apparatus for scheduling resources is provided, the apparatus comprising:
the construction module is used for constructing an elastic mixed resource pool according to idle resources of the online tasks of the specified type when the online tasks of the specified type are in the low peak period of the flow;
the determining module is used for determining the resource type required by the offline task of the specified type;
and the calling module is used for calling the resources of the corresponding types in the elastic mixed resource pool to execute the off-line tasks of the specified types.
In another embodiment of the present disclosure, the apparatus further comprises:
the acquisition module is used for acquiring a storage coefficient corresponding to the online task of the specified type, wherein the storage coefficient represents the percentage of storage resources required by the online task of the specified type in the low peak period of flow;
and the determining module is used for determining the idle storage resources of the online tasks of the specified type according to the storage coefficient.
In another embodiment of the present disclosure, the building module is configured to set a first IP address and a first port number for a computing resource idle by the online task of the specified type, and set a second IP address and a second port number for a storage resource idle by the online task of the specified type; establishing a first corresponding relation between the computing resources of the online task of the specified type and the first IP address and the first port number, and establishing a second corresponding relation between the storage resources of the online task of the specified type and the second IP address and the second port number; and constructing the elastic mixed resource pool based on the first corresponding relation and the second corresponding relation.
In another embodiment of the present disclosure, the invoking module is configured to allocate a corresponding IP address and port number to the offline task of the specified type according to a resource type required by the offline task of the specified type; and calling the corresponding type of resources in the elastic step-mixing resource pool to execute the specified type of offline tasks based on the allocated IP address and the allocated port number.
In another embodiment of the present disclosure, the apparatus further comprises:
and the stopping module is used for stopping executing the off-line task of the specified type when the on-line task of the specified type is in the peak period of flow, and returning the resources in the elastic mixed resource pool to the on-line task of the specified type.
In another embodiment of the present disclosure, the online task of the specified type includes an inference task in deep learning, and the offline task of the specified type includes at least one of a training task, an analysis task, and an extraction task in deep learning.
In a third aspect, a server is provided, which includes a processor and a memory, where at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the resource scheduling method according to the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement the resource scheduling method according to the first aspect.
The technical scheme provided by the embodiment of the disclosure has the following beneficial effects:
the online tasks and the offline tasks are divided into different types, when the online tasks are in the low peak period of flow, the same type of offline tasks are processed by using the idle resources of the online tasks, and as the resource types depended on by the same type of tasks are the same and the resource types required by the same type of offline tasks are scheduled, the reasonable utilization of resources can be realized from the resource granularity, and the utilization rate of the resources is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a system architecture diagram according to a resource scheduling method provided by an embodiment of the present disclosure;
fig. 2 is a flowchart of a resource pool creation mechanism of a resource scheduling method according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a resource scheduling method provided by an embodiment of the present disclosure;
fig. 4 is a flowchart of another resource scheduling method provided by the embodiment of the present disclosure;
fig. 5 is a schematic diagram of an elastic storage mechanism involved in a resource scheduling method provided by an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a resource scheduling apparatus according to an embodiment of the present disclosure;
fig. 7 is an illustration of a server for resource scheduling in accordance with an example embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
It is to be understood that the terms "each," "a plurality," and "any" and the like, as used in the embodiments of the present disclosure, are intended to encompass two or more, each referring to each of the corresponding plurality, and any referring to any one of the corresponding plurality. For example, the plurality of words includes 10 words, and each word refers to each of the 10 words, and any word refers to any one of the 10 words.
Referring to fig. 1, a system architecture diagram related to a resource scheduling method provided by the embodiment of the present disclosure is shown, and referring to fig. 1, the system includes a user front-end interface, a database, a task manager, a resource management module, and the like.
The user front-end interface is used for a user to submit tasks, check the tasks, manage the tasks and the like, wherein the tasks comprise online tasks and offline tasks. When the task is submitted to the system, if the task is an online task, the system executes the task immediately, and if the task is an offline task, the system does not execute the offline task immediately but stores the offline task in the database in order to ensure that the online task can be smoothly performed.
The database may be a relational database for storing offline tasks to be performed.
The task manager is used for judging the task type of the offline task and further scheduling resources according to the task type of the offline task. Specifically, the task manager judges the resource type required by the offline task according to the task type of the offline task, and further divides the offline task into task0 and task1 according to the resource type required by the offline task, wherein the resource type includes a computing resource and a storage resource, and task0 and task1 are tasks that consume the computing resource and the storage resource, respectively. Then, the task manager allocates corresponding IP addresses to task0 and task1, for example, the IP addresses allocated to task0 are IP0 and IP1, the IP addresses allocated to task1 are IP2 and IP3, and based on the allocated IP addresses, the computing resources or the storage resources can be called to execute the offline task.
The resource management module is used for managing online resources, and the management comprises application and release of the resources and the like. When an online task is in a low peak period of traffic, a resource management module determines the online task (e.g., APPkey0, APPkey1, etc.) supporting mixed distribution, and reserves a minimum resource for maintaining stable service operation for the online task, and then collects the idle resources of the online task. When the online task is in the peak period of the flow, the resource management module returns the resources in the elastic mixed resource pool to the online task to which the resources originally belong according to the corresponding relation among the IP address, the port number and the resources, so that the resources can continuously execute the online task to ensure that the online task can be smoothly executed. In the whole resource scheduling process, the resources still belong to the original service, so the resources can be returned to the online task in time.
Fig. 2 is a flowchart of a resource pool creation mechanism in a resource scheduling method provided by an embodiment of the present disclosure, referring to fig. 2, when a user views, submits, manages and the like the tasks based on the JavaAPI provided by the user front-end interface of the interactive language, the user front-end interface acquires the tasks operated by the user, if the task is an online task, the online task is directly executed, and if the task is an offline task, the offline task is sent to a guessing engine (GuesseEngine), when the online task is in the low peak period of the flow, the Avatar triggers the name server to execute the scheduling operation of the resource, the resource idle by the online task is deleted from the name server, and constructing an elastic mixed resource, and further sending an IP address and a port corresponding to the resource to a guess engine, after acquiring the IP address and the port number of the resource provided by the name server, the guessing engine calls the resource in the corresponding instance of the online task to execute the task based on the IP address and the port number; when the online task is in the peak period of the flow, the Avatar triggers the name server to forbid executing the scheduling operation of the resource, so that the IP address and the port of the resource cannot receive the offline task, and the online task is executed.
An embodiment of the present disclosure provides a resource scheduling method, referring to fig. 3, a method flow provided by the embodiment of the present disclosure includes:
301. and when the online tasks of the specified type are in the low peak period of the flow, constructing an elastic mixed resource pool according to idle resources of the online tasks of the specified type.
302. The type of resources required for the specified type of offline task is determined.
303. And calling the corresponding type of resources in the elastic mixed resource pool to execute the specified type of offline tasks.
The method provided by the implementation of the disclosure divides the online tasks and the offline tasks into different types, and when the online tasks are in the low peak period of the flow, the idle resources of the online tasks are adopted to process the offline tasks of the same type.
In another embodiment of the present disclosure, before constructing the elastic blending resource pool according to the resource idle by the online task of the specified type, the method further includes:
acquiring a storage coefficient corresponding to the online task of the specified type, wherein the storage coefficient represents the percentage of storage resources required by the online task of the specified type in the low peak period of the flow;
and determining the idle storage resources of the online tasks of the specified type according to the storage coefficient.
In another embodiment of the present disclosure, constructing an elastic blending resource pool according to a resource idle by an online task of a specified type includes:
setting a first IP address and a first port number for a computing resource idle by an online task of a specified type, and setting a second IP address and a second port number for a storage resource idle by the online task of the specified type;
establishing a first corresponding relation between computing resources of the online tasks of the specified type and the first IP address and the first port number, and establishing a second corresponding relation between storage resources of the online tasks of the specified type and the second IP address and the second port number;
and constructing an elastic mixed resource pool based on the first corresponding relation and the second corresponding relation.
In another embodiment of the present disclosure, invoking a resource of a corresponding type in the elastic hybridization resource pool to execute an offline task of a specified type includes:
allocating corresponding IP addresses and port numbers for the offline tasks of the specified type according to the resource types required by the offline tasks of the specified type;
and calling the corresponding type of resources in the elastic asynchronous resource pool to execute the specified type of offline tasks based on the allocated IP address and the allocated port number.
In another embodiment of the present disclosure, after invoking the resource of the corresponding type in the elastic blending resource pool to execute the offline task of the specified type, the method further includes:
and when the online task of the specified type is in the peak period of the flow, stopping executing the offline task of the specified type, and returning the resources in the elastic mixed resource pool to the online task of the specified type.
In another embodiment of the present disclosure, the online task of the specified type includes an inference task in deep learning, and the offline task of the specified type includes at least one of a training task, an analysis task, and an extraction task in deep learning.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
The embodiment of the present disclosure provides a resource scheduling method, taking a server to execute the embodiment of the present disclosure as an example, referring to fig. 4, a flow of the method provided by the embodiment of the present disclosure includes:
401. and when the online tasks of the specified type are in the low peak period of the flow, the server constructs an elastic mixed resource pool according to idle resources of the online tasks of the specified type.
In the embodiment of the disclosure, the deep learning task is divided into a training task, an analysis task, an extraction task and an inference task according to the task content of the deep learning task, wherein the training task, the analysis task and the extraction task are offline tasks, and the inference task is an online task. The training task is mainly used for training various models required by online service or offline service; the analysis task is used for analyzing the features extracted in the model training process, optimizing the model structure related in the model training process and the like; the extraction task is used for extracting features required in the model training process; the reasoning task is used for carrying out reasoning calculation and the like on line. The specified type in the embodiment of the present disclosure mainly refers to a recalculation type, the online task of the specified type includes an inference task in deep learning, and the offline task of the specified type includes at least one of a training task, an analysis task and an extraction task in deep learning. In an application scenario, the embodiment of the disclosure can execute a training task, an analysis task, and an extraction task on resources left unused by an inference task in a deep learning task.
The resources described in the embodiments of the present disclosure include computing resources and storage resources, where the computing resources include CPU resources, GPU (Graphics Processing Unit) resources, and the like, and the storage resources include memory resources, hard disk resources, and the like. For the online tasks of the designated type and the offline tasks of the designated type, the embodiment of the disclosure adopts a time-sharing multiplexing elastic storage mechanism, stores the online tasks by setting different storage coefficients and adopting different memory resources and hard disk resources with different proportions at different time periods, and dynamically adjusts the storage coefficients of the online tasks according to the change of the online tasks. Wherein the storage factor represents the percentage of storage resources required for a given type of online task at low peak periods of traffic. Since the storage resources include memory resources and hard disk resources, the storage coefficients also include memory storage coefficients and hard disk storage coefficients. The memory storage coefficients and hard disk storage coefficients may be set by a technician based on past experience. The server will also store the stored coefficients for subsequent use.
In addition, because the flow rate of the specified type of online task in the low peak period is not fixed, in order to ensure that the specified type of online task can be smoothly executed, the storage coefficient corresponding to the specified type of online task is also adjusted accordingly.
By adopting the time-sharing multiplexing elastic storage mechanism provided by the embodiment of the disclosure, during the peak period of the flow, a high-occupancy-ratio memory or a model for storing the online task in a full-memory mode can be called to reduce the delay of the online task; and in the low peak period of the flow, partial memory resources can be made available to the offline task so as to improve the utilization rate of the resources. Since the online task is in the low peak period of the flow, even if part of the memory resources are given out to the offline task, the performance will not be significantly affected, and conversely, the given out part of the memory resources can also improve the utilization rate of the resources, and it can be seen that the adoption of the elastic storage mechanism with time division multiplexing can realize the balance between the delay of the online task and the memory consumption of the offline task.
Based on the time-sharing multiplexing elastic storage mechanism, when the online task of the specified type is in the low peak period of the flow, the server can determine the idle storage resource of the online resource of the specified type, and then construct an elastic mixed resource pool based on the idle storage resource. Specifically, when determining the idle storage resources of the online task of the specified type, the server may obtain the storage coefficient corresponding to the online task of the specified type, and further determine the idle storage resources of the online task of the specified type according to the storage coefficient. Specifically, the server multiplies the storage coefficient by a storage resource corresponding to the online task of the specified type based on the determined storage coefficient to obtain a storage resource required by the online task of the specified type, and then removes the storage resource required by the online task of the specified type from the storage resource corresponding to the online task of the specified type to obtain an idle storage resource of the online task of the specified type. In the process, the server removes the memory resources required by the online tasks of the specified type from the memory resources corresponding to the online tasks of the specified type, and removes the hard disk resources required by the online tasks of the specified type from the hard disk resources corresponding to the online tasks of the specified type, so as to obtain the idle storage resources of the online tasks of the specified type.
Fig. 5 shows an elastic storage mechanism involved in the resource scheduling method provided by the embodiment of the present disclosure, referring to fig. 5, when the online task of the specified type is in a peak period of a flow, a memory storage coefficient is set to 100% and a hard disk storage coefficient is set to 0%, by this setting manner, all memories are used for online calculation, so as to increase a calculation speed of the online task and reduce a delay of the online task; when the online task of the specified type is in the low peak period of the flow, the memory storage coefficient is set to be 20% and the hard disk storage coefficient is set to be 80%.
In the embodiment of the present disclosure, when the server constructs the elastic mixed resource pool according to the idle resources of the online tasks of the specified type, the following method may be adopted:
4011. the server sets a first IP address and a first port number for the computing resources idle by the online tasks of the specified type, and sets a second IP address and a second port number for the storage resources idle by the online tasks of the specified type.
In order to facilitate management of idle computing resources and storage resources of the specified type of online task, when the specified type of online task is in a peak flow period, the idle resources in a low peak flow period can be timely returned to the specified type of online task, and the server also sets a corresponding IP address and a port number for the idle resources of the specified type of online task. Specifically, the server may set a first IP address and a first port number for computing resources idle by the specified type of online task, and set a second IP address and a second port number for storage resources idle by the specified type of online task.
Based on the set IP address and the set port number, the server can call the resource corresponding to the IP address and the port number to execute the specified type of offline task by sending a task execution request to the corresponding IP address and the port number.
4012. The server establishes a first corresponding relation between the computing resources of the online tasks of the specified type and the first IP address and the first port number, and establishes a second corresponding relation between the storage resources of the online tasks of the specified type and the second IP address and the second port number.
The server can establish a first corresponding relation between the computing resources of the online tasks of the specified type and the first IP address and the first port number based on the first IP address and the first port number which are set for the computing resources of the online tasks of the specified type; based on the second IP address and the second port number set for the storage resource of the online task of the specified type, the server can establish a second corresponding relationship between the storage resource of the online task of the specified type and the second IP address and the second port number.
4013. And the server constructs an elastic mixed resource pool based on the first corresponding relation and the second corresponding relation.
The resources in the elastic blending resource pool in the embodiment of the disclosure can execute both the online tasks of the specified type and the offline tasks of the specified type, the resources in the elastic blending resource pool are used for processing the offline tasks during the low peak period of the flow, and the resources in the elastic blending resource pool are returned to the online tasks of the specified type during the high peak period of the flow so as to process the online tasks of the specified type.
402. The server determines the type of resources needed for the specified type of offline task.
Considering that resources consumed by tasks of the same type in processing a specific business may also be different, for example, resources required by a deep learning training task in performing model training include computing resources and storage resources, and resources required by a deep learning extraction task in extracting features of a model are computing resources, but although both of the computing resources belong to a recalculation type task, resource types of resources consumed by the two tasks in a process of actually processing a business are different. Therefore, in order to improve the utilization rate of resources, the embodiment of the present disclosure further determines the resource type required by the offline task of the specified type according to the task content of the offline task of the specified type, and then schedules the resources in the elastic blending resource pool according to the resource type required by the offline task of the specified type.
403. And the server calls the resources of the corresponding type in the elastic mixed resource pool to execute the offline task of the specified type.
In an embodiment of the present disclosure, since the elastic hash resource pool stores a first corresponding relationship between a computing resource of an online task of a specified type and a first IP address and a first port number, and a second corresponding relationship between a storage resource of an online task of a specified type and a second IP address and a second port number, when the server calls a resource of a corresponding type in the elastic hash resource pool to execute an offline task of a specified type, the server may allocate a corresponding IP address and a port number to the offline task of the specified type according to a resource type required by the offline task of the specified type, and further call a resource of a corresponding type in the elastic hash resource pool to execute the offline task of the specified type based on the allocated IP address and port number.
In another embodiment of the present disclosure, considering that the task attribute will also affect the execution, when the server calls the resource of the corresponding type in the elastic blending resource pool to execute the offline task of the specified type, the server will also execute the offline task of the specified type in combination with the task attribute of the offline task of the specified type, wherein the task attribute includes whether the offline task is urgent or not, the consumed time, and the like. For example, if a certain specified type of offline task is urgent, the specified type of offline task needs to be executed preferentially; for another example, if a certain specified type of offline task takes a long time, before executing the offline task, it is necessary to detect whether a resource whose usage time exceeds the time consumed by the specified type of offline task exists in the elastic blending resource pool, and if a resource whose usage time exceeds the time consumed by the specified type of offline task exists in the elastic blending resource pool, the resource is called to execute the specified type of offline task.
404. And when the online task of the specified type is in the peak period of the flow, the server stops executing the offline task of the specified type and returns the resources in the elastic mixed resource pool to the online task of the specified type.
When the online task of the specified type is in the peak period of the flow, in order to ensure that the online task of the specified type can be smoothly executed, the server prohibits sending a task processing request to the IP address and the port number allocated by the offline task of the specified type, so that the resource in the elastic mixed resource pool is stopped from being called to execute the offline task of the specified type.
Further, after stopping executing the offline task of the specified type, the server returns the resources in the elastic blending resource pool to the online task of the specified type, so that the resources in the elastic blending resource pool execute the online task of the specified type.
According to the method provided by the embodiment of the disclosure, the online task and the offline task are divided into different types, when the online task is in the low peak period of the flow, the idle resources of the online task are adopted to process the offline task of the same type, and as the resource types depended on by the tasks of the same type are the same and the resource scheduling is performed on the resource types required by the offline task of the same type during the scheduling, the reasonable utilization of the resources can be realized from the resource granularity, so that the utilization rate of the resources is greatly improved.
Referring to fig. 6, an embodiment of the present disclosure provides a resource scheduling apparatus, including:
the construction module 601 is configured to construct an elastic blending resource pool according to idle resources of the specified type of online task when the specified type of online task is in a low peak period of a flow;
a determining module 602, configured to determine a resource type required by the offline task of the specified type;
the invoking module 603 is configured to invoke resources of corresponding types in the elastic blending resource pool to execute an offline task of a specified type.
In another embodiment of the present disclosure, the apparatus further comprises:
the acquisition module is used for acquiring a storage coefficient corresponding to the online task of the specified type, wherein the storage coefficient represents the percentage of storage resources required by the online task of the specified type in the low peak period of the flow;
and the determining module is used for determining the idle storage resources of the online tasks of the specified type according to the storage coefficient.
In another embodiment of the present disclosure, the building module is configured to set a first IP address and a first port number for a computing resource that is idle for a specified type of online task, and set a second IP address and a second port number for a storage resource that is idle for the specified type of online task; establishing a first corresponding relation between computing resources of the online tasks of the specified type and the first IP address and the first port number, and establishing a second corresponding relation between storage resources of the online tasks of the specified type and the second IP address and the second port number; and constructing an elastic mixed resource pool based on the first corresponding relation and the second corresponding relation.
In another embodiment of the present disclosure, the invoking module is configured to allocate a corresponding IP address and port number to the offline task of the specified type according to a resource type required by the offline task of the specified type; and calling the corresponding type of resources in the elastic asynchronous resource pool to execute the specified type of offline tasks based on the allocated IP address and the allocated port number.
In another embodiment of the present disclosure, the apparatus further comprises:
and the stopping module is used for stopping executing the off-line task of the specified type when the on-line task of the specified type is in the peak period of the flow, and returning the resources in the elastic mixed resource pool to the on-line task of the specified type.
In another embodiment of the present disclosure, the online task of the specified type includes an inference task in deep learning, and the offline task of the specified type includes at least one of a training task, an analysis task, and an extraction task in deep learning.
To sum up, the device provided in the embodiment of the present disclosure divides the online task and the offline task into different types, and when the online task is in the low peak of the flow, the resource left unused by the online task is used to process the offline task of the same type.
Fig. 7 is an illustration of a server for resource scheduling in accordance with an example embodiment. Referring to fig. 7, server 700 includes a processing component 722 that further includes one or more processors and memory resources, represented by memory 732, for storing instructions, such as applications, that are executable by processing component 722. The application programs stored in memory 732 may include one or more modules that each correspond to a set of instructions. Further, the processing component 722 is configured to execute instructions to perform the functions performed by the server in the resource scheduling methods described above.
The server 700 may also include a power component 726 configured to perform power management of the server 700, a wired or wireless network interface 750 configured to connect the server 700 to a network, and an input output (I/O) interface 758. The Server 700 may operate based on an operating system, such as Windows Server, stored in a memory 732TM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTMOr the like.
The disclosed embodiments provide a computer readable storage medium having at least one program code stored therein, the at least one program code being loaded and executed by a processor to implement a resource scheduling method. The computer readable storage medium may be non-transitory. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is intended to be exemplary only and not to limit the present disclosure, and any modification, equivalent replacement, or improvement made without departing from the spirit and scope of the present disclosure is to be considered as the same as the present disclosure.

Claims (10)

1. A method for scheduling resources, the method comprising:
when the online task of the specified type is in the low peak period of the flow, constructing an elastic mixed resource pool according to the idle resources of the online task of the specified type;
determining the resource type required by the offline task of the specified type;
and calling the resources of the corresponding type in the elastic mixed resource pool to execute the offline task of the specified type.
2. The method according to claim 1, wherein before constructing the elastic blending resource pool according to the resource idle by the online task of the specified type, the method further comprises:
acquiring a storage coefficient corresponding to the online task of the specified type, wherein the storage coefficient represents the percentage of storage resources required by the online task of the specified type in the low peak period of flow;
and determining the idle storage resources of the online task of the specified type according to the storage coefficient.
3. The method of claim 1, wherein constructing the elastic blending resource pool according to the resource idle by the online task of the specified type comprises:
setting a first IP address and a first port number for the computing resource idle by the online task of the specified type, and setting a second IP address and a second port number for the storage resource idle by the online task of the specified type;
establishing a first corresponding relation between the computing resources of the online task of the specified type and the first IP address and the first port number, and establishing a second corresponding relation between the storage resources of the online task of the specified type and the second IP address and the second port number;
and constructing the elastic mixed resource pool based on the first corresponding relation and the second corresponding relation.
4. The method of claim 3, wherein the invoking the corresponding type of resource in the elastic hybridization resource pool to perform the specified type of offline task comprises:
distributing a corresponding IP address and a port number for the offline task of the specified type according to the resource type required by the offline task of the specified type;
and calling the corresponding type of resources in the elastic step-mixing resource pool to execute the specified type of offline tasks based on the allocated IP address and the allocated port number.
5. The method according to claim 1, wherein after the invoking the corresponding type of resource in the elastic hybridization resource pool to execute the offline task of the specified type, further comprises:
and when the online task of the specified type is in the peak period of the flow, stopping executing the offline task of the specified type, and returning the resources in the elastic mixed distribution resource pool to the online task of the specified type.
6. The method according to any one of claims 1 to 5, wherein the online tasks of the specified type comprise inference tasks in deep learning, and the offline tasks of the specified type comprise at least one of training tasks, analysis tasks and extraction tasks in deep learning.
7. An apparatus for scheduling resources, the apparatus comprising:
the construction module is used for constructing an elastic mixed resource pool according to idle resources of the online tasks of the specified type when the online tasks of the specified type are in the low peak period of the flow;
the determining module is used for determining the resource type required by the offline task of the specified type;
and the calling module is used for calling the resources of the corresponding types in the elastic mixed resource pool to execute the off-line tasks of the specified types.
8. The apparatus of claim 7, wherein the build module is configured to set a first IP address and a first port number for the computing resources that are idle for the specified type of online task, and to set a second IP address and a second port number for the storage resources that are idle for the specified type of online task; establishing a first corresponding relation between the computing resources of the online task of the specified type and the first IP address and the first port number, and establishing a second corresponding relation between the storage resources of the online task of the specified type and the second IP address and the second port number; and constructing the elastic mixed resource pool based on the first corresponding relation and the second corresponding relation.
9. A server, characterized in that the server comprises a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the resource scheduling method according to any one of claims 1 to 6.
10. A computer-readable storage medium, having stored therein at least one program code, which is loaded and executed by a processor, to implement the resource scheduling method according to any one of claims 1 to 6.
CN202110368376.8A 2021-04-06 2021-04-06 Resource scheduling method, device, server and computer readable storage medium Withdrawn CN113515355A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110368376.8A CN113515355A (en) 2021-04-06 2021-04-06 Resource scheduling method, device, server and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110368376.8A CN113515355A (en) 2021-04-06 2021-04-06 Resource scheduling method, device, server and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113515355A true CN113515355A (en) 2021-10-19

Family

ID=78061750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110368376.8A Withdrawn CN113515355A (en) 2021-04-06 2021-04-06 Resource scheduling method, device, server and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113515355A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113886094A (en) * 2021-12-07 2022-01-04 浙江大云物联科技有限公司 Resource scheduling method and device based on edge calculation

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160364263A1 (en) * 2015-06-15 2016-12-15 International Business Machines Corporation Managed services coordinator
CN109412874A (en) * 2018-12-21 2019-03-01 腾讯科技(深圳)有限公司 Configuration method, device, server and the storage medium of device resource
CN109739627A (en) * 2018-12-26 2019-05-10 上海连尚网络科技有限公司 Dispatching method, electronic equipment and the medium of task
CN112199194A (en) * 2020-10-14 2021-01-08 广州虎牙科技有限公司 Container cluster-based resource scheduling method, device, equipment and storage medium
CN112486648A (en) * 2020-11-30 2021-03-12 北京百度网讯科技有限公司 Task scheduling method, device, system, electronic equipment and storage medium
CN112559182A (en) * 2020-12-16 2021-03-26 北京百度网讯科技有限公司 Resource allocation method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160364263A1 (en) * 2015-06-15 2016-12-15 International Business Machines Corporation Managed services coordinator
CN109412874A (en) * 2018-12-21 2019-03-01 腾讯科技(深圳)有限公司 Configuration method, device, server and the storage medium of device resource
CN109739627A (en) * 2018-12-26 2019-05-10 上海连尚网络科技有限公司 Dispatching method, electronic equipment and the medium of task
CN112199194A (en) * 2020-10-14 2021-01-08 广州虎牙科技有限公司 Container cluster-based resource scheduling method, device, equipment and storage medium
CN112486648A (en) * 2020-11-30 2021-03-12 北京百度网讯科技有限公司 Task scheduling method, device, system, electronic equipment and storage medium
CN112559182A (en) * 2020-12-16 2021-03-26 北京百度网讯科技有限公司 Resource allocation method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113886094A (en) * 2021-12-07 2022-01-04 浙江大云物联科技有限公司 Resource scheduling method and device based on edge calculation
CN113886094B (en) * 2021-12-07 2022-04-26 浙江大云物联科技有限公司 Resource scheduling method and device based on edge calculation

Similar Documents

Publication Publication Date Title
CN109034396B (en) Method and apparatus for processing deep learning jobs in a distributed cluster
US10884801B2 (en) Server resource orchestration based on application priority
CN111367630A (en) Multi-user multi-priority distributed cooperative processing method based on cloud computing
CN103365713A (en) Resource dispatch and management method and device
US10884800B2 (en) Server resource balancing using a suspend-resume strategy
CN110351384A (en) Big data platform method for managing resource, device, equipment and readable storage medium storing program for executing
CN103927225A (en) Multi-core framework Internet information processing and optimizing method
US11307898B2 (en) Server resource balancing using a dynamic-sharing strategy
US11042402B2 (en) Intelligent server task balancing based on server capacity
CN107515809A (en) A kind of elastic telescopic method and system of power system
CN109800092A (en) A kind of processing method of shared data, device and server
CN115543615A (en) Resource allocation method and device, electronic equipment and storage medium
CN111158888A (en) Multi-task scheduling method and device
CN114721818A (en) Kubernetes cluster-based GPU time-sharing method and system
Hung et al. Task scheduling for optimizing recovery time in cloud computing
CN113515355A (en) Resource scheduling method, device, server and computer readable storage medium
CN108536518A (en) Method and system, reference platform, service terminal and the memory of task scheduling
CN111274018A (en) Distributed training method based on DL framework
Hu et al. An optimal resource allocator of elastic training for deep learning jobs on cloud
CN115421920A (en) Task management method and device for financial product, electronic equipment and storage medium
US8561077B1 (en) Binder for a multi-threaded process to access an un-shareable resource
CN114385351A (en) Cloud management platform load balancing performance optimization method, device, equipment and medium
CN114489978A (en) Resource scheduling method, device, equipment and storage medium
US20230161620A1 (en) Pull mode and push mode combined resource management and job scheduling method and system, and medium
Thai et al. Algorithms for optimising heterogeneous Cloud virtual machine clusters

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20211019

WW01 Invention patent application withdrawn after publication