CN111309468A - Resource scheduling method, device and storage medium - Google Patents

Resource scheduling method, device and storage medium Download PDF

Info

Publication number
CN111309468A
CN111309468A CN202010122291.7A CN202010122291A CN111309468A CN 111309468 A CN111309468 A CN 111309468A CN 202010122291 A CN202010122291 A CN 202010122291A CN 111309468 A CN111309468 A CN 111309468A
Authority
CN
China
Prior art keywords
resource scheduling
pool
processing
processing performance
units
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
CN202010122291.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.)
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Cloud Computing Beijing 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 Tencent Cloud Computing Beijing Co Ltd filed Critical Tencent Cloud Computing Beijing Co Ltd
Priority to CN202010122291.7A priority Critical patent/CN111309468A/en
Publication of CN111309468A publication Critical patent/CN111309468A/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/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a resource scheduling method, a resource scheduling device and a storage medium; the method comprises the following steps: receiving a processing request aiming at a target service; responding to the processing request, generating at least two processing tasks corresponding to the target service, wherein the processing tasks are in one-to-one correspondence with resource scheduling pools, and the resource scheduling pools comprise resource scheduling units for executing the processing tasks; respectively determining the processing performance of the resource scheduling pool corresponding to each processing task, wherein the processing performance is used for representing the processing efficiency of the corresponding resource scheduling pool to the processing task; determining a target resource scheduling pool needing resource scheduling based on the processing performance of each resource scheduling pool; and adjusting the number of the resource scheduling units in the target resource scheduling pool so that the number meets a number condition. The invention can reasonably schedule resources.

Description

Resource scheduling method, device and storage medium
Technical Field
The present invention relates to artificial intelligence technology, and in particular, to a resource scheduling method, apparatus, and storage medium.
Background
With the rapid development of artificial intelligence technology, more and more artificial intelligence technology is applied to practical engineering applications, such as human face checking, face brushing payment, vehicle detection and the like, and systems related to the applications often include complex algorithm processes and intensive operations. A Central Processing Unit (CPU) of the computer undertakes all computing tasks, so that CPU resources are often a performance bottleneck of the whole system, and the application cost of the project is directly influenced. The hardware environment of actual delivery and deployment is often very different, and for how to reasonably schedule resources and further fully utilize hardware resources, the related technology lacks a general and efficient solution.
Disclosure of Invention
Embodiments of the present invention provide a resource scheduling method, apparatus, device, and storage medium, which can reasonably perform resource scheduling and further fully utilize hardware resources.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides a resource scheduling method, which comprises the following steps:
receiving a processing request aiming at a target service;
responding to the processing request, generating at least two processing tasks corresponding to the target service, wherein the processing tasks are in one-to-one correspondence with resource scheduling pools, and the resource scheduling pools comprise resource scheduling units for executing the processing tasks;
respectively determining the processing performance of the resource scheduling pool corresponding to each processing task, wherein the processing performance is used for representing the processing efficiency of the corresponding resource scheduling pool to the processing task;
determining a target resource scheduling pool needing resource scheduling based on the processing performance of each resource scheduling pool;
and adjusting the number of the resource scheduling units in the target resource scheduling pool so that the number meets a number condition.
An embodiment of the present invention provides a resource scheduling apparatus, including:
the receiving module is used for receiving a processing request aiming at a target service;
a generating module, configured to generate at least two processing tasks corresponding to the target service in response to the processing request, where the processing tasks are in one-to-one correspondence with resource scheduling pools, and each resource scheduling pool includes a resource scheduling unit for executing the processing task;
a first determining module, configured to respectively determine processing performance of a resource scheduling pool corresponding to each processing task, where the processing performance is used to characterize processing efficiency of the corresponding resource scheduling pool to the processing task;
a second determining module, configured to determine, based on processing performance of each resource scheduling pool, a target resource scheduling pool that needs to perform resource scheduling;
and the adjusting module is used for adjusting the number of the resource scheduling units in the target resource scheduling pool so that the number meets the number condition.
In the foregoing solution, the first determining module is further configured to perform the following operations on each resource scheduling pool respectively:
acquiring the number of resource scheduling units in the resource scheduling pool, the number of processing tasks executed by the resource scheduling units in unit time and the number of processing tasks corresponding to the resource scheduling pool;
acquiring the product of the number of the resource scheduling units and the number of processing tasks executed by the resource scheduling units;
determining a first ratio of the product to the number of processing tasks corresponding to the resource scheduling pool, wherein the first ratio is used for representing the processing performance of the resource scheduling pool, and the magnitude of the first ratio is in positive correlation with the level of the processing performance.
In the foregoing solution, the first determining module is further configured to perform the following operations on each resource scheduling pool respectively:
acquiring the number of newly added processing tasks of the resource scheduling pool in unit time and the number of processing tasks corresponding to the resource scheduling pool;
and determining a second ratio of the number of the newly added processing tasks to the number of the processing tasks, wherein the second ratio is used for representing the processing performance of the resource scheduling pool, and the size of the second ratio and the level of the processing performance are in a negative correlation relationship.
In the above scheme, the second determining module is further configured to sort the resource scheduling pools according to a sequence from low to high of the processing performance, so as to obtain corresponding resource scheduling pool sequences;
and starting from the first resource scheduling pool in the resource scheduling pool sequence, selecting a target number of resource scheduling pools, and taking the target number of resource scheduling pools as a target resource scheduling pool needing resource scheduling.
In the above scheme, the adjusting module is further configured to obtain a first ratio of each resource scheduling pool;
and adjusting the number of the resource scheduling units in at least one resource scheduling pool of at least two resource scheduling pools corresponding to the at least two processing tasks, so that the minimum value of the first ratio accords with a first value condition.
In the above scheme, the adjusting module is further configured to obtain a second ratio of each resource scheduling pool;
and adjusting the number of the resource scheduling units in at least one resource scheduling pool of at least two resource scheduling pools corresponding to the at least two processing tasks, so that the value of the maximum second ratio accords with a second value condition.
In the foregoing solution, the adjusting module is further configured to add a first number of resource scheduling units in the target resource scheduling pool, and after the first number of resource scheduling units is added, a sum of the number of resource scheduling units in each resource scheduling pool does not exceed a second number.
In the foregoing solution, the adjusting module is further configured to reduce a third number of resource scheduling units in the resource scheduling pool whose processing performance is higher than the processing performance reference value, when the target resource scheduling pool includes a resource scheduling pool whose processing performance is lower than the processing performance reference value and a resource scheduling pool whose processing performance is higher than the processing performance reference value; and are
And adding the third number of resource scheduling units in a resource scheduling pool with the processing performance lower than the processing performance reference value.
An embodiment of the present invention provides a resource scheduling apparatus, including:
a memory for storing executable instructions;
and the processor is used for realizing the resource scheduling method provided by the embodiment of the invention when the executable instruction stored in the memory is executed.
The embodiment of the invention provides a storage medium, which stores executable instructions and is used for causing a processor to execute so as to realize the resource scheduling method provided by the embodiment of the invention.
The embodiment of the invention has the following beneficial effects:
according to the processing performance of the resource scheduling pool corresponding to each processing task, the target resource scheduling pool needing resource scheduling is determined, and the number of resource scheduling units in the target scheduling pool is adjusted, so that the processing performance of the resource scheduling pool with poor processing performance is improved, the resource scheduling can be reasonably performed, and further hardware resources are fully utilized.
Drawings
Fig. 1 is a schematic diagram of an alternative architecture of a resource scheduling system according to an embodiment of the present invention;
fig. 2 is an alternative architecture diagram of a resource scheduling system according to an embodiment of the present invention;
fig. 3 is an alternative architecture diagram of a resource scheduling system according to an embodiment of the present invention;
fig. 4 is an alternative structural diagram of a resource scheduling device according to an embodiment of the present invention;
fig. 5 is an alternative flowchart of a resource scheduling method according to an embodiment of the present invention;
fig. 6 is an alternative flowchart of a method for determining processing performance of a resource scheduling pool according to an embodiment of the present invention;
fig. 7 is an alternative flowchart of a method for determining processing performance of a resource scheduling pool according to an embodiment of the present invention;
fig. 8 is an alternative flowchart of a method for determining a target resource scheduling pool according to an embodiment of the present invention;
fig. 9 is an alternative architecture diagram of a resource scheduling system according to an embodiment of the present invention;
fig. 10 is a schematic flowchart of an alternative resource scheduling method according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a resource scheduling apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
In the description that follows, references to the terms "first \ second \ third" are intended merely to distinguish similar objects and do not denote a particular order, but rather are to be understood that the terms "first \ second \ third" may be interchanged under certain circumstances or sequences of events to enable embodiments of the invention described herein to be practiced in other than those illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
Before further detailed description of the embodiments of the present invention, terms and expressions mentioned in the embodiments of the present invention are explained, and the terms and expressions mentioned in the embodiments of the present invention are applied to the following explanations.
1) Resource scheduling pool: and each resource scheduling pool comprises a plurality of resource scheduling units, and the resource scheduling units are used for executing the same corresponding processing task. The resource scheduling pool can be a thread pool or a process pool.
2) A resource scheduling unit: the system is an independent unit for resource allocation and scheduling, and can be a process instance or a thread instance. When the resource scheduling pool is a thread pool, the corresponding resource scheduling unit is a thread instance; and when the resource scheduling pool is a process pool, the corresponding resource scheduling unit is a process instance.
3) The terminal comprises a client and an application program running in the terminal and used for providing various services, such as an instant messaging client and a shopping client.
4) In response to the condition or state on which the performed operation depends, one or more of the performed operations may be in real-time or may have a set delay when the dependent condition or state is satisfied; there is no restriction on the order of execution of the operations performed unless otherwise specified.
The inventor finds that, when implementing the resource scheduling method provided by the embodiment of the present invention, for a processing request of a target service, multiple processing tasks corresponding to the target service are often generated, and therefore, in a system design scheme based on a single thread pool, for a processing request of a target service, m processing tasks need to be passed through, and a processing result is finally returned. Referring to fig. 1, fig. 1 is an optional architecture schematic diagram of a resource scheduling system according to an embodiment of the present invention, and as shown in fig. 1, the system scheme includes a thread pool, where n thread instances are located in the thread pool, and when a system monopolizes hardware resources, a value of n is often equal to a number of hardware CPU cores in order to fully utilize the CPU resources. In practical implementation, each thread instance has a complete algorithm processing flow, so that one processing request corresponds to one thread instance to sequentially execute m processing tasks. The scheme has simple system architecture and convenient delivery implementation, but the execution task is frequently switched for each thread, although the CPU resource can be fully utilized, the overall performance benefit of the system is not high.
In order to reduce context switching inside threads and allocate computing resources more flexibly, the inventor has studied a technical solution of a multithread pool, referring to fig. 2, fig. 2 is an alternative architecture schematic diagram of a resource scheduling system provided by an embodiment of the present invention, as shown in fig. 2, the method splits different processing tasks into a plurality of thread pools, and a thread instance in each thread pool executes a single processing task. In actual implementation, after receiving a processing request for a target service, a system generates a plurality of processing tasks corresponding to the target service, allocates each processing task to a corresponding thread pool, and executes the whole algorithm processing flow, where the sum of thread instances of each thread pool is generally equal to the number of cores of a hardware CPU. Because each thread pool in the scheme is independent, and the number of thread instances in each thread pool can be configured independently, the scheme can ensure that processing tasks with large calculation amount can be divided into more calculation resources, and each thread instance executes a single calculation task, thereby avoiding context switching and having higher efficiency. However, the optimal configuration of the number of thread instances in each thread pool in the scheme depends on experience or a large number of tests, so that the performance tuning process is extremely tedious; moreover, because the performance tables of different processing tasks on CPUs of different models are different, the hardware delivery environment (CPU model, core count, etc.) of diversified target services cannot be handled, and it is difficult to make full and reasonable use of computing resources in practical applications.
In view of this, embodiments of the present invention provide a resource scheduling method, device, apparatus, and storage medium, which can reasonably perform resource scheduling and further fully utilize hardware resources. An exemplary application of the resource scheduling apparatus provided by the embodiment of the present invention is described below, and the resource scheduling apparatus provided by the embodiment of the present invention may be implemented as various types of user terminals such as a notebook computer, a tablet computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, and a portable game device). In the following, exemplary applications of the electronic device will be explained.
Referring to fig. 3, fig. 3 is an alternative architecture diagram of the resource scheduling system 100 according to the embodiment of the present invention, in order to support a resource scheduling application, a terminal 400 (exemplary terminals 400-1 and 400-2 are shown) is connected to a backend server 200 through a network 300, where the network 300 may be a wide area network or a local area network, or a combination of the two networks.
In practical application, the terminal is configured to provide service data of a target service to the background server, for example, in application of a personal verification technology, a collection device is required to collect a frame image of an object to be verified, the collection device may be in a form of a dedicated collection device client (APP, Native APP), or may be in a form of an applet (Web APP), for example, the terminal 400 is provided with the collection device, and is configured to collect service data of the target service and send a processing request carrying the service data for the target service to the background server 200, and the background server 200 is configured to receive the processing request for the target service; responding to the processing request, and generating at least two processing tasks corresponding to the target service; respectively determining the processing performance of the resource scheduling pool corresponding to each processing task; determining a target resource scheduling pool needing resource scheduling based on the processing performance of each resource scheduling pool; and adjusting the number of the resource scheduling units in the target resource scheduling pool so that the number meets the number condition.
Referring to fig. 4, fig. 4 is a schematic diagram of an alternative structure of a resource scheduling apparatus 500 according to an embodiment of the present invention, where the resource scheduling apparatus 500 shown in fig. 4 includes: at least one processor 510, memory 550, at least one network interface 520, and a user interface 530. The various components in the transmission facility 500 of traffic data are coupled together by a bus system 540. It is understood that the bus system 540 is used to enable communications among the components. The bus system 540 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 540 in fig. 4.
The Processor 510 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The user interface 530 includes one or more output devices 531 enabling presentation of media content, including one or more speakers and/or one or more visual display screens. The user interface 530 also includes one or more input devices 532, including user interface components to facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. Memory 550 optionally includes one or more storage devices physically located remote from processor 510.
The memory 550 may comprise volatile memory or nonvolatile memory, and may also comprise both volatile and nonvolatile memory. The nonvolatile memory may be a Read Only Memory (ROM), and the volatile memory may be a Random Access Memory (RAM). The memory 550 described in connection with embodiments of the invention is intended to comprise any suitable type of memory.
In some embodiments, memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as exemplified below.
An operating system 551 including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
a network communication module 552 for communicating to other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including: bluetooth, wireless compatibility authentication (WiFi), and Universal Serial Bus (USB), etc.;
a presentation module 553 for enabling presentation of information (e.g., a user interface for operating peripherals and displaying content and information) via one or more output devices 531 (e.g., a display screen, speakers, etc.) associated with the user interface 530;
an input processing module 554 to detect one or more user inputs or interactions from one of the one or more input devices 532 and to translate the detected inputs or interactions.
In some embodiments, the resource scheduling apparatus provided by the embodiments of the present invention may be implemented in software, and fig. 4 shows an apparatus 555 stored in a memory 550, which may be software in the form of programs and plug-ins, and includes the following software modules: the receiving module 5551, the generating module 5552, the first determining module 5553, the second determining module 5554 and the adjusting module 5555 are logical and thus can be arbitrarily combined or further split according to the implemented functions.
The functions of the respective modules will be explained below.
In other embodiments, the resource scheduling apparatus provided in the embodiments of the present invention may be implemented in hardware, and for example, the resource scheduling apparatus provided in the embodiments of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the resource scheduling method provided in the embodiments of the present invention, for example, the processor in the form of the hardware decoding processor may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), or other electronic components.
Methods of implementing embodiments of the present invention will be described in connection with the foregoing exemplary application and practice of apparatus embodying embodiments of the present invention.
Referring to fig. 5, fig. 5 is an alternative flowchart of a resource scheduling method according to an embodiment of the present invention, and will be described with reference to the steps shown in fig. 5.
Step 101: the background server receives a processing request aiming at the target service.
In practical application, technologies such as human face body checking, face brushing payment and vehicle detection are widely applied to practical engineering application, for example, the human face body checking is widely applied to industries such as finance, internet and education due to the fact that the human face body checking can check the authenticity of user information; the system is mainly applied to remote user identity verification and confirmation in the financial industry, and is mainly applied to APP needing real-name authentication in the Internet industry, such as auditing of anchor real identities in live video, verifying of real identities of drivers and passengers in a network appointment platform and the like.
In actual implementation, if a target service is to be processed, related service data needs to be provided, the acquisition of the service data can be implemented through an acquisition device APP arranged on a terminal, after the acquisition device APP acquires the service data of the target service, a processing request carrying the service data is sent to a background server, and the background server receives the processing request for the target service to perform subsequent processing.
Step 102: at least two processing tasks corresponding to the target service are generated in response to the processing request.
In actual implementation, after receiving a processing request sent by a terminal, a background server parses the processing request to obtain service data corresponding to a target service, generates a plurality of corresponding processing tasks based on the service data, and allocates a resource scheduling pool to each processing task, each resource scheduling pool includes a plurality of resource scheduling units, and processes the corresponding processing tasks through the plurality of resource scheduling units in the resource scheduling pool, that is, the processing tasks and the resource scheduling pools are in a one-to-one correspondence, and the resource scheduling pool includes resource scheduling units for executing the corresponding processing tasks.
For example, for the technology of human face nuclear, which relates to processes of identification card identification, living body detection, human face comparison and the like, the background server responds to a processing request for human face nuclear service, and first generates a plurality of processing tasks for the human face nuclear service, namely a processing task of identification card identification, a processing task of living body detection and a processing task of human face comparison; and then allocating an asset dispatching pool A to the processing task identified by the identity card, allocating an asset dispatching pool B to the processing task detected by the living body and allocating an asset dispatching pool C to the processing task compared with the human face, and according to actual requirements, respectively setting n1 resource dispatching units to the asset dispatching pool A, setting n2 resource dispatching units to the asset dispatching pool B and setting n3 resource dispatching units to the asset dispatching pool C.
Step 103: and respectively determining the processing performance of the resource scheduling pool corresponding to each processing task.
The processing performance is used for representing the processing efficiency of the corresponding resource scheduling pool to the processing task.
Here, the overall processing performance of the system is determined by the processing performance of each resource scheduling pool, and in actual implementation, the obtaining manner of the processing performance of each resource scheduling pool is the same, referring to fig. 6, fig. 6 is an optional flowchart of the method for determining the processing performance of the resource scheduling pool provided by the embodiment of the present invention, and in some embodiments, step 103 shown in fig. 5 may be implemented by respectively executing steps 1031 and 1033 shown in fig. 6 on each resource scheduling pool:
step 1031: and acquiring the number of resource scheduling units in the resource scheduling pool, the number of processing tasks executed by the resource scheduling units in unit time and the number of processing tasks corresponding to the resource scheduling pool.
Here, the processing performance of the plurality of resource scheduling units in the same resource scheduling pool is the same.
Step 1032: and acquiring the product of the number of the resource scheduling units and the number of processing tasks executed by the resource scheduling units.
Step 1033: and determining a first ratio of the obtained product to the number of processing tasks corresponding to the resource scheduling pool, and representing the processing performance of the resource scheduling pool by using the first ratio, wherein the magnitude of the first ratio is in positive correlation with the level of the processing performance.
For example, first, the number of resource scheduling units in the resource scheduling pool corresponding to the ith processing task is niThe resource scheduling unit processes the ith processing task in unit time with the number piThen p isi*niThe value of (a) represents the number of the i-th processing task that the resource scheduling pool can execute per unit time; then, the number of the ith processing task generated by the acquisition system in unit time is qiThen f (n)i)=pi*ni/qiAnd is used for characterizing the processing performance of the resource scheduling pool, f (n)i) The larger, the higher the processing performance characterizing the resource scheduling pool, f (n)i) The smaller the processing performance characterizing the resource scheduling pool.
Due to the above piReferring to fig. 7, fig. 7 is an optional flowchart of the method for determining processing performance of resource scheduling pools according to the embodiment of the present invention, and in some embodiments, step 103 shown in fig. 5 may be implemented by performing steps 1034 and 1035 shown in fig. 7 on each resource scheduling pool respectively:
step 1034: acquiring the number of newly added processing tasks of a resource scheduling pool in unit time and the number of processing tasks corresponding to the resource scheduling pool;
step 1035: and determining a second ratio of the number of the newly added processing tasks to the number of the processing tasks, wherein the second ratio is used for representing the processing performance of the resource scheduling pool, and the size of the second ratio is in a negative correlation with the processing performance.
Here, the above-described ith processing task is also taken as an example, and the increase number of processing tasks of the resource scheduling pool corresponding to the ith processing task in the unit time is acquired as IiThen, the number of the ith processing task that can be executed by the resource scheduling pool in a unit time is the number q of the ith processing task generated in an available unit timeiAnd the increased number I of processing tasks of the resource scheduling pool in unit timeiExpressed by the difference, i.e. (q)i-Ii)=pi*niSubstituting the formula into f (n)i)=pi*ni/qi=(qi-Ii)/qi=1-Ii/qiThen the processing performance of the resource scheduling pool passes f (n)i)’=Ii/qiIs represented by, and f (n)i) In the difference, f (n)i) The larger the' the lower the processing performance characterizing the resource scheduling pool, f (n)i) The smaller the processing performance characterizing the resource scheduling pool.
The new number of the processing tasks is easy to obtain, and in brief, the processing tasks with the fast new number of the processing tasks are the performance bottleneck of the system.
Step 104: and determining a target resource scheduling pool needing resource scheduling based on the processing performance of each resource scheduling pool.
After the processing performance of each resource scheduling pool is obtained, the resource scheduling pool needing resource scheduling can be determined based on the processing performance of each resource scheduling pool.
Referring to fig. 8, fig. 8 is an optional flowchart of a method for determining a target resource scheduling pool according to an embodiment of the present invention, in some embodiments, the step 104 shown in fig. 5 may be implemented by the steps 1041 and 1042 shown in fig. 8:
step 1041: and sequencing the resource scheduling pools according to the sequence of the processing performance from low to high to obtain a corresponding resource scheduling pool sequence.
Here, the resource scheduling pools are sorted according to the processing performance of the resource scheduling pools, and a corresponding resource scheduling pool sequence is obtained.
Step 1042: starting from the first resource scheduling pool in the resource scheduling pool sequence, selecting the resource scheduling pools with the target quantity, and taking the resource scheduling pools with the target quantity as target resource scheduling pools needing resource scheduling.
Here, the resource scheduling pool with lower processing performance is selected as the target resource scheduling pool. In some embodiments, a resource scheduling pool with lower processing performance and a resource scheduling pool with higher processing performance may also be simultaneously selected as the target resource scheduling pool.
Step 105: and adjusting the number of the resource scheduling units in the target resource scheduling pool so that the number meets the number condition.
In practical application, according to the barrel effect, the whole system performance is limited to the processing task corresponding to the resource scheduling pool with the lowest performance, and after the number of the resource scheduling units in the resource scheduling pool with the lowest processing performance is adjusted, the processing performance of the resource scheduling pool with the lowest processing performance is improved, so that on the basis, the higher the processing performance of the resource scheduling pool with the lowest processing performance is, the higher the whole performance of the system is.
When the processing performance of each resource scheduling pool is realized through steps 1031-1033 as shown in fig. 6, the overall performance of the system can be evaluated through the following formula:
f(n1,n2,…,nm)=min(p1*n1/q1,p2*n2/q2,…,pm*nm/qm) (1)
according to the formula, since the magnitude of the first ratio is in positive correlation with the processing performance, the number of the resource scheduling units in the resource scheduling pool is adjusted, so that the larger the value of the minimum first ratio is, the better the value is.
In some embodiments, the background server may adjust the number of resource scheduling units in the target resource scheduling pool in the following manner, so that the adjusted number satisfies the number condition:
acquiring a first ratio of each resource scheduling pool; and adjusting the number of the resource scheduling units in at least one resource scheduling pool of at least two resource scheduling pools corresponding to at least two processing tasks, so that the value of the minimum first ratio accords with a first value condition.
In practical implementation, the number of resource scheduling units in multiple resource scheduling pools sometimes needs to be adjusted multiple times to maximize the overall performance of the system. For example, for 5 resource scheduling pools corresponding to 5 processing tasks of the target service, the resource scheduling pools are ordered in the order from small to large according to the corresponding first ratio: A. b, C, D, E, when the unused system CPU resource is sufficient, the first adjustment increases the first ratio of the resource scheduling pool A by increasing the number of resource scheduling units in the resource scheduling pool A, so that the 5 resource scheduling pools after adjustment become a sequence in which the first ratio is in the order from small to large, and the sequence is ordered: B. c, A, D, E, respectively; and the second adjustment is realized by increasing the number of the resource scheduling units in the resource scheduling pool B, so that the first ratio of the resource scheduling pool B is improved, and by analogy, when the minimum first ratio meets a certain value condition, the overall performance of the system is considered to be maximum.
When the processing performance of each resource scheduling pool is realized through steps 1034-1035 shown in fig. 7, the overall performance of the system can be evaluated through the following formula:
f(n1,n2,…,nm)’=max(I1/q1,I2/q2,…,Im/qm) (2)
1-f(n1,n2,…,nm)=f(n1,n2,…,nm)’ (3)
according to the formula, since the magnitude of the second ratio and the processing performance are in a negative correlation relationship, the number of the resource scheduling units in the resource scheduling pool is adjusted, so that the largest second ratio is guaranteed to be better as the value is smaller.
In some embodiments, the background server may adjust the number of resource scheduling units in the target resource scheduling pool in the following manner, so that the adjusted number satisfies the number condition:
acquiring a second ratio of each resource scheduling pool; and adjusting the number of the resource scheduling units in at least one resource scheduling pool of at least two resource scheduling pools corresponding to the at least two processing tasks, so that the value of the maximum second ratio accords with a second value condition.
Similarly, in practical implementation, the number of resource scheduling units in multiple resource scheduling pools sometimes needs to be adjusted multiple times to maximize the overall performance of the system. For example, for 5 resource scheduling pools corresponding to 5 processing tasks of the target service, the resource scheduling pools are ordered from large to small according to the corresponding second ratio as follows: A. b, C, D, E, when the unused system CPU resources are more sufficient, the first adjustment reduces the second ratio of the resource scheduling pool a by increasing the number of resource scheduling units in the resource scheduling pool a, so that the 5 resource scheduling pools after adjustment are ordered in the order from large to small according to the second ratio, and the sequence becomes: B. c, A, D, E, respectively; and the second adjustment reduces the second ratio of the resource scheduling pool B by increasing the number of the resource scheduling units in the resource scheduling pool B, and by analogy, when the value of the maximum second ratio accords with a certain value condition, the overall performance of the system is considered to be maximum.
In some embodiments, the background server may further adjust the number of resource scheduling units in the target resource scheduling pool by:
and adding a first number of resource scheduling units in the target resource scheduling pool, wherein the sum of the number of the resource scheduling units in each resource scheduling pool does not exceed a second number after the first number of resource scheduling units is added.
Here, the second quantity refers to the quantity of hardware resources configured by the system, that is, the quantity of CPU cores, and in the process of adjusting the quantity of resource scheduling units in the target resource scheduling pool, it is required that the sum of the quantity of resource scheduling units in each resource scheduling pool does not exceed the quantity of CPU cores.
In some embodiments, the background server may further adjust the number of resource scheduling units in the target resource scheduling pool by:
when the target resource scheduling pool comprises a resource scheduling pool with processing performance lower than the processing performance reference value and a resource scheduling pool with processing performance higher than the processing performance reference value, reducing a third number of resource scheduling units in the resource scheduling pool with processing performance higher than the processing performance reference value; and adding a third number of resource scheduling units in the resource scheduling pool with the processing performance lower than the processing performance reference value.
In practical application, when all the CPU resources of the system are occupied, the determined target resource scheduling pool includes not only the resource scheduling pool with lower processing performance but also the resource scheduling pool with higher processing performance, the number of resource scheduling units in the resource scheduling pool with higher processing performance is appropriately reduced, and a corresponding number of resource scheduling units are added to the resource scheduling pool with lower processing performance, so as to achieve load balancing and improve the overall performance of the service processing system.
In the following, an exemplary application of the embodiments of the present invention in a practical application scenario will be described.
The resource scheduling method can be applied to products which relate to a large amount of complex calculation and are used as supports, such as face verification, face brushing payment, vehicle detection and the like, and particularly can be applied to diversified hardware deployment environments in terms of projects which need privatization delivery.
In actual implementation, after a terminal sends a processing request carrying service data for a target service to a background server, the background server first receives the processing request for the target service and generates at least two processing tasks corresponding to the target service in response to the processing request, wherein the processing tasks are in one-to-one correspondence with a resource scheduling pool, and the resource scheduling pool comprises a resource scheduling unit for executing the processing tasks; then, respectively determining the processing performance of the resource scheduling pool corresponding to each processing task; determining a target resource scheduling pool needing resource scheduling based on the processing performance of each resource scheduling pool; and adjusting the number of the resource scheduling units in the target resource scheduling pool so that the number meets the number condition.
In practical application, the resource scheduling pool may be a thread pool or a process pool, and when the resource scheduling pool is the thread pool, the corresponding resource scheduling unit is a thread instance; and when the resource scheduling pool is a process pool, the corresponding resource scheduling unit is a process instance. Next, a case where the resource scheduling pool is a thread pool and the resource scheduling unit is a thread instance will be described.
Referring to fig. 9, fig. 9 is an optional architecture schematic diagram of a resource scheduling system according to an embodiment of the present invention, and as shown in fig. 9, the resource scheduling system according to the embodiment of the present invention introduces an adaptive resource scheduling module in a background server on the basis of the multi-thread pool system shown in fig. 2, where the adaptive resource scheduling module is configured to monitor a running load condition of each thread pool and continuously adjust and allocate computing resources, so as to achieve a purpose of maximizing resource utilization. The adjustment strategy will be described in detail below.
Firstly, the adaptive resource scheduling module receives a processing request for a target service and generates at least two processing tasks corresponding to the target service in response to the processing request. The processing tasks are in one-to-one correspondence with the thread pools, and the thread pools comprise a plurality of thread instances for executing the processing tasks.
In practical application, in a compute-intensive system, the sum of the number of thread instances in each thread pool is generally not greater than the number of CPU cores, so that CPU computing resources are a bottleneck of the whole system, and excessive number of thread instances cannot improve the parallelism of computation, but increases the overhead of operating system scheduling, so that the constraint condition shown in formula (4) can be obtained:
Figure BDA0002393314700000161
wherein N represents the number of CPU cores of the hardware computing resource, and the value of N is fixed and unchangeable after the deployment environment is determined; m represents that m computing tasks exist in the system, and m thread pools can be correspondingly established; ni represents the number of thread instances in each thread pool and is also a variable that embodiments of the present invention need to adjust.
Secondly, the self-adaptive resource scheduling module determines the overall processing performance of the system through the determined processing performance of the thread pool corresponding to each processing task.
The processing performance is used for representing the processing efficiency of the corresponding thread pool to the processing task. In practical implementation, the adaptive resource scheduling module respectively obtains the number n of thread instances in each thread pool, the number p of processing tasks that can be processed by a single thread in unit time, and the number q of processing tasks that the system generates in unit time and that correspond to the thread pool, and evaluates the overall performance of the system according to a formula (5):
Figure BDA0002393314700000162
wherein p isiRepresenting the number of ith processing tasks processed by a single thread per unit time, p, at a certain hardware leveliIs a fixed value; q. q.siRepresenting the number of i-th processing tasks generated by the system per unit time, is dependent on the system load, and q is a constant value due to the algorithm flowiAre in fixed relation to each other, so that q is constantiIt is also understood that the number of ith processing tasks is generated for each processing request.
According to the barrel effect, the computing task with the worst performance is used for limiting the overall system performance, so that the evaluation of the system performance is to solve all the computing tasks
Figure BDA0002393314700000171
The minimum value of the expression, and therefore, the problem to be solved by the present invention is to find the maximum value in the formula (5) under the condition that the constraint of the formula (4) is satisfied.
And in practical implementation, p in formula (5)iThe value of (c) may vary depending on the hardware environment and may not be readily available in engineering applications, but may satisfy the relationship shown in equation (6):
qi-li=pini(6)
wherein, IiThe increment of the ith task queue length is expressed, and the formula (7) can be obtained by substituting the formula (6) into the formula (5):
Figure BDA0002393314700000172
therefore, the problem is converted into f' (n) in equation (7)1,n2,Λ,nm) Is measured. Processing the increase in task queue length I compared to equation (5)iIs an easily accessible quantity in the system, and in short, a processing task with a particularly fast queue length increase is a processing performance bottleneck of the system.
Through the analysis, an evaluation method of the overall processing performance of the system is obtained, and the performance bottleneck of the system can be determined through the evaluation method. Meanwhile, as can be seen from equation (6), the task queue length increment IiAnd the number n of thread instances in the thread pooliIs a negative correlation relationship, so that the processing performance problem of a certain thread pool can be relieved by properly increasing the thread number of the thread pool.
Referring to fig. 10, fig. 10 is an optional flowchart of a resource scheduling method according to an embodiment of the present invention, and an implementation method in an engineering implementation will be described with reference to the steps shown in fig. 10.
Step 201: the self-adaptive resource scheduling module receives a processing request aiming at the target service and responds to the processing request to generate at least two processing tasks corresponding to the target service.
The processing tasks are in one-to-one correspondence with the thread pools, and the thread pools comprise a plurality of thread instances for executing the processing tasks.
Step 202: and respectively acquiring the number of each processing task generated by the system in unit time and the increment of the length of the task queue corresponding to each processing task.
Step 203: and determining the processing performance of the thread pool corresponding to each processing task according to the number of the processing tasks generated in unit time and the increment of the length of the task queue corresponding to the processing task.
Step 204: and judging whether the processing performance of the thread pool corresponding to each processing task has a bottleneck.
When there is a bottleneck in the processing performance of the thread pool corresponding to each processing task, executing step 205; otherwise, step 206 is performed.
Step 205: the number of thread instances is increased in a thread pool where there is a performance bottleneck.
Here, when the unused system CPU resources are sufficient, a certain number of thread instances may be directly added to the thread pool where the performance bottleneck exists; when the CPU resources of the system are all occupied, the number of thread instances in the thread pool with higher processing performance can be properly reduced, and the corresponding number of thread instances is increased in the thread pool with performance bottleneck, so that load balance is achieved, and the overall performance of the service processing system is improved.
Step 206: and receiving the flow.
In practical application, the adaptive resource scheduling module can periodically execute the steps to continuously monitor the execution condition of the system, so as to realize automatic adjustment of computing resource allocation, fully utilize computing resources and maximize performance benefits.
By the mode, the self-adaptive resource scheduling module can monitor the overall performance of the system in real time, find the bottleneck of the system performance, adjust the configuration of the computing resources and maximize the system performance; due to the self-adaptive adjustment of the system configuration, manual intervention is not needed, and the labor cost for system delivery and deployment is reduced.
When the resource scheduling method provided by the embodiment of the invention is applied to the background service of the human face nuclear scene, compared with the system architecture scheme shown in FIG. 2, the method does not need a large number of test experiments to find the optimal system configuration; compared with the empirical configuration, the overall optimal configuration of the embodiment of the invention is obtained through actual tests, so that the query rate Per Second (QPS, Queries-Per-Second) of the system is improved by more than 10% by the method provided by the embodiment of the invention.
Continuing with the exemplary structure of the resource scheduling apparatus 555 implemented as a software module according to the embodiment of the present invention, in some embodiments, referring to fig. 11, fig. 11 is a schematic structural component diagram of the resource scheduling apparatus according to the embodiment of the present invention, as shown in fig. 11, the resource scheduling apparatus 555 according to the embodiment of the present invention includes:
a receiving module 5551, configured to receive a processing request for a target service;
a generating module 5552, configured to generate at least two processing tasks corresponding to the target service in response to the processing request, where the processing tasks are in a one-to-one correspondence relationship with resource scheduling pools, and each resource scheduling pool includes a resource scheduling unit for executing the processing task;
a first determining module 5553, configured to respectively determine processing performance of the resource scheduling pool corresponding to each processing task, where the processing performance is used to characterize processing efficiency of the corresponding resource scheduling pool to the processing task;
a second determining module 5554, configured to determine, based on the processing performance of each resource scheduling pool, a target resource scheduling pool that needs to perform resource scheduling;
an adjusting module 5555, configured to adjust the number of resource scheduling units in the target resource scheduling pool, so that the number satisfies a number condition.
In some embodiments, the first determining module is further configured to perform the following operations on each resource scheduling pool respectively:
acquiring the number of resource scheduling units in the resource scheduling pool, the number of processing tasks executed by the resource scheduling units in unit time and the number of processing tasks corresponding to the resource scheduling pool;
acquiring the product of the number of the resource scheduling units and the number of processing tasks executed by the resource scheduling units;
determining a first ratio of the product to the number of processing tasks corresponding to the resource scheduling pool, wherein the first ratio is used for representing the processing performance of the resource scheduling pool, and the magnitude of the first ratio is in positive correlation with the level of the processing performance.
In some embodiments, the first determining module is further configured to perform the following operations on each resource scheduling pool respectively:
acquiring the number of newly added processing tasks of the resource scheduling pool in unit time and the number of processing tasks corresponding to the resource scheduling pool;
and determining a second ratio of the number of the newly added processing tasks to the number of the processing tasks, wherein the second ratio is used for representing the processing performance of the resource scheduling pool, and the size of the second ratio and the level of the processing performance are in a negative correlation relationship.
In some embodiments, the second determining module is further configured to sort the resource scheduling pools according to a sequence of the processing performance from low to high, so as to obtain a corresponding resource scheduling pool sequence;
and starting from the first resource scheduling pool in the resource scheduling pool sequence, selecting a target number of resource scheduling pools, and taking the target number of resource scheduling pools as a target resource scheduling pool needing resource scheduling.
In some embodiments, the adjusting module is further configured to obtain a first ratio of each of the resource scheduling pools;
and adjusting the number of the resource scheduling units in at least one resource scheduling pool of at least two resource scheduling pools corresponding to the at least two processing tasks, so that the minimum value of the first ratio accords with a first value condition.
In some embodiments, the adjusting module is further configured to obtain a second ratio of each of the resource scheduling pools;
and adjusting the number of the resource scheduling units in at least one resource scheduling pool of at least two resource scheduling pools corresponding to the at least two processing tasks, so that the value of the maximum second ratio accords with a second value condition.
In some embodiments, the adjusting module is further configured to add a first number of resource scheduling units in the target resource scheduling pool, and after the first number of resource scheduling units is added, a sum of the number of resource scheduling units in each of the resource scheduling pools does not exceed a second number.
In some embodiments, the adjusting module is further configured to reduce a third number of resource scheduling units in the resource scheduling pool with processing performance higher than the processing performance reference value when the target resource scheduling pool includes a resource scheduling pool with processing performance lower than the processing performance reference value and a resource scheduling pool with processing performance higher than the processing performance reference value; and are
And adding the third number of resource scheduling units in a resource scheduling pool with the processing performance lower than the processing performance reference value.
An embodiment of the present invention provides a resource scheduling apparatus, including:
a memory for storing executable instructions;
and the processor is used for realizing the resource scheduling method provided by the embodiment of the invention when the executable instruction stored in the memory is executed.
The embodiment of the invention provides a storage medium, which stores executable instructions and is used for causing a processor to execute so as to realize the resource scheduling method provided by the embodiment of the invention.
In some embodiments, the storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
In summary, the resource scheduling method provided by the embodiment of the present invention has the following beneficial effects:
1. the system performance bottleneck can be found, the resource scheduling is reasonably carried out, the hardware resources are fully utilized, and the system performance is maximized;
2. manual intervention is not needed, a large number of test experiments are not needed, the system architecture design can be guided, hardware resources are fully utilized, the labor cost for delivery is greatly reduced, meanwhile, higher performance is output, and the market competitiveness of products is improved;
3. compared to an empirical configuration, the QPS of the system can be improved.
The above description is only an example of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A method for scheduling resources, the method comprising:
receiving a processing request aiming at a target service;
responding to the processing request, generating at least two processing tasks corresponding to the target service, wherein the processing tasks are in one-to-one correspondence with resource scheduling pools, and the resource scheduling pools comprise resource scheduling units for executing the processing tasks;
respectively determining the processing performance of the resource scheduling pool corresponding to each processing task, wherein the processing performance is used for representing the processing efficiency of the corresponding resource scheduling pool to the processing task;
determining a target resource scheduling pool needing resource scheduling based on the processing performance of each resource scheduling pool;
and adjusting the number of the resource scheduling units in the target resource scheduling pool so that the number meets a number condition.
2. The method of claim 1, wherein said separately determining the processing performance of the resource scheduling pool corresponding to each of the processing tasks comprises:
respectively executing the following operations on each resource scheduling pool:
acquiring the number of resource scheduling units in the resource scheduling pool, the number of processing tasks executed by the resource scheduling units in unit time and the number of processing tasks corresponding to the resource scheduling pool;
acquiring the product of the number of the resource scheduling units and the number of processing tasks executed by the resource scheduling units;
determining a first ratio of the product to the number of processing tasks corresponding to the resource scheduling pool, wherein the first ratio is used for representing the processing performance of the resource scheduling pool, and the magnitude of the first ratio is in positive correlation with the level of the processing performance.
3. The method of claim 1, wherein said separately determining the processing performance of the resource scheduling pool corresponding to each of the processing tasks comprises:
respectively executing the following operations on each resource scheduling pool:
acquiring the number of newly added processing tasks of the resource scheduling pool in unit time and the number of processing tasks corresponding to the resource scheduling pool;
and determining a second ratio of the number of the newly added processing tasks to the number of the processing tasks, wherein the second ratio is used for representing the processing performance of the resource scheduling pool, and the size of the second ratio and the level of the processing performance are in a negative correlation relationship.
4. The method of claim 1, wherein said determining a target resource scheduling pool for which resource scheduling is required based on processing performance of each of said resource scheduling pools comprises:
sequencing the resource scheduling pools according to the sequence of the processing performance from low to high to obtain corresponding resource scheduling pool sequences;
and starting from the first resource scheduling pool in the resource scheduling pool sequence, selecting a target number of resource scheduling pools, and taking the target number of resource scheduling pools as a target resource scheduling pool needing resource scheduling.
5. The method of claim 2, wherein the adjusting the number of resource scheduling units in the target resource scheduling pool such that the number satisfies a number condition comprises:
acquiring a first ratio of each resource scheduling pool;
and adjusting the number of the resource scheduling units in at least one resource scheduling pool of at least two resource scheduling pools corresponding to the at least two processing tasks, so that the minimum value of the first ratio accords with a first value condition.
6. The method of claim 3, wherein the adjusting the number of resource scheduling units in the target resource scheduling pool such that the number satisfies a number condition comprises:
acquiring a second ratio of each resource scheduling pool;
and adjusting the number of the resource scheduling units in at least one resource scheduling pool of at least two resource scheduling pools corresponding to the at least two processing tasks, so that the value of the maximum second ratio accords with a second value condition.
7. The method of claim 1, wherein the adjusting the number of resource scheduling units in the target resource scheduling pool such that the number satisfies a number condition comprises:
and adding a first number of resource scheduling units in the target resource scheduling pool, wherein the sum of the number of the resource scheduling units in each resource scheduling pool does not exceed a second number after the first number of resource scheduling units is added.
8. The method of claim 1, wherein the adjusting the number of resource scheduling units in the target resource scheduling pool such that the number satisfies a number condition comprises:
when the target resource scheduling pool comprises a resource scheduling pool with processing performance lower than a processing performance reference value and a resource scheduling pool with processing performance higher than the processing performance reference value, reducing a third number of resource scheduling units in the resource scheduling pool with processing performance higher than the processing performance reference value; and are
And adding the third number of resource scheduling units in a resource scheduling pool with the processing performance lower than the processing performance reference value.
9. An apparatus for scheduling resources, the apparatus comprising:
the receiving module is used for receiving a processing request aiming at a target service;
a generating module, configured to generate at least two processing tasks corresponding to the target service in response to the processing request, where the processing tasks are in one-to-one correspondence with resource scheduling pools, and each resource scheduling pool includes a resource scheduling unit for executing the processing task;
a first determining module, configured to respectively determine processing performance of a resource scheduling pool corresponding to each processing task, where the processing performance is used to characterize processing efficiency of the corresponding resource scheduling pool to the processing task;
a second determining module, configured to determine, based on processing performance of each resource scheduling pool, a target resource scheduling pool that needs to perform resource scheduling;
and the adjusting module is used for adjusting the number of the resource scheduling units in the target resource scheduling pool so that the number meets the number condition.
10. A computer-readable storage medium having stored thereon executable instructions for causing a processor to perform the method of resource scheduling of any of claims 1 to 8 when executed.
CN202010122291.7A 2020-02-27 2020-02-27 Resource scheduling method, device and storage medium Pending CN111309468A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010122291.7A CN111309468A (en) 2020-02-27 2020-02-27 Resource scheduling method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010122291.7A CN111309468A (en) 2020-02-27 2020-02-27 Resource scheduling method, device and storage medium

Publications (1)

Publication Number Publication Date
CN111309468A true CN111309468A (en) 2020-06-19

Family

ID=71145271

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010122291.7A Pending CN111309468A (en) 2020-02-27 2020-02-27 Resource scheduling method, device and storage medium

Country Status (1)

Country Link
CN (1) CN111309468A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897643A (en) * 2020-08-05 2020-11-06 深圳鼎盛电脑科技有限公司 Thread pool configuration system, method, device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897643A (en) * 2020-08-05 2020-11-06 深圳鼎盛电脑科技有限公司 Thread pool configuration system, method, device and storage medium

Similar Documents

Publication Publication Date Title
Warneke et al. Exploiting dynamic resource allocation for efficient parallel data processing in the cloud
CN113535367B (en) Task scheduling method and related device
US10846096B1 (en) Batch processing of requests for trained machine learning model
CN114327829A (en) Multi-core real-time task scheduling analysis and simulation system and method
CN112988356A (en) Asynchronous calling method and device, storage medium and electronic equipment
CN114637536A (en) Task processing method, computing coprocessor, chip and computer equipment
Zhang et al. EHEFT-R: multi-objective task scheduling scheme in cloud computing
Vega et al. STOMP: A tool for evaluation of scheduling policies in heterogeneous multi-processors
CN107370783B (en) Scheduling method and device for cloud computing cluster resources
CN113204425B (en) Method, device, electronic equipment and storage medium for process management internal thread
CN111813541B (en) Task scheduling method, device, medium and equipment
CN107634978B (en) Resource scheduling method and device
CN116661964A (en) Task processing method and device and electronic equipment
CN116880994A (en) Multiprocessor task scheduling method, device and equipment based on dynamic DAG
CN111309468A (en) Resource scheduling method, device and storage medium
CN116820714A (en) Scheduling method, device, equipment and storage medium of computing equipment
CN116302558A (en) Thread scheduling method and device and electronic equipment
US20140047454A1 (en) Load balancing in an sap system
CN113485810A (en) Task scheduling execution method, device, equipment and storage medium
CN112988383A (en) Resource allocation method, device, equipment and storage medium
CN111796934A (en) Task issuing method and device, storage medium and electronic equipment
CN115686803B (en) Computing task management system, method and device for scheduling policy dynamic loading
CN113254180B (en) Data matching method and device, electronic equipment and storage medium
Zheng Efficient resource management for deep learning applications with virtual containers
CN117608862B (en) Data distribution control method, device, equipment and medium

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40024373

Country of ref document: HK