Resource allocation method and device, equipment and storage medium

By identifying and adjusting resource allocation for core and non-core processes on the server, the problem that resource allocation in traditional solutions cannot reflect software business needs is solved, and efficient business processing is achieved under the power wall mechanism.

CN121918979APending Publication Date: 2026-04-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2024-10-24
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Traditional server resource allocation schemes cannot effectively reflect the performance requirements of software business, resulting in reduced business processing efficiency. In particular, under the power wall mechanism, unilaterally increasing the efficiency of core components will lead to a decrease in IO performance.

Method used

By obtaining the business description information of the target business, the core processes and non-core processes are identified. After the power wall mechanism is triggered, some processing resources of the non-core processes are transferred to the core processes to improve the running speed of the core processes and meet the processing resource requirements of the business type.

Benefits of technology

While keeping the total processing resources unchanged, the efficiency of target business processing was improved, the server resource allocation strategy was optimized, and the overall performance was enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121918979A_ABST
    Figure CN121918979A_ABST
Patent Text Reader

Abstract

The invention provides a resource allocation method and device, equipment and a storage medium, can be applied to the technical field of computers, and is used for solving the problem that service processing efficiency is possibly reduced due to the fact that processing resources are allocated according to a fixed hardware priority sequence. The method at least comprises the following steps: acquiring service description information of a target service, wherein the service description information at least comprises a service type and a basic resource quantity required by each process bearing the target service; and determining each target processor with idle processing resources from each processor, and providing the processing resources of the corresponding basic resource quantity for each process through each target processor. And if the total electric power of each processor reaches a power threshold value and at least one core processor of which the frequency of the service clock does not reach a frequency threshold value exists in each target processor, transferring and distributing part of processing resources provided for each non-core process to each core process so as to achieve the purpose of improving the service processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a resource allocation method, apparatus, device and storage medium. Background Technology

[0002] As a crucial infrastructure supporting business operations, server performance directly impacts application efficiency. Server performance generally increases with processor power consumption. In practice, power limits are often implemented on servers. A power limit mechanism controls the processor's power consumption by adjusting voltage and frequency, restricting power release to prevent overheating and hardware damage. Due to the power limit mechanism, the server's overall processing resources are limited; therefore, allocating these limited resources effectively to improve server performance is crucial.

[0003] Processing resources mainly consist of two parts: read / write resources (input / output, I / O) and computing resources. I / O processing resources are provided by non-core components within the processor (CPU UNCORE), while computing resources are provided by core components within the processor (CPU CORE). Traditional processing resource allocation schemes assign priorities to each component within the processor, ensuring the processing resource needs of high-priority components are met first. However, hardware component priorities do not effectively reflect the performance requirements of software applications, and allocating processing resources solely based on a fixed hardware priority order may lead to reduced processing efficiency.

[0004] For example, traditional solutions improve the efficiency of core components to enhance overall server performance by reducing latency. However, due to the power wall mechanism, the efficiency of core components cannot be increased indefinitely; the efficiency of non-core components must also be reduced simultaneously. Suppose the current task involves storage-related operations, which are far more sensitive to I / O resources than computing resources. Following the above adjustment logic would increase server computing performance but decrease I / O performance, ultimately impacting the processing efficiency of this task.

[0005] Therefore, how to allocate server processing resources to improve business processing efficiency is an urgent problem to be solved. Summary of the Invention

[0006] This application provides a resource allocation method, apparatus, device, and storage medium for allocating server processing resources to improve business processing efficiency.

[0007] In a first aspect, embodiments of this application provide a resource allocation method, including:

[0008] Obtain the business description information of the target business; the business description information includes at least: the business type of the target business, and the amount of basic resources required by each process carrying the target business; each process is: a core process or a non-core process, determined based on the degree of matching with the business type;

[0009] From the processors, identify the target processors with idle processing resources, and through the target processors, provide the corresponding basic amount of processing resources to each process;

[0010] If the total power of all processors reaches a power threshold, and at least one core processor among the target processors has a service clock frequency that does not reach a frequency threshold, then a portion of the processing resources provided by each target processor to each non-core process will be transferred to each core process; wherein, the frequency of the service clock represents the rate at which processing resources of the service type are provided to each core process; the at least one core processor is used to provide processing resources to each core process.

[0011] Secondly, embodiments of this application provide a resource allocation apparatus, the apparatus comprising:

[0012] The information acquisition module is configured to: acquire business description information of the target business; the business description information includes at least: the business type of the target business, and the amount of basic resources required by each process carrying the target business; each process is: a core process or a non-core process determined based on the degree of matching with the business type;

[0013] The resource allocation module is configured to: determine each target processor with idle processing resources from among the processors, and provide each process with processing resources of a corresponding basic amount through each target processor;

[0014] The resource adjustment module is configured to: if the total power of each processor reaches a power threshold, and among the target processors, at least one core processor whose service clock frequency does not reach a frequency threshold, then a portion of the processing resources provided by each target processor to each non-core process is transferred to each core process; wherein, the frequency of the service clock represents the rate at which processing resources of the service type are provided to each core process; and the at least one core processor is used to provide processing resources to each core process.

[0015] Thirdly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.

[0016] Fourthly, embodiments of this application provide a computer device, including:

[0017] Memory, used to store program instructions;

[0018] A processor is configured to invoke program instructions stored in the memory and execute the method described in the first aspect according to the obtained program instructions.

[0019] Fifthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method described in the first aspect.

[0020] In this embodiment, business description information of the target service is obtained. This business description information includes the business type of the target service and the amount of basic resources required by each process carrying the target service. Each process is determined based on its matching degree with the business type, and can be a core process or a non-core process. After knowing the amount of basic resources required by each process, target processors with idle processing resources are determined from the processors already deployed on the server. Each target processor then provides the corresponding amount of basic processing resources to each process to run the target service on the server.

[0021] During the operation of the target service, if the total power consumption of all processors reaches the power threshold, and at least one core processor has a service clock frequency that does not reach the preset frequency threshold, it indicates that more processing resources can still be provided to the core processes. Compared to non-core processes, the running speed of core processes has a greater impact on the service processing efficiency of the target service. Therefore, some of the processing resources provided by each target processor to each non-core process can be redistributed to each core process to improve the service processing efficiency of the target service while ensuring that the total amount of resources provided by each processor remains unchanged. Attached Figure Description

[0022] Figure 1 This is a schematic diagram illustrating an application scenario provided in the embodiments of this application;

[0023] Figure 2 A flowchart illustrating an overall resource allocation method provided in this application embodiment;

[0024] Figure 3 A schematic diagram illustrating how to determine the target server as provided in an embodiment of this application;

[0025] Figure 4 A schematic diagram illustrating the improvement of core process processing resources provided in an embodiment of this application;

[0026] Figure 5 A flowchart illustrating how to determine the sensitivity coefficient is provided for embodiments of this application;

[0027] Figure 6 A schematic diagram illustrating how to determine the rate of change of performance values, provided for an embodiment of this application;

[0028] Figure 7 Schematic diagram four illustrating the processing resources for improving the core process's business types as provided in this application embodiment;

[0029] Figure 8 A flowchart illustrating the server resource allocation method provided in this application embodiment. Figure 1 ;

[0030] Figure 9 This is a schematic diagram of the prompt information provided in the embodiments of this application;

[0031] Figure 10 A schematic diagram illustrating that the target service provided in the embodiments of this application cannot operate;

[0032] Figure 11 A schematic diagram of the processing resources provided for the switching and mixing services provided in the embodiments of this application;

[0033] Figure 12 A flowchart illustrating the server resource allocation method provided in this application embodiment. Figure 2 ;

[0034] Figure 13 This is a schematic diagram of the structure of a resource allocation device provided in an embodiment of this application;

[0035] Figure 14 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0037] It is understood that in the following specific embodiments of this application, user-related data is involved, such as the collection of user facial data. When the various embodiments of this application are applied to specific products or technologies, relevant licenses or consents need to be obtained, and the collection, use and processing of related data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0038] To facilitate understanding of the technical solutions provided in the embodiments of this application, some key terms used in the embodiments of this application will be explained below:

[0039] Power wall mechanism: It limits the total power consumption of all processors deployed in the server. When the total power consumption of all processors reaches the limit, if the frequency of some processors is increased or the number of cores is increased, it will lead to excessive power consumption of the processors and cause hardware damage. At this time, the power wall mechanism is triggered to prevent the total power consumption from being increased further, so as to protect the safety of the equipment.

[0040] CPU CORE: This is an independent processing unit within the processor, containing the components required to execute instructions. Examples include the Arithmetic Logic Unit (ALU), Floating-Point Unit (FPU), registers, and L1 cache. The CPU CORE provides computing resources and primarily participates in computation-related tasks.

[0041] Non-core components (CPU UNCORE): These are the components inside the processor other than the core components. Examples include the memory controller, L2 cache, L3 cache, bus interface, and integrated graphics. Non-core components provide I / O resources and primarily participate in read / write operations.

[0042] Due to the power wall mechanism, there is an upper limit to the total power consumption of all processors within a server. That is, the processing resources a server can provide are limited. Traditional processing resource allocation schemes mainly fall into two categories: one focuses on server energy consumption, and the other focuses on server performance.

[0043] For server energy consumption management schemes, energy saving is often achieved by proactively reducing the peak performance of processor components when they are under insufficient pressure, which means reducing the energy supply to these components. Alternatively, when components are under varying pressure, they can be forced into different power consumption modes, or the energy consumption of some components can be proactively reduced while maintaining server performance.

[0044] For allocation schemes that focus on server performance, priorities are usually set for each component within the processor. When the power wall mechanism is triggered, the energy supply to low-priority components is reduced to ensure the processing resource needs of high-priority components.

[0045] As a crucial infrastructure supporting business operations, improving business processing efficiency is one of the key requirements for server providers.

[0046] Traditional energy-efficient allocation schemes primarily aim to conserve server energy while ensuring business operations, with minimal impact on improving business processing efficiency. Traditional performance-oriented allocation schemes, on the other hand, aim to improve overall server performance (e.g., computing power, disk access capacity, data throughput).

[0047] For example, in traditional performance-oriented allocation schemes, some core components are given higher priority to reduce latency. This setting will force a reduction in the efficiency of high-priority components after the power wall mechanism is triggered, so as to ensure the efficiency of high-priority components without further increasing the total power consumption of all processors.

[0048] While server performance directly impacts business processing efficiency, the priority of hardware components does not effectively reflect the performance requirements of software applications. Allocating processing resources solely based on a fixed hardware priority order may lead to decreased business processing efficiency.

[0049] For example, storage-related operations focus on reading and writing data, making them far more sensitive to I / O resources than to computing resources. Reducing I / O resources to gain more computing resources would actually decrease processing efficiency.

[0050] For example, data analysis-related businesses have high demands for data reading and writing as well as computation. Whether business processing efficiency can be improved by reducing IO resources in exchange for more computing resources needs to be determined based on the actual operation of the business.

[0051] Based on this, embodiments of this application provide a method for allocating processing resources. In this method, service description information of a target service is obtained. This service description information includes the service type of the target service and the amount of basic resources required by each process carrying the target service. Each process is determined based on its matching degree with the service type, and can be classified as a core process or a non-core process. After determining the amount of basic resources required by each process, target processors with available processing resources are determined from the processors already deployed on the server. Each target processor then provides processing resources of the corresponding amount of basic resources to each process to run the target service on the server.

[0052] During the operation of the target service, the server adaptively increases the current consumption of each target processor, thereby reducing latency, based on the basic processing resources provided by each target processor to each process. When the total power consumption of all processors deployed on the server reaches the power threshold, the power wall mechanism is triggered. To ensure equipment safety, the total power consumption of all processors cannot be increased further at this point; that is, the total amount of resources provided by each processor cannot be increased.

[0053] After triggering the power wall mechanism, it is necessary to further determine whether at least one core processor among the target processors is underclocked. In this embodiment, the core processor refers to the processor that provides processing resources to the core process. If the frequency of the core processor's service clock does not reach the preset frequency threshold, i.e., it is underclocked, it indicates that the core processor can still provide more service-type processing resources to each core process. However, since the power wall mechanism has been triggered at this time, the total amount of resources provided by each processor in the server cannot be increased. If more processing resources are to be provided to the core process, corresponding processing resources need to be reduced from other places.

[0054] Considering that core processes are more closely matched to business types than non-core processes, meaning that the running speed of core processes primarily affects the business processing efficiency of the target business, some processing resources provided by each target processor to each non-core process can be redistributed to each core process. This improves the business processing efficiency of the target business while ensuring that the total amount of resources provided by each processor remains unchanged.

[0055] The following is a brief introduction to the application scenarios to which the technical solutions of the embodiments of this application are applicable. It should be noted that the application scenarios described below are only for illustrating the embodiments of this application and are not intended to limit the scope. In specific implementation, the technical solutions provided by the embodiments of this application can be flexibly applied according to actual needs.

[0056] The solution provided in this application can be applied to interaction scenarios between terminal devices and servers. For example... Figure 1 The diagram shown is an application scenario provided by an embodiment of this application. In this scenario, a terminal device 101, a server 102, and a processor 103 may be included.

[0057] Terminal device 101 can be a mobile phone, tablet computer (PAD), laptop computer, desktop computer, smart TV, smart in-vehicle device, or smart wearable device. Terminal device 101 can have an application installed, which can be a software client, a webpage, or a mini-program. Server 102 is the server corresponding to the software or webpage / mini-program client, without restriction on the specific type of client. Server 102 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms, but is not limited to these. Multiple processors 103 can be deployed on server 102 to provide processing resources.

[0058] In this embodiment, the terminal device 101 and the server 102 can communicate directly or indirectly through one or more networks. The network can be a wired network or a wireless network, such as a mobile cellular network or a Wireless-Fidelity (WIFI) network, or any other possible network. This embodiment does not limit the types of networks used.

[0059] The resource allocation method in this embodiment can be executed by server 102 alone, or by terminal device 101 and server 102 in cooperation. For example, a user can activate an application and trigger a related business instruction through terminal device 101. Terminal device 101 sends the business instruction to server 102, and multiple processors 103 on server 102 provide the necessary processing resources to each process carrying the business, so that the business can run on server 102.

[0060] If the power wall threshold is triggered during the operation of the service, and at least one core processor of the multiple processors 103 deployed on the server 102 is downclocked, then some of the processing resources provided by the multiple processors 103 to each non-core process can be transferred to each core process. This is to improve the processing efficiency of the service while ensuring that the total amount of resources provided by the multiple processors 103 to the outside world remains unchanged.

[0061] It should be noted that, Figure 1The examples shown are merely illustrative; in reality, the number of terminal devices and servers is unlimited and is not specifically limited in this embodiment. Furthermore, in some scenarios, terminal device 101 and server 102 can be the same device, meaning that the functions of terminal device 101 and server 102 can be implemented through the same device.

[0062] The image processing method provided by the exemplary embodiments of this application will be described below with reference to the accompanying drawings and the application scenarios described above. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way.

[0063] like Figure 2 As shown, Figure 2 This application illustrates the overall flow of a resource allocation method provided in an embodiment, which may include the following steps:

[0064] Step 201: Obtain the business description information of the target business; the business description information includes at least: the business type of the target business, and the amount of basic resources required by each process carrying the target business; wherein, each process is: determined based on the degree of matching with the business type, whether it is a core process or a non-core process;

[0065] As mentioned earlier, processing resources mainly include I / O resources and computing resources. The service type in this application embodiment indicates the resource type that primarily affects service processing efficiency. The service types in this application embodiment may include three types: I / O type, computing type, and hybrid type.

[0066] When the business type is I / O, it indicates that each process is highly sensitive to I / O resources, such as storage-related businesses. For such businesses, the processing efficiency is mainly affected by the amount of I / O resources available, and the impact is positively correlated.

[0067] When the business type is computation-related, it indicates that each process is highly sensitive to computing resources, such as computation-related businesses. For this type of business, its processing efficiency is mainly affected by the amount of computing resources available, and the impact is positively correlated.

[0068] When the business type is mixed, it indicates that each process is highly sensitive to both I / O and computing resources, such as data analysis-related businesses. For such businesses, both I / O and computing resources significantly affect the processing efficiency of the business, and the impact is positively correlated.

[0069] The following explains how to determine the business type:

[0070] During implementation, the service type can be determined based on the basic resource requirements of each process. The basic resource requirements of a process represent the minimum amount of resources needed to ensure its normal operation. The service description information records the basic resource requirements of each process, which may include the basic resource requirements for I / O resources and computing resources.

[0071] In some possible implementations, the basic resource quantities of I / O and computing resources required by each process can be determined through service description information. If the proportion of the total basic resource quantity of a particular resource reaches a set threshold corresponding to that resource, the service type can be determined based on that resource.

[0072] For example, in a certain business transaction, the total basic resource amount of I / O required by all processes is S1, and the total basic resource amount of computing required by all processes is S2. The threshold for I / O resources is set as Q1, and the threshold for computing resources is set as Q2. Then, when S1 / (S1+S2) > threshold Q1, the business type of this transaction is determined to be I / O type. When S2 / (S1+S2) > threshold Q2, the business type of this transaction is determined to be computing type. When both S1 / (S1+S2) > threshold Q1 and S2 / (S1+S2) > threshold Q2, the business type of this transaction is determined to be mixed type.

[0073] In some possible embodiments, the utilization rate of I / O resources and computing resources for a given service can be determined based on the basic resource amounts required by each process. If the utilization rate of I / O resources for a service exceeds a utilization threshold, but the utilization rate of computing resources does not exceed a utilization threshold, then the service type is determined to be I / O type. If the utilization rate of computing resources for a service exceeds a utilization threshold, but the utilization rate of computing resources does not exceed a utilization threshold, then the service type is determined to be computing type. If the utilization rate of both I / O resources and computing resources for a service exceeds the utilization threshold, then the service type is determined to be mixed type. The utilization threshold can be set according to actual needs, for example, it can be set to 50%.

[0074] It should be understood that the above examples are for illustrative purposes only. The specific method for determining the business type based on the basic resource requirements of each process can be set according to the actual situation, as long as the resource type that mainly affects the business processing efficiency can be known through the business type. This application does not limit this.

[0075] In this embodiment, the processes carrying the service can be classified according to the service type. Each process can be divided into core processes or non-core processes. During implementation, targeted analysis can be performed on each process of the target service to determine the matching degree between each process and the service type. Taking I / O-type storage-related services as an example, in this type of service, the processes executing read / write commands have a high matching degree with the service type. Therefore, the processes executing read / write commands in this type of service can be designated as core processes. Thus, by performing targeted analysis on each process, the matching degree between each process and the service type can be determined, and processes with high matching degrees can be designated as core processes, while the remaining processes other than the core processes can be designated as non-core processes.

[0076] Step 202: Identify the target processors with available processing resources from among the processors, and provide each process with the corresponding basic amount of processing resources through each target processor;

[0077] After determining the amount of basic resources required by each process carrying the target service through the aforementioned step 201, each target server with idle processing resources is identified from the processors already deployed on the server.

[0078] For example Figure 3 The server shown has processors 1 through N deployed. Processors 1 and 2 are idle, not running any processes. Processors 3 and N each provide processing resources to at least one process carrying other services. Processor 3 allocates all of its processing resources to at least one process carrying other services, while processor N allocates only 20% of its processing resources to at least one process carrying other services, leaving some processing resources idle. Therefore, processors 1, 2, and N are all target servers with idle processing resources.

[0079] Next, each target processor provides a corresponding amount of basic processing resources to each process to enable the target service to run on the server. It should be noted that the specific processors selected from the target processors to provide processing resources to each process, and the specific amount of processing resources provided by each target processor, are determined by the server's pre-configured algorithm. This application does not impose restrictions on these aspects; it is only necessary to ensure that each process receives the corresponding amount of basic processing resources.

[0080] In some possible embodiments, to improve business processing efficiency, after providing each process with a corresponding basic amount of processing resources through each target processor, a candidate resource quantity can be determined based on the remaining idle processing resources of each target processor and a set resource ratio. Then, processing resources matching the candidate resource quantity are provided to each core process through each target processor. This increases the utilization rate of idle processing resources to provide more processing resources to core processes, thereby improving business processing efficiency.

[0081] For example Figure 4 In the scenario shown, after target processors 1 through N provide the corresponding basic processing resources to each process, target processors 1 and 2 still have some idle processing resources remaining, for example, 20% of each. At this point, 90% of the remaining idle processing resources of target processors 1 through N can be used as candidate resources, and the remaining processing resources of these candidate resources can be allocated to each core process. The remaining 10% of processing resources is reserved for occasional processes that occur during server operation. These processes typically have low processing resource requirements, and testing has shown that reserving 10% of candidate resources is sufficient to meet the needs of common business scenarios.

[0082] Step 203: If the total power of each processor reaches the power threshold, and among the target processors, there is at least one core processor whose service clock frequency does not reach the frequency threshold, then a portion of the processing resources provided by each target processor to each non-core process is transferred to each core process; wherein, the frequency of the service clock represents the rate at which service-type processing resources are provided to each core process; at least one core processor is used to provide processing resources to each core process.

[0083] After running the target service on the server through the aforementioned step 202, it is detected whether the total power consumption of each processor has reached the power threshold. In this embodiment of the application, the power threshold is determined based on the power value that triggers the power wall mechanism; for example, the power value that triggers the power wall mechanism can be directly used as the power threshold.

[0084] As mentioned earlier, the total power consumption of each processor must remain constant when the power wall mechanism is triggered. This means that the total amount of resources provided by each processor cannot be increased. After the power wall mechanism is triggered, it is necessary to further determine whether there is at least one downclocked core processor among the target processors.

[0085] In this embodiment, the core processor refers to the processor that provides processing resources to the core processes. If the frequency of the core processor's service clock does not reach a preset frequency threshold, it is in a downclocking state. This indicates that the core processor has not yet reached its upper limit in terms of the processing resources of various service types it can provide, meaning it can provide more processing resources for each core process.

[0086] In some possible embodiments, the preset threshold can be determined based on the upper frequency limit set by the service clock, for example, the upper frequency limit of the service clock can be directly used as the preset threshold.

[0087] However, since the power wall mechanism has been triggered at this time, the total amount of resources provided by each processor in the server cannot be increased. If more processing resources are to be provided for the core processes, the corresponding processing resources need to be reduced from other places.

[0088] Since each process in this embodiment is either a core process or a non-core process, the matching degree between core processes and business types is higher than that of non-core processes. That is, compared with non-core processes, the running speed of core processes can more directly affect business processing efficiency. Therefore, some of the processing resources provided by each target processor to each non-core process can be transferred to each core process to improve the business processing efficiency of the target business while ensuring that the total amount of resources provided by each processor remains unchanged.

[0089] In practice, before providing the corresponding basic amount of processing resources to each process through the aforementioned step 202 (i.e., before the target service runs), performance tests can be performed on each process carrying the target service in advance to obtain the sensitivity coefficient of the target service. This sensitivity coefficient can characterize the degree of influence of the processing resources of the service type on the service processing efficiency.

[0090] In some possible embodiments, the sensitivity coefficient of the target service can be determined based on the upper frequency limit of the service clock of each target processor, specifically as follows: Figure 5 As shown, it includes the following steps:

[0091] Step 501: Estimate the amount of processing resources to be provided to each core process through each target processor;

[0092] Step 502: In the process of estimating the processing resources of the preset resource quantity, the frequency of the service clock of each target processor is gradually increased by a preset step size, and the performance value of each core process after each frequency increase is determined until the frequency of the service clock of each target processor reaches the corresponding frequency limit.

[0093] The processor has corresponding clocks for its core and non-core components. The clock for the core components that provide computing resources is called the computing clock. The clock for the non-core components that provide I / O resources is called the I / O clock. The computing clock records the rate at which the processor provides computing resources, while the I / O clock records the frequency at which the processor provides I / O resources. A higher clock frequency indicates a faster rate of providing processing resources.

[0094] The clocks for core and non-core components also have corresponding frequency limits. For example, the upper limit for the computing clock frequency can be 3.2 GHz, and the upper limit for the I / O clock frequency can be 1.6 GHz.

[0095] In this embodiment, the service clock of each target processor is the clock used by each target processor to provide processing resources for the service type. For example, if the service type is the aforementioned IO type, the service clock is the IO clock. If the service type is the aforementioned computation type, the service clock is the computation clock. If the service type is the aforementioned mixed type, the service clock is both the IO clock and the computation clock.

[0096] During implementation, the processing resources to be provided to each core process can be estimated through offline testing or simulation software testing. During the estimation of the preset processing resources, the frequency of the service clock of each target processor is gradually increased in preset steps.

[0097] Using simulation software testing as an example, the process of each target processor providing its idle processing resources to each core processor from 0% to 100% can be simulated using simulation software. During this period, the frequency of the service clock of each target processor is gradually increased in preset steps, that is, the amount of processing resources provided to each core process for the service type is gradually increased, and the performance value of each core process after each frequency increase is determined, until the frequency of the service clock of each target processor reaches the corresponding frequency limit.

[0098] The performance values ​​in this application are reference indicators set according to business requirements, and this application does not limit them. For ease of understanding, only examples are provided. In implementation, reference indicators related to business requirements, such as throughput and load, can be used as performance values. For instance, if the server expects to have high throughput during business operation, throughput can be selected as the performance value. That is, after each increase in the frequency of the business clock of each target processor by a preset step size, the current throughput is recorded as the corresponding performance value. The above process can set corresponding reference indicators according to actual business requirements, and then calculate the performance value that meets the actual business requirements to be applicable to more application scenarios.

[0099] Step 503: Determine the sensitivity coefficient based on the performance value and the preset coefficient range.

[0100] In practical applications, there are various performance fitting functions for different reference indicators. During implementation, the performance values ​​can be fitted according to a pre-selected performance fitting function to obtain the corresponding rate of change of performance values.

[0101] In some possible embodiments, the performance fitting function is either a polynomial function that can be plotted as a curve or a linear function that can be plotted as a straight line. If the performance fitting function is a polynomial function that can be plotted as a curve, then the rate of change of the curve is the rate of change of the performance value. Correspondingly, if the performance fitting function is a linear function that can be plotted as a straight line, then the slope is the rate of change of the performance value.

[0102] To facilitate understanding of the above process for calculating the rate of change of performance values, the following example uses the performance fitting function as a linear function. See below for details. Figure 6 As shown, during the testing phase, the frequency of the service clock of each target processor is gradually increased with a preset step size. Assuming a total of N frequency increases are made, the server performance values ​​F1 to F2 are recorded after each increase in the service clock frequency of each target processor. N Then, the performance values ​​F1 to F... N Substitute the terms into a linear function and find the slope k. This slope k is the rate of change of the performance value.

[0103] To avoid core processes consuming excessive processing resources from non-core processes, a preset coefficient range can be set based on actual needs. In this embodiment, the preset coefficient range can be [0.1, 0.5]. If the calculated rate of change of performance value falls within the preset coefficient range, the sensitivity coefficient of the target service is determined based on this rate of change. If the rate of change of performance value is less than the lower limit of the preset coefficient range, the sensitivity coefficient is determined based on the lower limit. If the rate of change of performance value is greater than the upper limit of the preset coefficient range, the sensitivity coefficient is determined based on the upper limit.

[0104] In some possible embodiments, if the rate of change of the performance value is within a preset coefficient range, then the rate of change of the performance value can be used as a sensitivity coefficient for the target service. Correspondingly, if the rate of change of the performance value is less than the lower limit of the preset coefficient range, then the lower limit is used as the sensitivity coefficient. If the rate of change of the performance value is greater than the upper limit of the preset coefficient range, then the upper limit is used as the sensitivity coefficient.

[0105] When performing step 203, based on the sensitivity coefficient of the target business, a corresponding proportion of processing resources can be selected from the processing resources provided to each non-core process and allocated to each core process; wherein, the sensitivity coefficient is positively correlated with the amount of processing resources.

[0106] During implementation, the amount of processing resources to be processed can be determined based on the amount of processing resources provided to each non-core process and the sensitivity coefficient. Specifically, during the process of each target processor providing processing resources to each process, the processors that provide processing resources to each non-core process can be identified from the target processors, and the amount of processing resources provided by these processors to each non-core process can be counted.

[0107] In some possible embodiments, the amount of processing resources provided to each non-core process and the sensitivity coefficient can be used as the amount of resources to be processed.

[0108] Next, from the processing resources provided to each non-core process, processing resources that meet the required processing volume are determined and divided into multiple portions. Multiple rounds of iterative processing are then performed on these multiple portions of processing resources, with each round of iteration as follows:

[0109] At least one of the multiple processing resources is distributed to each core process;

[0110] If the frequency of the service clock of at least one core processor reaches the frequency threshold, the iteration stops; otherwise, the next iteration begins, until all processing resources are distributed to each core process.

[0111] During implementation, processing resource A can be selected from the processing resources provided to each non-core process, and processing resource A can be divided into M parts. In each iteration, 1 / M of the processing resource A provided to each non-core process is transferred to each core process, and it is checked whether the frequency of the business clock of each core processor has reached the corresponding frequency threshold.

[0112] As mentioned earlier, the core processor in this embodiment is a processor that provides processing resources to the core processes. When the frequency of the core processor's service clock does not reach the frequency threshold, it indicates that the core processor has not yet reached its upper limit in terms of the processing resources of the service types it can provide externally, and the core processor can still provide more processing resources of the service types to each core process.

[0113] Therefore, as long as there are core processors whose business clock frequency has not reached the corresponding frequency threshold, it means that more business-type resources can still be provided to each core process. At this point, the next iteration begins, and 1 / M of the processing resources A provided to each non-core process is redistributed to each core process again, until the business clock frequency of all core processors reaches the corresponding frequency threshold, or after M iterations, that is, all M portions of processing resources A are redistributed to each core process.

[0114] The above process can, under the premise of triggering the power wall mechanism (that is, the total amount of resources provided by each processor to the outside world cannot be increased), transfer some of the processing resources provided by each target processor to each non-core process to each core process, so as to speed up the running speed of the core process and thereby improve the business processing efficiency of the target business.

[0115] Distributing some processing resources from non-core processes to core processes may reduce the total power consumption of all deployed servers within the server. To further improve business processing efficiency, after distributing some processing resources from non-core processes to core processes, the power wall mechanism and core processor frequency reduction should be re-evaluated.

[0116] If the total power of each processor is still detected to be at the power threshold, and at least one core processor among the target processors still has a service clock frequency that has not reached the frequency threshold, then some of the non-service type processing resources provided to each core process will be transferred to the service type processing resources provided to each core process.

[0117] After transferring some processing resources from non-core processes to core processes through step 203, if the power wall mechanism is still triggered and the core processor is still in a downclocked state, it indicates that the running speed of each core process still has room for improvement. However, at this point, the processing resources provided to non-core processes can no longer be transferred to core processes, otherwise it may cause non-core processes to run too slowly, which will affect the overall business processing efficiency.

[0118] As mentioned earlier, core processes are better matched with business types. That is, compared to non-business-related processing resources, business-related processing resources significantly improve the running speed of core processes. Based on this, some non-business-related processing resources can be reduced for each core process, while corresponding business-related processing resources can be increased. This further improves business processing efficiency while ensuring that the total amount of resources provided by each processor remains unchanged.

[0119] During implementation, the target resource quantity can be determined based on the sensitivity coefficient and the reference resource quantity. The reference resource quantity represents the amount of processing resources remaining after deducting business-type processing resources from the processing resources provided to each core process. Then, at least one core processor is controlled to reduce non-business-type processing resources that meet the target resource quantity and increase business-type processing resources that meet the target resource quantity for each core process.

[0120] In some possible embodiments, the product of the sensitivity coefficient and the amount of reference resource can be used as the target resource.

[0121] For ease of understanding, it can be like this: Figure 7As shown, the amount of processing resources of each target processor currently provided to each core process for the service type is detected. As mentioned above, in this embodiment, the target processor that provides processing resources to each core process is referred to as a core processor. Therefore, this involves detecting the amount of processing resources of each core processor in each target processor currently provided to each core process for the service type.

[0122] Assuming the business type is the aforementioned I / O type, the amount of processing resources (i.e., computing resources) remaining after deducting I / O resources from the processing resources currently provided by each target processor to each core process is used as the reference resource amount. Then, the product of the sensitivity coefficient and the reference resource amount is used as the target resource amount. Next, each core processor is controlled to reduce the computing resources provided to each core process by the target resource amount and increase the I / O resources provided to each core process by the target resource amount.

[0123] It's important to note that a processor is internally divided into non-core components that provide I / O resources and core components that provide computational resources. Reducing the computational resources provided by the processor is equivalent to lowering the clock frequency of the core components, while increasing the I / O resources provided is equivalent to increasing the clock frequency of the non-core components.

[0124] In some possible embodiments, the server can... Figure 8 The process shown executes the resource allocation method provided in the embodiments of this application. Figure 8 Flowchart of executing resource allocation methods for the server Figure 1 This includes the following steps:

[0125] Step 801: Obtain the business description information of the target business; wherein, the business description information includes at least: the business type of the target business, and the amount of basic resources required by each process carrying the target business; each process is: determined based on the degree of matching with the business type, whether it is a core process or a non-core process;

[0126] Step 802: Identify the target processors with available processing resources from among the processors;

[0127] Step 803: Check whether the idle processing resources in each target processor are sufficient to support business operation;

[0128] That is, to determine whether the amount of idle processing resources in each target processor is not less than the sum of the basic resources required by each process.

[0129] Step 804: If sufficient resources are available to support business operations, then each target processor will provide the corresponding amount of basic processing resources to each process; otherwise, the resource allocation process will end.

[0130] Step 805: Based on the remaining idle processing resources of each target processor and the set resource ratio, determine the amount of candidate resources;

[0131] During implementation, 90% of the remaining processing resources can be used as candidate resources.

[0132] Step 806: Provide processing resources that match the candidate resource quantity to each core process through each target processor;

[0133] Step 807: Detect whether the power wall mechanism is triggered and whether there is at least one downclocked core processor;

[0134] This step involves performing the detection of step 203 above to determine whether the total power of each processor reaches the power threshold, and whether there is at least one core processor among the target processors whose service clock frequency has not reached the frequency threshold.

[0135] Step 808: If yes, then transfer a portion of the processing resources provided by each target processor to each non-core process to each core process; otherwise, return to step 807 to continue the detection.

[0136] The specific transfer process for this step is as described above. Figure 7 As shown, it will not be elaborated further here.

[0137] Step 809: Check if the power wall mechanism is still triggered and if at least one downclocked core processor still exists;

[0138] Step 810: If yes, control at least one core processor to reduce non-business type processing resources that meet the target resource quantity for each core process, and increase business type processing resources that meet the target resource quantity; otherwise, return to step 809 to continue the detection.

[0139] The specific transfer process for this step is as described above. Figure 7 As shown, it will not be elaborated further here.

[0140] To adapt to more scenarios, before providing the corresponding basic amount of processing resources to each process through each target processor (i.e., the aforementioned step 202), it is also necessary to determine whether the idle processing resources in each target processor are sufficient to support business operation.

[0141] In current server architecture scenarios, there are mainly two business operation scenarios. One is that the server supports mixed deployment, meaning the server can run multiple services simultaneously. The other is that the server does not support mixed deployment, meaning the server can only run one service at a time.

[0142] For scenarios that do not support mixed-deployment services, if the processors deployed on the server are insufficient to provide the necessary processing resources to each process—for example, if a service contains 50 processes, each requiring a total of 40 processors, but the server only has 35 processors deployed—it is clear that the necessary processing resources cannot be allocated to each process. In this case, the service cannot run on the server.

[0143] In such scenarios, if after identifying target processors with available processing resources from among the processors, it is found that the available processing resources on each target processor are insufficient to support business operations, then there is no need to execute the subsequent resource allocation process. In this case, it can be done as follows: Figure 9 As shown, the output will include a message such as "The current processing resources are insufficient to support the operation of the business. Please upgrade the server" to inform relevant personnel that the server is currently unable to run the business.

[0144] For scenarios that support mixed-service operations, since the server can process multiple services simultaneously, the following three situations may occur when processing the target service:

[0145] Scenario 1: The server has sufficient idle processing resources to support the operation of the target business.

[0146] That is, each target processor in the server with idle processing resources can provide the basic resources required by each process of the target business.

[0147] To further improve business processing efficiency, priorities can be pre-set for the target business and other mixed-service businesses with server-side execution permissions. Upon receiving the target business (i.e., obtaining its business description information), it is checked whether each processor has at least one designated processor capable of providing processing resources to at least one specified process. This at least one specified process is the process carrying the specified business; the specified business has a lower priority than the target business.

[0148] If a designated processor exists among the processors, it means that some processing resources are currently being used by low-priority mixed traffic. In this case, a portion of the processing resources provided by at least one designated processor to at least one designated process can be redistributed to the core processes. For example, 50% of the processing resources provided by at least one designated processor to at least one designated process can be redistributed to the core processes to improve their running speed, thus ensuring the processing efficiency of high-priority target traffic.

[0149] Scenario 2: The server has the capability to run the target business, but its idle processing resources are temporarily insufficient;

[0150] In other words, some processing resources in the server are occupied by mixed services, which means that each target processor with idle processing resources is unable to provide the basic resources required by each process of the target service.

[0151] For example Figure 10 As shown, it is assumed that all processors deployed within the server have the same processing resources available to the outside world. The target service comprises 30 processes, and the sum of the basic resources required by each process is equivalent to the processing resources available to the outside world from 8 processors. Figure 10 The server shown has 10 processors deployed, but the processing resources of 4 of these processors are entirely occupied by other mixed-use services. That is, the server currently has 6 processors with available processing resources, which is insufficient to support the operation of the services.

[0152] To ensure business operation, the amount of resources to be allocated can be determined based on the amount of idle processing resources in each target processor and the amount of basic resources required by each process. Through each target processor, the amount of idle processing resources is provided to each process, and the amount of processing resources to be allocated provided by at least one designated processor to at least one designated process is transferred to each process.

[0153] As mentioned above Figure 10 Examples will be provided to illustrate this, specifically as follows: Figure 11 As shown, it is assumed that each processor has the same amount of processing resources available to the outside world. In implementation, the difference between the sum of the basic resource requirements of each process and the amount of idle processing resources in each target processor can be used as the amount of resources to be allocated. That is, 8 - 6 = 2.

[0154] Then, 100% of the processing resources of the six currently idle target processors are allocated to each process. Simultaneously, for the four processors (designated processors) currently occupied by the mixed-service processes, 50% of the processing resources provided by these four designated processors to the mixed-service processes are redistributed to the individual processes. This ensures that the basic resource requirements of each process in the target service are met, guaranteeing the operation of the target service.

[0155] Scenario 3: The server does not have the capability to run the target service;

[0156] In other words, the total processing resources that the deployed processors on the server can provide are less than the basic resource requirements of each process in the target business. At this point, there is no need to execute subsequent resource allocation procedures, and the output can be as described above. Figure 9 The displayed message informs relevant personnel that the server is currently unable to process this transaction.

[0157] Figure 12 For the purposes of this application, the foregoing Figure 8 The optimized process shown allows the server to... Figure 12 The process shown executes the resource allocation method provided in the embodiments of this application. Figure 12 Flowchart of the resource allocator for the server Figure 2 This includes the following steps:

[0158] Step 1201: Obtain the business description information of the target business; wherein, the business description information includes at least: the business type of the target business, and the amount of basic resources required by each process carrying the target business; each process is: a core process or a non-core process determined based on the degree of matching with the business type;

[0159] This step is the same as step 801 mentioned above, and will not be repeated here;

[0160] Step 1202: Identify the target processors with available processing resources from among the processors;

[0161] This step is the same as step 802 mentioned above, and will not be repeated here;

[0162] Step 1203: Determine the amount and value of idle processing resources in each target processor and the processing resources provided by each designated processor to each designated process; wherein, each designated process is a process carrying a designated service; the service priority of the designated service is lower than that of the target service;

[0163] Step 1204: Check whether the total amount and value of resources are less than the sum of the basic resources required by each process;

[0164] If the total amount of resources is not less than the sum of the basic resources required by each process, it indicates that the server has the capability to run the target business.

[0165] Step 1205: If the sum of resource quantities is not less than the sum of basic resource quantities required by each process, then check whether the amount of free resources is less than the sum of basic resource quantities required by each process; where the amount of free resources is the amount of free processing resources in each target processor; otherwise, end the resource allocation process, which indicates that the server does not have the ability to run the target business.

[0166] If the amount of idle resources is less than the sum of the basic resources required by each process, it means that the idle processing resources in the server are sufficient to support the operation of the target business.

[0167] Step 1206: If the amount of free resources is less than the sum of the basic resources required by each process, then provide the processing resources of the free resources to each process through each target processor, and allocate the processing resources of the unallocated resources provided by each designated processor to each designated process; then, jump to the subsequent step 1211.

[0168] During implementation, the difference between the sum of the basic resource requirements of each process and the amount of available resources can be used as the amount of resources to be allocated. This allows sufficient processing resources to be provided to the target service to support its operation, prioritizing the operation of the target service.

[0169] Step 1207: If the amount of free resources is not less than the sum of the basic resources required by each process, then each target processor provides the corresponding basic resources to each process.

[0170] This step is the same as step 804 mentioned above, and will not be repeated here;

[0171] Step 1208: Based on the remaining idle processing resources of each target processor and the set resource ratio, determine the amount of candidate resources;

[0172] This step is the same as step 805 mentioned above, and will not be repeated here;

[0173] Step 1209: Provide processing resources that match the candidate resource quantity to each core process through each target processor;

[0174] This step is the same as step 806 mentioned above, and will not be repeated here;

[0175] Step 1210: Transfer a portion of the processing resources provided by the specified processor to each specified process to each core process;

[0176] During implementation, 50% of the processing resources provided by a designated processor to each designated process can be transferred to each core process.

[0177] Step 1211: Detect whether the power wall mechanism is triggered and whether there is at least one downclocked core processor;

[0178] This step is the same as step 807 mentioned above, and will not be repeated here;

[0179] Step 1212: If yes, then transfer a portion of the processing resources provided by each target processor to each non-core process to each core process; otherwise, return to step 1211 to continue the detection.

[0180] This step is the same as step 808 mentioned above, and will not be repeated here;

[0181] Step 1213: Check if the power wall mechanism is still triggered and if at least one downclocked core processor still exists;

[0182] This step is the same as step 809 mentioned above, and will not be repeated here;

[0183] Step 1214: If yes, control at least one core processor to reduce non-business type processing resources that meet the target resource quantity for each core process, and increase business type processing resources that meet the target resource quantity; otherwise, return to step 1213 to continue the detection.

[0184] This step is the same as step 810 mentioned above, and will not be repeated here.

[0185] To adapt to more application scenarios, the resource allocation method provided in this application embodiment can be integrated into a resident logic unit on the server. Its main function is to execute the resource allocation method provided in this application embodiment when the server needs it, and it will not actively exit unless manually terminated.

[0186] When the logic unit detects that the server has triggered the power wall mechanism, it determines the hardware type of each processor deployed in the server. The hardware type is determined by the processor manufacturer, such as Intel, AMD, etc.

[0187] When at least one core processor is in a downclocked state, control instructions adapted to the hardware type are used to constrain and adjust specific components in the processor in order to execute the resource allocation method of the embodiments of this application.

[0188] Different hardware types of processors are equipped with corresponding control instructions. The control instructions involved in this application mainly include Speed ​​Select Technology (SST) and Uncore Frequency Scaling (UFS).

[0189] The SST instruction is an instruction that allows for on-demand adjustment of the number of processor cores or the clock frequency. As mentioned earlier, adjusting the clock frequency of core components can be achieved using the SST instruction. The UFS instruction is an instruction that allows for on-demand adjustment of the number of processor non-core components or the clock frequency. As mentioned earlier, adjusting the clock frequency of non-core components can be achieved using the SST instruction.

[0190] It should be understood that the naming of control instructions may differ for processors of different hardware types. For example, for Intel processors, the SST instruction is named Intel sst, and the UFS instruction is named Intel ufs. This application does not impose any limitations on this.

[0191] Based on the same inventive concept, embodiments of this application provide a resource allocation device capable of realizing the functions corresponding to the aforementioned resource allocation method. Please refer to... Figure 13 The device includes:

[0192] The information acquisition module 1301 is configured to: acquire business description information of the target business; the business description information includes at least: the business type of the target business, and the amount of basic resources required by each process carrying the target business; each process is: a core process or a non-core process determined based on the degree of matching with the business type;

[0193] The resource allocation module 1302 is configured to: determine each target processor with idle processing resources from each processor, and provide each process with processing resources of a corresponding basic amount through each target processor;

[0194] The resource adjustment module 1303 is configured to: if the total power of each processor reaches the power threshold, and among the target processors, there is at least one core processor whose service clock frequency does not reach the frequency threshold, then a portion of the processing resources provided by each target processor to each non-core process will be transferred to each core process; wherein, the frequency of the service clock represents the rate at which service-type processing resources are provided to each core process; at least one core processor is used to provide processing resources to each core process.

[0195] In some possible embodiments, before providing the corresponding basic amount of processing resources to each process, the resource allocation module 1302 is further configured to:

[0196] Based on the upper frequency limit of the service clock of each target processor, the sensitivity coefficient of the target service is determined; the sensitivity coefficient represents the degree of influence of the processing resources of the service type on the running speed of the target service.

[0197] The resource allocation module 1302 is specifically configured to: allocate a portion of the processing resources provided by each target processor to each non-core process, and then distribute these resources to the core processes.

[0198] Based on the sensitivity coefficient of the target business, a corresponding proportion of processing resources are selected from the processing resources provided to each non-core process and allocated to each core process; whereby the sensitivity coefficient is positively correlated with the amount of processing resources.

[0199] In some possible embodiments, the sensitivity coefficient of the target service is determined based on the upper frequency limit of the service clock of each target processor. Specifically, the resource allocation module 1302 is configured as follows:

[0200] Each target processor is used to estimate the amount of processing resources to be provided to each core process.

[0201] In the process of estimating the processing resources of the preset resource quantity, the frequency of the service clock of each target processor is gradually increased by a preset step size, and the performance value of each core process after each frequency increase is determined until the frequency of the service clock of each target processor reaches the corresponding frequency limit.

[0202] The sensitivity coefficient is determined based on the performance value and the preset coefficient range.

[0203] In some possible embodiments, the sensitivity coefficient is determined based on performance values ​​and a preset coefficient range. Specifically, the resource allocation module 1302 is configured as follows:

[0204] By fitting the performance values, the corresponding rate of change of performance values ​​can be obtained;

[0205] If the rate of change of performance value is within the preset coefficient range, then the sensitivity coefficient is determined based on the rate of change of performance value.

[0206] If the rate of change of the performance value is less than the lower limit of the preset coefficient range, the sensitivity coefficient is determined according to the lower limit of the range.

[0207] If the rate of change of the performance value is greater than the upper limit of the preset coefficient range, the sensitivity coefficient is determined based on the upper limit of the range.

[0208] In some possible embodiments, based on the sensitivity coefficient of the target business, a corresponding proportion of processing resources are selected from the processing resources provided to each non-core process and allocated to each core process. Specifically, the resource adjustment module 1303 is configured as follows:

[0209] The amount of resources to be processed is determined based on the amount of processing resources provided to each non-core process and the sensitivity coefficient.

[0210] From the processing resources provided to each non-core process, determine the processing resources that meet the required amount of processing resources, and divide them into multiple parts; perform multiple rounds of iterative processing on these multiple parts of processing resources, with each round of iteration as follows:

[0211] At least one of the multiple processing resources is distributed to each core process;

[0212] If the frequency of the service clock of at least one core processor reaches the frequency threshold, the iteration stops; otherwise, the next iteration begins, until all processing resources are distributed to each core process.

[0213] In some possible embodiments, after performing a sensitivity coefficient based on the target business, selecting a corresponding proportion of processing resources from the processing resources provided to each non-core process, and allocating them to each core process, the resource adjustment module 1303 is further configured to:

[0214] If the total power of all processors still reaches the power threshold, and among the target processors, there is still at least one core processor whose service clock frequency has not reached the frequency threshold, then the target resource quantity is determined based on the sensitivity coefficient and the reference resource quantity; the reference resource quantity represents the amount of the remaining processing resources provided to each core process, excluding the processing resources for the service type.

[0215] Control at least one core processor, and for each core process, reduce non-business type processing resources that meet the target resource quantity, and increase business type processing resources that meet the target resource quantity.

[0216] In some possible embodiments, the resource adjustment module 1303 is further configured to:

[0217] Based on the remaining idle processing resources of each target processor and the set resource ratio, the number of candidate resources is determined.

[0218] Each target processor provides processing resources to each core process in accordance with the amount of candidate resources.

[0219] In some possible embodiments, before executing the process of providing the corresponding basic amount of processing resources to each process through each target processor, the resource allocation module 1302 is further configured to:

[0220] Determine the amount of idle processing resources in each target processor to meet the basic resource requirements of each process.

[0221] The resource adjustment module 1303 is also configured to: if each processor has at least one designated processor that can provide processing resources to at least one designated process, then transfer a portion of the processing resources provided by the at least one designated processor to the at least one designated process to each core process; wherein, the at least one designated process is a process that carries a designated service; the service priority of the designated service is lower than that of the target service.

[0222] In some possible embodiments, the resource allocation module 1302 is further configured to:

[0223] If the amount of idle processing resources in each target processor does not meet the basic resource requirements of each process, and each processor has at least one designated processor, then the amount of resources to be allocated is determined based on the amount of idle processing resources in each target processor and the basic resource requirements of each process.

[0224] Each target processor provides a certain amount of idle processing resources to each process, and transfers the amount of processing resources to be allocated from at least one designated processor to at least one designated process to each process.

[0225] Please refer to Figure 14 This is a computer device 1400 provided in the embodiments of this application. The computer device 1400 can, for example, be... Figure 1 Server 102. The current and historical versions of the data storage program and the corresponding application software can be installed on computer device 1400, which includes processor 1480 and memory 1420. In some embodiments, computer device 1400 may include display unit 1440, which includes display panel 1441 for displaying user-interactive interfaces, etc.

[0226] In one possible embodiment, the display panel 1441 may be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).

[0227] The processor 1480 is used to read a computer program and then execute the methods defined by the computer program. For example, the processor 1480 reads a data storage program or file, thereby running the data storage program on the computer device 1400 and displaying the corresponding interface on the display unit 1440. The processor 1480 may include one or more general-purpose processors, and may also include one or more DSPs (Digital Signal Processors) for performing related operations to implement the technical solutions provided in the embodiments of this application.

[0228] The memory 1420 generally includes main memory and secondary storage. The main memory can be random access memory (RAM), read-only memory (ROM), and cache, etc. The secondary storage can be a hard disk, optical disk, USB flash drive, floppy disk, or tape drive, etc. The memory 1420 is used to store computer programs and other data. The computer programs include applications corresponding to each client, and the other data may include data generated after the operating system or applications are run, including system data (e.g., operating system configuration parameters) and user data. In this embodiment, the computer program is stored in the memory 1420, and the processor 1480 executes the computer program in the memory 1420 to implement any of the methods described in the preceding figures.

[0229] The aforementioned display unit 1440 is used to receive input digital information, character information, or contact touch operations / non-contact gestures, and to generate signal inputs related to user settings and function control of the computer device 1400. Specifically, in this embodiment, the display unit 1440 may include a display panel 1441. The display panel 1441, for example, is a touch screen, which can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or on the display panel 1441), and drive corresponding connection devices according to a pre-set program.

[0230] In one possible embodiment, the display panel 1441 may include two parts: a touch detection device and a touch controller. The touch detection device detects the player's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 1480. It can also receive and execute commands from the processor 1480.

[0231] The display panel 1441 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the display unit 1440, in some embodiments, the computer device 1400 may also include an input unit 1430. The input unit 1430 may include an image input device 1431 and other input devices 1432, wherein the other input devices may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick.

[0232] In addition to the above, the computer device 1400 may also include a power supply 1490 for powering other modules, an audio circuit 1460, a near-field communication module 1470, and an RF circuit 1410. The computer device 1400 may also include one or more sensors 1450, such as an accelerometer, a light sensor, a pressure sensor, etc. The audio circuit 1460 specifically includes a speaker 1461 and a microphone 1462, for example, the computer device 1400 can use the microphone 1462 to collect the user's voice and perform corresponding operations.

[0233] As one embodiment, the number of processors 1480 can be one or more, and the processors 1480 and the memory 1420 can be coupled together or relatively independent.

[0234] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by a computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the computer program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0235] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of software products, for example, through computer program products. These computer program products are stored in a storage medium and include computer programs used to cause a computer device to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.

[0236] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A resource allocation method, characterized in that, include: Obtain the business description information of the target business; The business description information includes at least: the business type of the target business, and the amount of basic resources required by each process carrying the target business; each process is: a core process or a non-core process, determined based on its matching degree with the business type. From the processors, identify the target processors with idle processing resources, and through the target processors, provide the corresponding basic amount of processing resources to each process; If the total power of all processors reaches a power threshold, and at least one core processor among the target processors has a service clock frequency that does not reach a frequency threshold, then a portion of the processing resources provided by each target processor to each non-core process will be transferred to each core process; wherein, the frequency of the service clock represents the rate at which processing resources of the service type are provided to each core process; the at least one core processor is used to provide processing resources to each core process.

2. The method according to claim 1, characterized in that, Before providing the respective basic amount of processing resources to each process, the method further includes: Based on the upper frequency limit of the service clock of each target processor, the sensitivity coefficient of the target service is determined; the sensitivity coefficient represents the degree of influence of the processing resources of the service type on the running speed of the target service. The step of transferring a portion of the processing resources provided by each target processor to each non-core process to each core process includes: Based on the sensitivity coefficient of the target service, a corresponding proportion of processing resources are selected from the processing resources provided to each non-core process and allocated to each core process; wherein, the sensitivity coefficient is positively correlated with the amount of the partial processing resources.

3. The method according to claim 2, characterized in that, The step of determining the sensitivity coefficient of the target service based on the upper frequency limit of the service clock of each target processor includes: Each target processor is used to estimate the amount of processing resources to be provided to each core process; In the process of estimating the processing resources of the preset resource quantity, the frequency of the service clock of each target processor is gradually increased by a preset step size, and the performance value of each core process after each increase in frequency is determined, until the frequency of the service clock of each target processor reaches the corresponding frequency limit. The sensitivity coefficient is determined based on the performance value and the preset coefficient range.

4. The method according to claim 3, characterized in that, Determining the sensitivity coefficient based on the performance value and a preset coefficient range includes: The performance values ​​are fitted to obtain the corresponding rate of change of performance values; If the rate of change of the performance value is within the range of the preset coefficient, then the sensitivity coefficient is determined based on the rate of change of the performance value. If the rate of change of the performance value is less than the lower limit of the preset coefficient range, then the sensitivity coefficient is determined according to the lower limit of the range; If the rate of change of the performance value is greater than the upper limit of the preset coefficient range, then the sensitivity coefficient is determined according to the upper limit of the range.

5. The method according to claim 2, characterized in that, Based on the sensitivity coefficient of the target service, a corresponding proportion of processing resources are selected from the processing resources provided to each non-core process and allocated to each core process, including: The amount of resources to be processed is determined based on the amount of processing resources provided to each non-core process and the sensitivity coefficient. From the processing resources provided to each non-core process, processing resources that meet the required amount of processing resources are determined and divided into multiple portions; multiple rounds of iterative processing are performed on these multiple portions of processing resources, with each round of iteration as follows: At least one of the multiple processing resources is transferred to each of the core processes; If the frequency of the service clock of at least one core processor reaches the frequency threshold, the iteration stops; otherwise, the next iteration begins until all processing resources are distributed to the respective core processes.

6. The method according to claim 2, characterized in that, After selecting a corresponding proportion of processing resources from the processing resources provided to each non-core process based on the sensitivity coefficient of the target service and allocating them to each core process, the method further includes: If the total power of each processor still reaches the power threshold, and among the target processors, there is still at least one core processor whose service clock frequency has not reached the frequency threshold, then the target resource quantity is determined based on the sensitivity coefficient and the reference resource quantity; the reference resource quantity represents: the amount of remaining processing resources provided to each core process, excluding the processing resources of the service type; Control the at least one core processor to reduce processing resources for non-service types that meet the target resource quantity for each core process, and increase processing resources for service types that meet the target resource quantity.

7. The method according to any one of claims 1-6, characterized in that, After providing the respective basic processing resources to each process through the respective target processors, the method further includes: Based on the remaining idle processing resources of each target processor and in conjunction with the set resource ratio, the number of candidate resources is determined. Each target processor provides processing resources to each core process in accordance with the amount of candidate resources.

8. The method according to any one of claims 1-6, characterized in that, Before providing the respective basic processing resources to each process through the respective target processors, the method further includes: Determine the amount of idle processing resources in each target processor to meet the basic resource requirements of each process. The method further includes: If any of the processors has at least one designated processor that provides processing resources to at least one designated process, then a portion of the processing resources provided by the at least one designated processor to the at least one designated process is transferred to each core process; wherein, the at least one designated process is a process carrying a designated service; the service priority of the designated service is lower than that of the target service.

9. The method according to claim 8, characterized in that, The method further includes: If the amount of idle processing resources in each target processor does not meet the basic resource requirements of each process, and each processor has at least one designated processor, then the amount of resources to be allocated is determined based on the amount of idle processing resources in each target processor and the basic resource requirements of each process. Each target processor provides the processing resources of the available resource amount to each process, and transfers the processing resources of the unallocated resource amount provided by the at least one designated processor to the at least one designated process to each process.

10. A resource allocation device, characterized in that, The device includes: The information acquisition module is configured to: acquire business description information of the target business; the business description information includes at least: the business type of the target business, and the amount of basic resources required by each process carrying the target business; each process is: a core process or a non-core process determined based on the degree of matching with the business type; The resource allocation module is configured to: determine each target processor with idle processing resources from among the processors, and provide each process with processing resources of a corresponding basic amount through each target processor; The resource adjustment module is configured to: if the total power of each processor reaches a power threshold, and among the target processors, at least one core processor whose service clock frequency does not reach a frequency threshold, then a portion of the processing resources provided by each target processor to each non-core process is transferred to each core process; wherein, the frequency of the service clock represents the rate at which processing resources of the service type are provided to each core process; and the at least one core processor is used to provide processing resources to each core process.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1 to 9.

12. A computer device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method as described in any one of claims 1 to 9 according to the obtained program instructions.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method as described in any one of claims 1 to 9.