[go: up one dir, main page]

CN114816766B - A computing resource allocation method and related components - Google Patents

A computing resource allocation method and related components Download PDF

Info

Publication number
CN114816766B
CN114816766B CN202210606685.9A CN202210606685A CN114816766B CN 114816766 B CN114816766 B CN 114816766B CN 202210606685 A CN202210606685 A CN 202210606685A CN 114816766 B CN114816766 B CN 114816766B
Authority
CN
China
Prior art keywords
task
preset
background
foreground
computing 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.)
Active
Application number
CN202210606685.9A
Other languages
Chinese (zh)
Other versions
CN114816766A (en
Inventor
王志浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210606685.9A priority Critical patent/CN114816766B/en
Publication of CN114816766A publication Critical patent/CN114816766A/en
Application granted granted Critical
Publication of CN114816766B publication Critical patent/CN114816766B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

本发明公开了一种计算资源分配方法及其相关组件,涉及计算资源分配领域,当有前台任务执行时,在保证前台任务全速执行的前提下,根据各个后台任务的控制因子的大小为各个后台任务分配对应的计算资源,以保证后台任务的执行速度。由于控制因子与前台任务之间有对应关系,控制因子越小说明对应的后台任务对前台任务的影响程度越小或该后台任务的任务优先级越高,给控制因子小于预设因子的后台任务分配其全速执行所需要的计算资源,能够在保证前台资源的执行速度不被影响的前提下,还能保证部分后台任务能够正常执行,不仅提高了存储阵列的整体性能,还能够对每个后台任务进行单独控制,避免了前台任务堵塞的问题,提高存储阵列的可用性。

The present invention discloses a computing resource allocation method and related components, and relates to the computing resource allocation field. When a foreground task is executed, under the premise of ensuring that the foreground task is executed at full speed, corresponding computing resources are allocated to each background task according to the size of the control factor of each background task, so as to ensure the execution speed of the background task. Since there is a corresponding relationship between the control factor and the foreground task, the smaller the control factor, the smaller the influence of the corresponding background task on the foreground task or the higher the task priority of the background task, and the background task whose control factor is less than the preset factor is allocated with the computing resources required for its full-speed execution, it can ensure that the execution speed of the foreground resources is not affected, and some background tasks can be normally executed, which not only improves the overall performance of the storage array, but also can control each background task individually, avoids the problem of foreground task blocking, and improves the availability of the storage array.

Description

Computing resource allocation method and related components thereof
Technical Field
The present invention relates to the field of computing resource allocation, and in particular, to a computing resource allocation method and related components thereof.
Background
To meet the needs of users, more and more functions are added to the storage array, and these functions are usually run in the background of the storage array, and these functions are called background tasks, when these background tasks are all executed at full speed, the total computing resources used by the background tasks are excessive, for example, the used memory resources, processor resources and cache resources are excessive, so that the computing resources that can be used by the foreground tasks are too little, and further, the foreground tasks cannot be executed at full speed, which affects the user experience. In the prior art, when the execution speed of the foreground task is prevented from being influenced by the background task, the total amount of computing resources which can be used by all the background tasks is generally limited, enough computing resources are reserved for the foreground task to ensure that the foreground task can execute at full speed, but the method for limiting the total amount of computing resources does not consider that the execution speed of the background task can influence the overall performance of the storage array, and each background task cannot be independently limited, so that the background task is blocked due to the fact that the execution speed of the background task is too low, and the usability of the storage array is influenced.
Disclosure of Invention
The invention aims to provide a computing resource allocation method and related components thereof, which can ensure that part of background tasks can be normally executed on the premise of ensuring that the execution speed of foreground resources is not influenced, so that the overall performance of a storage array is improved, each background task can be independently controlled, the problem of blocking of the foreground tasks is avoided, and the usability of the storage array is improved.
In order to solve the above technical problems, the present invention provides a computing resource allocation method, including:
When a foreground task is executed, distributing computing resources required by full-speed execution of the foreground task for the foreground task;
determining the preset influence degree of each background task currently being executed on the foreground task;
determining control factors of the background tasks according to the preset task priority and the preset influence degree of the background tasks;
judging whether the sum of the number of the computing resources used by the foreground tasks and the sum of the number of the computing resources used by all the background tasks is smaller than a preset sum;
And if the control factor is smaller than the preset number sum, distributing computing resources required by full-speed execution of each background task for each background task of which the control factor is smaller than the preset factor.
Preferably, before determining the control factor of each background task according to the preset task priority and the preset influence degree of each background task, the method further includes:
Determining a task execution environment at the current moment, wherein the task execution environment at least comprises a common environment and a priority foreground task environment;
Determining control factors of the background tasks according to the preset task priority and the preset influence degree of the background tasks, wherein the control factors comprise:
and determining control factors of the background tasks according to the influence parameters of the background tasks corresponding to the task execution environment, the preset task priority and the preset influence degree.
Preferably, determining whether the sum of the number of computing resources of the foreground task and the number of computing resources of all the background tasks is smaller than a preset sum of the number of computing resources comprises:
judging whether the sum of the computing resources of the foreground task and the computing resources of all the background tasks is smaller than the sum of the preset numbers corresponding to the task execution environments;
if the number of the task execution environments is smaller than the preset number sum corresponding to the task execution environments, judging that the number of the task execution environments is smaller than the preset number sum;
and if the number of the task execution environments is not smaller than the preset number sum corresponding to the task execution environments, judging that the number of the task execution environments is not smaller than the preset number sum.
Preferably, the method further comprises:
and if the sum of the preset numbers is not smaller than the sum of the preset numbers, distributing computing resources of a preset limit corresponding to each background task.
Preferably, after allocating the computing resources required for the foreground task to execute at full speed to the foreground task, the method further includes:
judging whether the data interaction speed between the foreground task and the storage module is smaller than a preset speed or not;
And if the speed is smaller than the preset speed, generating alarm information.
Preferably, the background task comprises each background task body and a preset background task group consisting of a plurality of background task bodies;
allocating computing resources required by full-speed execution of each background task for each background task of which the control factor is smaller than a preset factor, wherein the computing resources comprise:
and distributing computing resources required by full-speed execution of each background task body for each background task body of which the control factor is smaller than a preset factor and all the background task bodies in each preset background task group.
Preferably, determining the control factor of each background task according to the preset task priority and the preset influence degree of each background task includes:
Determining the preset task priority of each background task and the preset first weight corresponding to the preset task priority;
determining a preset second weight corresponding to the preset influence degree of each background task;
For any one of the background tasks, determining the sum of products between the preset task priority and the preset first weight and the sum of products between the preset influence degree and the second weight and serving as a control factor of the background task.
The present invention also provides a computing resource allocation apparatus, comprising:
A memory for storing a computer program;
And a processor for implementing the steps of the computing resource allocation method as described above when executing the computer program.
The invention also provides a storage array, which comprises a storage array body and the computing resource distribution device;
The storage array body is connected with the computing resource distribution device.
The present invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of a computing resource allocation method as described above.
The invention provides a computing resource allocation method and related components thereof, which relate to the field of computing resource allocation, when a foreground task is executed, computing resources required by full-speed execution of the foreground task are allocated to the foreground task, then the preset influence degree of each background task currently being executed on the foreground task is determined, the control factors of each background task are determined according to the preset task priority and the preset influence degree of each background task, then the sum of the number of computing resources used by the foreground task and all the background tasks is judged to be smaller than the sum of the preset number, and if the sum of the number of computing resources is smaller than the sum of the preset number, the computing resources required by full-speed execution of each background task are allocated to each background task of which the control factors are smaller than the preset factors. The different background tasks have different influence degrees on the foreground tasks, and the smaller the control factors are, the smaller the influence degree of the corresponding background tasks on the foreground tasks is or the higher the task priority is, so that computing resources required by full-speed execution of the background tasks with the control factors smaller than the preset factors are allocated to the background tasks, the normal execution of part of the background tasks can be ensured on the premise of ensuring that the execution speed of the foreground resources is not influenced, the overall performance of the storage array is improved, each background task can be independently controlled, the problem of blockage of the foreground tasks is avoided, and the usability of the storage array is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the prior art and the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for computing resource allocation provided by the present application;
FIG. 2 is a schematic diagram of a memory array according to the present application;
FIG. 3 is a schematic diagram illustrating a computing resource allocation apparatus according to the present application;
Fig. 4 is a schematic structural diagram of another memory array according to the present application.
Detailed Description
The core of the invention is to provide a computing resource allocation method and related components thereof, which can ensure that part of background tasks can be normally executed on the premise of ensuring that the execution speed of foreground resources is not influenced, thus not only improving the overall performance of a storage array, but also independently controlling each background task, avoiding the problem of blocking the foreground tasks and improving the usability of the storage array.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a computing resource allocation method according to the present application, which includes:
s11: when a foreground task is executed, computing resources required by full-speed execution of the foreground task are allocated for the foreground task;
In order to ensure the user experience, in the application, when a foreground task is executed, such as executing a foreground task including a large-block data sequential reading, a small-block data random writing or an OLTP (Online Transaction Processing, online transaction process) \olap (Online Analytical Processing, online analysis processing) model related task, computing resources required by full-speed execution of the task need to be allocated to the foreground task, for example, if the foreground task needs to use 4G cache resources, 1G video memory resources, 10 CPU (central processing unit ) process resources and other computing resources to implement full-speed execution, computing resources with corresponding quota are allocated to the foreground task so that the foreground task can be executed at full speed, and the user experience is ensured.
S12: determining the preset influence degree of each background task currently being executed on a foreground task;
In consideration of the fact that the degrees of influence of different background tasks on foreground tasks are different, in the method, the preset influence degree of each background task on the foreground task can be preset, and the larger the preset influence degree is, the larger the influence of the corresponding background task on the execution speed of the foreground task is, for example, the larger the preset influence degree of some background tasks which can be executed at full speed only by using more computing resources is, because the background tasks use more computing resources, the fact that the computing resources which can be used by the foreground tasks are insufficient can be caused if the background tasks are not controlled is explained.
S13: determining control factors of the background tasks according to the preset task priority and the preset influence degree of the background tasks;
Considering that different background tasks have different priorities, for example, the priorities of the background tasks of a control function of an equipment foundation, the background tasks of each hardware firmware and other tasks are higher than the priorities of the background tasks of entertainment software, in the application, the task priorities of each background task can be preset, then the control factors of the background tasks are determined according to the preset task priorities and the preset influence degrees, the size of the control factors can show the influence degrees of the background tasks on the foreground tasks and whether the control factors are important or not, for example, the control factors can be set to be larger as the influence degrees of the background tasks on the foreground tasks are larger; the lower the task priority of the background task, the greater the control factor.
S14: judging whether the sum of the number of computing resources used by the foreground tasks and the sum of the number of computing resources used by all the background tasks is smaller than a preset sum;
Since the total amount of computing resources is limited, the more computing resources that are used in total by all tasks, the more likely various problems will occur, such as the device heating, the task execution speed decreasing, and the memory overflow, in order to reasonably control the usage amount of computing resources, in the present application, a sum of numbers may be preset, for example, the sum of numbers may be a computing resource threshold value indicating when the device has the above problem, or may be a percentage representing the total usage amount of computing resources that are used in total by all tasks, when the sum of numbers representing the total usage amount of computing resources that are used in total by all tasks is a percentage representing the total usage amount of computing resources that are used by all tasks, if the sum of numbers of computing resources that are used by a front-end task and the sum of numbers that are used by all back-end tasks is smaller than the sum of numbers that are preset, if the sum of numbers that are not smaller than the sum of numbers, the total usage amount of computing resources that are used by all tasks may be indicated as excessive, and in order to avoid the various problems described above, the total usage amount of computing resources that are used by all tasks that are allocated to each back-end task may be reduced. For example, the preset number and the sum may be defined as 60% of the total amount of the computing resources, and if the sum of the computing resources used by the foreground task and the computing resources used by all the background tasks is less than 60%, it is indicated that the computing resources are still in a receivable range at this time, and if the sum is greater than 60%, it is indicated that the computing resources are too much, and it is necessary to control the background task.
S15: and if the control factor is smaller than the preset factor, distributing computing resources required by full-speed execution of each background task for each background task of which the control factor is smaller than the preset factor.
If the sum of the number of the computing resources used by the foreground task and the sum of the number of the computing resources used by all the background tasks is smaller than the preset sum, the total usage of the computing resources used by all the tasks is within a receivable range, and in order to ensure that part of the background tasks can be successfully executed so as to further ensure the foreground task supporting capability of the equipment, in the application, the control factor is smaller than the preset factor, which means that the corresponding background task has little influence on the execution speed of the foreground task, or the task priority of the background task is higher, so that when the sum of the number is smaller than the preset sum, namely the total usage of the computing resources used by all the tasks is within the receivable range, the computing resources required by full-speed execution of each background task with the control factor smaller than the preset factor can be allocated to each background task with the control factor, and the partial background tasks can be smoothly executed so as to further ensure the foreground task supporting capability of the equipment.
It should be further noted that, in the present application, the computing resource allocation method may be applied to various processors on a device, such as an ARM (ADVANCED RISC MACHINES, advanced reduced instruction set processor), where the processors are connected to other modules in the device, please refer to fig. 2, fig. 2 is a schematic structural diagram of a storage array provided by the present application, where the processors are respectively connected to all other modules in the storage array, an OS (operating system module) provides information such as a preset task priority and a preset influence degree for the processors, a cache module provides information related to computing resources for the processors, and execution of a foreground task and a background task all require participation of the disk array module, and a user controls the processors and obtains related information through an instruction module or a wireless module via a serial port module.
In summary, when a foreground task is executed, computing resources required by full-speed execution of the foreground task are allocated to the foreground task, then the preset influence degree of each currently executing background task on the foreground task is determined, the control factors of each background task are determined according to the preset task priority and the preset influence degree of each background task, then the sum of the numbers of computing resources used by the foreground task and all the background tasks is judged to be smaller than the preset sum, and if the sum of the numbers of computing resources is smaller than the preset sum, computing resources required by full-speed execution of each background task are allocated to each background task with the control factors smaller than the preset factors. The different background tasks have different influence degrees on the foreground tasks, and the smaller the control factors are, the smaller the influence degree of the corresponding background tasks on the foreground tasks is or the higher the task priority is, so that computing resources required by full-speed execution of the background tasks with the control factors smaller than the preset factors are allocated to the background tasks, the normal execution of part of the background tasks can be ensured on the premise of ensuring that the execution speed of the foreground resources is not influenced, the overall performance of the storage array is improved, each background task can be independently controlled, the problem of blockage of the foreground tasks is avoided, and the usability of the storage array is improved.
Based on the above embodiments:
As a preferred embodiment, before determining the control factor of each background task according to the preset task priority and the preset influence degree of each background task, the method further comprises:
determining a task execution environment at the current moment, wherein the task execution environment at least comprises a common environment and a priority foreground task environment;
Determining control factors of the background tasks according to the preset task priority and the preset influence degree of the background tasks, wherein the control factors comprise:
and determining control factors of the background tasks according to the influence parameters, the preset task priorities and the preset influence degrees of the background tasks corresponding to the task execution environments.
In order to control the background task under different task execution environments, in the application, the corresponding task execution environments are established according to the user demands in consideration of different demands of different users, for example, the tasks such as video watching, webpage watching and the like are generally simpler with different computing resources required by different users and the difficulty of the foreground task executed by different users is different; and modeling, operation and other tasks are generally difficult, and more computing resources are required. Based on the method, a common environment and a priority foreground task environment can be established, under the common environment, the foreground task can be allocated with less computing resources in consideration of the fact that the foreground task needs less computing resources, so that more computing resources are reserved for the background task to use, and the overall performance of the device is improved; in the environment of the priority foreground task, more computing resources are allocated to the foreground task, so that the foreground task can be guaranteed to be executed at full speed under any condition. In different task execution environments, since the total amount of usable computing resources of all the background tasks is different, in order to control the background tasks according to the actual amount of usable computing resources, the influence parameters of the background tasks in different task execution environments are set for each background task. For example, the influence parameters may be execution weights of the background tasks, and when determining the control factor, in addition to the preset influence degree of the background task on the foreground task and the preset task priority thereof, the influence parameters of the background task in the current task execution environment need to be considered, so that the background task can be flexibly controlled in different task execution environments.
As a preferred embodiment, determining whether the sum of the number of computing resources of the foreground task and the computing resources of all the background tasks is less than a preset sum of numbers includes:
judging whether the sum of the computing resources of the foreground task and the computing resources of all the background tasks is smaller than the corresponding preset sum of task execution environments or not;
if the number sum is smaller than the preset number sum corresponding to the task execution environment, judging that the number sum is smaller than the preset number sum;
And if the number sum is not smaller than the preset number sum corresponding to the task execution environment, judging that the number sum is not smaller than the preset number sum.
In order to flexibly allocate computing resources to the background task, in the application, the fact that a plurality of task execution environments exist is considered, and the allocation amount of the computing resources is different in each task execution environment, for example, in a common environment, when the foreground task is simpler, the computing resources can be used for executing at full speed, so the amount of the computing resources allocated to the foreground task is less; in the environment of the priority foreground task, the foreground task needs to be guaranteed to execute at full speed under various conditions, so that more computing resources are allocated to the foreground task. Based on this, it is known that, when the foreground task and the background task to be executed are unchanged, if the normal environment is switched to the priority foreground task environment, the amount of the computing resources used by the background task is unchanged, but the amount of the computing resources used by the foreground task is increased, so that the sum of the computing resources of the foreground task and the computing resources of all the background tasks is increased, and therefore, different preset amounts and sums are set for different task execution environments. For example, in a common environment, the preset number sum is 60% of the total amount of computing resources, and since the foreground task uses fewer computing resources, the preset number sum can be set to be fewer to prevent the background task from using excessive computing resources; in the context of the prioritized foreground tasks, the sum of the preset numbers may be 70% of the total amount of computing resources, based on which computing resources may be flexibly allocated to each background task according to the preset number of sums.
As a preferred embodiment, further comprising:
And if the sum of the numbers is not smaller than the preset sum, distributing computing resources of preset quota corresponding to each background task for each background task.
In order to ensure that the foreground task can be executed at full speed under the condition of high load, in the application, when the sum of the computing resources of the current foreground task and the computing resources of all the background tasks is not less than the sum of the preset number, the fact that the quantity of the computing resources used by all the tasks is excessive at the moment is indicated, various problems such as equipment heating, task execution speed reduction, memory overflow and the like are easily caused, and at the moment, the execution speed of the foreground task is also easily influenced, so that the foreground task cannot be executed at full speed. Therefore, in order to ensure that the foreground task can execute at full speed, the computing resources allocated to the background task can be reduced, namely, corresponding computing resources are allocated to each background task according to the limit preset for each background task, so that the purpose of reducing the total amount of computing resources used by all the tasks is realized, and the foreground task can execute at full speed.
As a preferred embodiment, after allocating computing resources required for full-speed execution of the foreground task to the foreground task, the method further comprises:
judging whether the data interaction speed between the foreground task and the storage module is smaller than a preset speed or not;
If the speed is smaller than the preset speed, generating alarm information.
In the application, in order to enable a user to perceive the situation, whether the data interaction speed between the foreground task and the storage module is smaller than the preset speed is judged, because the data in the storage module is usually required to be called for use by the foreground task when the user executes various foreground tasks, namely, the data interaction speed between the foreground task and the storage module is included in the foreground task, for example, the data interaction speed can be the data landing speed of the data in the participation of the cache module, the preset speed can be 70% of the fastest execution speed of the foreground task, and when the data landing speed is detected to be smaller than the preset speed, namely, lower than 70% of the fastest speed, alarm information is generated so as to prompt the user that the execution speed of the foreground task is too slow.
As a preferred embodiment, the background task includes each background task body and a preset background task group formed by a plurality of background task bodies;
allocating computing resources required by full-speed execution of each background task for each background task with a control factor less than a preset factor, including:
and distributing computing resources required by full-speed execution of each background task body for each background task body with the control factor smaller than the preset factor and all the background task bodies in each preset background task group.
In order to more accurately allocate computing resources to each background task, in the application, considering that besides the influence of a background task body on a foreground task, a task group formed by a plurality of background tasks may have additional influence on the foreground task, for example, the influence of an A background task on the foreground task is larger, the influence of a B background task on the foreground task is smaller, but the influence of the B background task on the A background task is larger, and therefore, the influence of the B background task on the foreground task cannot be considered, and the influence of the B background task on the A background task needs to be considered, when computing resources are allocated to the background task, if the tasks in a certain preset background task group are all executing, the whole preset background task group needs to be allocated, otherwise, each background task is independently allocated, so that computing resources are more accurately allocated to each background task.
As a preferred embodiment, determining the control factor of each background task according to the preset task priority and the preset influence degree of each background task includes:
Determining preset task priorities of all background tasks and preset first weights corresponding to the preset task priorities;
determining a preset second weight corresponding to the preset influence degree of each background task;
For any background task, the sum of the product between the priority of the preset task and the preset first weight and the product between the preset influence degree and the second weight is determined and used as a control factor of the background task.
In order to accurately determine the control factors of the background tasks, the preset task priority and the preset influence degree of the background tasks are weighted correspondingly, so that the control factors of the background tasks are determined according to actual working conditions. For example, in a default situation, the preset first weight and the preset second weight may be set to be 50%, that is, in a default situation, the influence of the preset task priority and the preset influence degree on the control factor is consistent; if the background task with high priority of the preset task needs to be normally executed to ensure the supporting capability of the equipment, the preset first weight can be set to be larger, for example, 75%, and the preset second weight can be set to be smaller, for example, 25%, so that the background task with high priority of the preset task can be smoothly executed; if the foreground task needs to be guaranteed to be capable of executing at full speed, the preset first weight can be set to be smaller, for example, 25%, and the preset second weight can be set to be larger, for example, 75%, so that the background task with large preset influence degree is limited, the foreground task is guaranteed to be capable of executing at full speed, and based on the control factors of the background tasks can be accurately determined.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a computing resource allocation device according to the present application, including:
a memory 21 for storing a computer program;
a processor 22 for implementing the steps of the computing resource allocation method as described above when executing a computer program.
For a detailed description of a computing resource allocation apparatus provided in the present application, please refer to an embodiment of a computing resource allocation method described above, and the detailed description thereof is omitted herein.
Referring to fig. 4, fig. 4 is a schematic structural diagram of another storage array according to the present application, which includes a storage array body 31 and the above-mentioned computing resource allocation device 32;
The storage array body 31 is connected to a computing resource allocation device 32.
For a detailed description of a memory array provided in the present application, please refer to the above-mentioned embodiment of the computing resource allocation method, and the detailed description thereof is omitted herein.
The present application also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program realizes the steps of the computing resource allocation method when being executed by a processor.
For a detailed description of a computer-readable storage medium, please refer to the above-mentioned embodiments of the computing resource allocation method, and the detailed description is omitted herein.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1.一种计算资源分配方法,其特征在于,包括:1. A computing resource allocation method, comprising: 当有前台任务执行时,为所述前台任务分配所述前台任务全速执行所需要的计算资源;When a foreground task is executed, the computing resources required for the foreground task to execute at full speed are allocated to the foreground task; 确定当前正在执行的各个后台任务对所述前台任务的预设影响程度;Determine the preset degree of influence of each currently executing background task on the foreground task; 根据各个所述后台任务的预设任务优先级和所述预设影响程度确定各个所述后台任务的控制因子;Determining a control factor for each of the background tasks according to a preset task priority and a preset impact degree of each of the background tasks; 判断所述前台任务使用的计算资源和所有所述后台任务使用的计算资源的数量和是否小于预设数量和;Determine whether the sum of the number of computing resources used by the foreground task and the number of computing resources used by all the background tasks is less than a preset sum; 若小于所述预设数量和,则为所述控制因子小于预设因子的各个后台任务分配各个所述后台任务全速执行所需要的计算资源;If it is less than the sum of the preset numbers, allocating computing resources required for full-speed execution of each background task to each background task whose control factor is less than the preset factor; 在根据各个所述后台任务的预设任务优先级和所述预设影响程度确定各个所述后台任务的控制因子之前,还包括:Before determining the control factor of each of the background tasks according to the preset task priority and the preset impact degree of each of the background tasks, the method further includes: 确定所述当前时刻的任务执行环境,所述任务执行环境至少包括普通环境和优先前台任务环境;Determine the task execution environment at the current moment, wherein the task execution environment at least includes a common environment and a priority foreground task environment; 根据各个所述后台任务的预设任务优先级和所述预设影响程度确定各个所述后台任务的控制因子,包括:Determining the control factor of each of the background tasks according to the preset task priority and the preset impact degree of each of the background tasks includes: 根据各个所述后台任务对应于所述任务执行环境的影响参数、所述预设任务优先级和所述预设影响程度确定各个所述后台任务的控制因子;Determine the control factor of each of the background tasks according to the influence parameter of each of the background tasks corresponding to the task execution environment, the preset task priority and the preset influence degree; 根据各个所述后台任务的预设任务优先级和所述预设影响程度确定各个所述后台任务的控制因子,包括:Determining the control factor of each of the background tasks according to the preset task priority and the preset impact degree of each of the background tasks includes: 确定各个所述后台任务的预设任务优先级以及所述预设任务优先级对应的预设第一权重;Determine a preset task priority of each of the background tasks and a preset first weight corresponding to the preset task priority; 确定各个所述后台任务的预设影响程度对应的预设第二权重;Determine a preset second weight corresponding to a preset impact degree of each of the background tasks; 对于任一个所述后台任务,确定所述预设任务优先级与所述预设第一权重之间的乘积和所述预设影响程度与所述第二权重之间的乘积的数量和作为所述后台任务的控制因子。For any of the background tasks, the sum of the product of the preset task priority and the preset first weight and the product of the preset influence degree and the second weight is determined as a control factor of the background task. 2.如权利要求1所述的计算资源分配方法,其特征在于,判断所述前台任务的计算资源和所有所述后台任务的计算资源的数量和是否小于预设数量和,包括:2. The computing resource allocation method according to claim 1, characterized in that determining whether the sum of the computing resources of the foreground task and the computing resources of all the background tasks is less than a preset sum comprises: 判断所述前台任务的计算资源和所有所述后台任务的计算资源的数量和是否小于所述任务执行环境对应的预设数量和;Determine whether the sum of the number of computing resources of the foreground task and the number of computing resources of all the background tasks is less than the sum of preset numbers corresponding to the task execution environment; 若小于所述任务执行环境对应的预设数量和,则判定小于所述预设数量和;If it is less than the sum of the preset numbers corresponding to the task execution environment, it is determined to be less than the sum of the preset numbers; 若不小于所述任务执行环境对应的预设数量和,则判定不小于所述预设数量和。If it is not less than the sum of the preset quantities corresponding to the task execution environment, it is determined that it is not less than the sum of the preset quantities. 3.如权利要求1所述的计算资源分配方法,其特征在于,还包括:3. The computing resource allocation method according to claim 1, further comprising: 若不小于所述预设数量和,则为各个所述后台任务分配各个所述后台任务对应的预设额度的计算资源。If it is not less than the sum of the preset numbers, a preset amount of computing resources corresponding to each of the background tasks is allocated to each of the background tasks. 4.如权利要求1所述的计算资源分配方法,其特征在于,在为所述前台任务分配所述前台任务全速执行所需要的计算资源之后,还包括:4. The computing resource allocation method according to claim 1, characterized in that after allocating computing resources required for the foreground task to execute at full speed to the foreground task, it further comprises: 判断所述前台任务与存储模块之间的数据交互速度是否小于预设速度;Determine whether the data interaction speed between the foreground task and the storage module is less than a preset speed; 若小于所述预设速度,则生成告警信息。If it is less than the preset speed, an alarm message is generated. 5.如权利要求1所述的计算资源分配方法,其特征在于,所述后台任务包括各个后台任务本体以及由多个所述后台任务本体组成的预设后台任务组;5. The computing resource allocation method according to claim 1, wherein the background task comprises each background task entity and a preset background task group composed of a plurality of the background task entities; 为所述控制因子小于预设因子的各个后台任务分配各个所述后台任务全速执行所需要的计算资源,包括:Allocating computing resources required for full-speed execution of each background task to each background task whose control factor is less than a preset factor includes: 为所述控制因子小于预设因子的各个所述后台任务本体以及各个所述预设后台任务组中的所有所述后台任务本体分配各个所述后台任务本体全速执行所需要的计算资源。The computing resources required for full-speed execution of each background task entity are allocated to each background task entity whose control factor is less than the preset factor and all the background task entities in each preset background task group. 6.一种计算资源分配装置,其特征在于,包括:6. A computing resource allocation device, comprising: 存储器,用于存储计算机程序;Memory for storing computer programs; 处理器,用于执行所述计算机程序时实现如权利要求1至5任一项所述的计算资源分配方法的步骤。A processor, configured to implement the steps of the computing resource allocation method as claimed in any one of claims 1 to 5 when executing the computer program. 7.一种存储阵列,其特征在于,包括存储阵列本体,还包括如权利要求6所述的计算资源分配装置;7. A storage array, characterized in that it comprises a storage array body, and further comprises the computing resource allocation device as claimed in claim 6; 所述存储阵列本体与所述计算资源分配装置连接。The storage array body is connected to the computing resource allocation device. 8.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述的计算资源分配方法的步骤。8. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the computing resource allocation method according to any one of claims 1 to 5 are implemented.
CN202210606685.9A 2022-05-31 2022-05-31 A computing resource allocation method and related components Active CN114816766B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210606685.9A CN114816766B (en) 2022-05-31 2022-05-31 A computing resource allocation method and related components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210606685.9A CN114816766B (en) 2022-05-31 2022-05-31 A computing resource allocation method and related components

Publications (2)

Publication Number Publication Date
CN114816766A CN114816766A (en) 2022-07-29
CN114816766B true CN114816766B (en) 2024-06-25

Family

ID=82518588

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210606685.9A Active CN114816766B (en) 2022-05-31 2022-05-31 A computing resource allocation method and related components

Country Status (1)

Country Link
CN (1) CN114816766B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117632521B (en) * 2024-01-26 2024-05-03 中电云计算技术有限公司 Method, device, equipment and storage medium for controlling CPU utilization rate of background task

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105320561A (en) * 2015-11-09 2016-02-10 深圳市万普拉斯科技有限公司 Task management method and system
CN111966480A (en) * 2020-08-28 2020-11-20 山东英信计算机技术有限公司 A task execution method and related device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105320561A (en) * 2015-11-09 2016-02-10 深圳市万普拉斯科技有限公司 Task management method and system
CN111966480A (en) * 2020-08-28 2020-11-20 山东英信计算机技术有限公司 A task execution method and related device

Also Published As

Publication number Publication date
CN114816766A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
US9529609B2 (en) Tracking guest memory characteristics for memory scheduling
US10565104B2 (en) System and method to manage and share managed runtime memory for JAVA virtual machine
CN110362402B (en) Load balancing method, device, equipment and readable storage medium
CN103763346B (en) A kind of distributed resource scheduling method and device
US9547510B2 (en) Tracking guest memory characteristics for memory scheduling
CN115113817B (en) Network card-based storage optimization method, system, electronic device and storage medium
CN114489922B (en) Virtual instance setting method and device
US9858120B2 (en) Modifying memory space allocation for inactive tasks
EP2798489A1 (en) Scheduling virtual central processing units of virtual machines among physical processing units
CN118244995B (en) Method for adjusting SSD load, storage system, storage access method and product
CN113032102A (en) Resource rescheduling method, device, equipment and medium
CN111190739A (en) Resource allocation method and device, electronic equipment and storage medium
CN114116231A (en) Data loading method and device, computer equipment and storage medium
CN114816766B (en) A computing resource allocation method and related components
CN110096352B (en) Process management method, device and computer readable storage medium
CN111459634B (en) Task scheduling method, device, terminal and storage medium
WO2025222984A1 (en) Access control method and apparatus, and electronic device and computer-readable storage medium
CN115878568A (en) Data updating method, device, equipment and computer readable storage medium
US12032858B1 (en) Data storage system employing partial responses to influence rate of bulk storage operations
CN113138909A (en) Load statistical method, device, storage medium and electronic equipment
CN104793985B (en) A kind of dispatching method of virtual machine and management equipment
CN116627339A (en) A VF dynamic scheduling method, device and medium based on solid state disk
CN114675973A (en) Resource management method, device, storage medium and program product
CN114153561A (en) Resource configuration method, apparatus, device and readable storage medium
CN112114967A (en) GPU resource reservation method based on service priority

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 215100 Building 9, No.1 guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: 215100 Building 9, No.1 guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China