Resource allocation method and apparatus, and device, storage medium and program product

By dividing the processor core into first and second processor cores and adjusting resources according to actual and target performance values, the problem of insufficient processor core performance was solved, and stable operation of high-performance instances was achieved.

WO2026157783A1PCT designated stage Publication Date: 2026-07-30CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
Filing Date
2025-12-26
Publication Date
2026-07-30

AI Technical Summary

Technical Problem

In electronic devices, the actual operating performance of some processor cores cannot reach the target performance, resulting in poor performance stability of the instances they support.

Method used

The processor core is divided into a first processor core and a second processor core. The second processor core supports high-performance instances. By determining the actual running performance value and target running performance threshold of the target processor core, its running resources are adjusted to reach the target running performance threshold, thus limiting the resource usage of the first processor core.

Benefits of technology

Improved the performance stability of processor core-supported instances, ensuring that high-performance instances can run stably.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025146330_30072026_PF_FP_ABST
    Figure CN2025146330_30072026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure are a resource allocation method and apparatus, and a device, a storage medium and a program product. The method is applied to an electronic device, wherein the electronic device comprises at least one central processing unit, the central processing unit comprises at least one first central processing unit core and at least one second central processing unit core, and the performance of an instance, the running of which is supported by the second central processing unit core, is higher than the performance of an instance, the running of which is supported by the first central processing unit core. The method comprises: determining an actual operating performance value of a target central processing unit core in a central processing unit, wherein the target central processing unit core is any one of at least one first central processing unit core; determining a target operating performance threshold of the target central processing unit core; and on the basis of the actual operating performance value and the target operating performance threshold, adjusting operating resources corresponding to the target central processing unit core, such that an actual operating performance value of a second central processing unit core reaches the corresponding target operating performance threshold. The performance stability of instances supported by central processing unit cores is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Resource allocation methods, devices, equipment, storage media and program products

[0001] This disclosure claims priority to Chinese Patent Application No. 202510115193.3, filed on January 23, 2025, entitled “Resource Allocation Method, Apparatus, Equipment, Storage Medium and Program Product”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This disclosure relates to the field of cloud computing, and in particular to a resource allocation method, apparatus, device, storage medium, and program product. Background Technology

[0003] An electronic device may include at least one processor (Central Processing Unit, CPU). Any CPU may include at least one processor core. A processor core may support running instances (e.g., cloud servers, virtual machines, or containers).

[0004] In related technologies, multiple processor cores can share processor resources. As the number of instances running on an electronic device increases, each processor core competes for processor resources to support its own running instances. However, in the above approach, some processor cores may not utilize sufficient resources, and the actual operating performance of these cores may not reach the target performance, resulting in poor performance stability for the instances supported by those cores. Summary of the Invention

[0005] This disclosure provides a resource allocation method, apparatus, device, storage medium, and program product to address the problem of poor performance stability of instances supported by certain processor cores.

[0006] In a first aspect, embodiments of this disclosure provide a resource allocation method applied to an electronic device, the electronic device including at least one processor, the processor including at least one first processor core and at least one second processor core, wherein the performance of an instance supported by the second processor core is higher than the performance of an instance supported by the first processor core, the method comprising:

[0007] Determine the actual operating performance value of the target processor core in the processor, wherein the target processor core is any one of the at least one first processor core;

[0008] Determine the target operating performance threshold of the target processor core, wherein the target operating performance threshold is used to represent the maximum operable performance of the target processor core;

[0009] Based on the actual operating performance value and the target operating performance threshold, the operating resources corresponding to the target processor core are adjusted so that the actual operating performance value of the second processor core reaches the corresponding target operating performance threshold.

[0010] In one possible implementation, adjusting the runtime resources corresponding to the target processor core based on the actual runtime performance value and the target runtime performance threshold includes:

[0011] Determine the deviation between the target operating performance threshold and the actual operating performance value;

[0012] Based on the deviation value, resource adjustment information corresponding to the target processor core is determined, and the resource adjustment information includes at least one resource adjustment amount corresponding to at least one operating indicator of the target processor core;

[0013] Based on the resource adjustment information, adjust the running resources corresponding to the target processor core.

[0014] In one possible implementation, determining the resource adjustment information corresponding to the target processor core based on the deviation value includes:

[0015] Determine the preset control coefficients;

[0016] The control value is determined based on the deviation value and the preset control coefficient;

[0017] Based on the control value, determine the resource adjustment information corresponding to the target processor core.

[0018] In one possible implementation, determining the actual operating performance value of the target processor core in the processor includes:

[0019] Obtain the actual operating information of the target processor core;

[0020] Based on the actual operating information, the actual operating performance value of the target processor core is determined.

[0021] In one possible implementation, the actual operating information includes actual operating data corresponding to each operating indicator in at least one operating indicator; determining the actual operating performance value of the target processor core based on the actual operating information includes:

[0022] Determine the weighting coefficient and operating benchmark value for each of the at least one operating indicators;

[0023] For any given performance indicator, the performance contribution value corresponding to the performance indicator is determined based on the weighting coefficient of the performance indicator, the performance benchmark value, and the actual performance data.

[0024] The actual operating performance value is determined based on the performance contribution value corresponding to each of the at least one operating indicator.

[0025] In one possible implementation, for any given performance metric, the performance contribution value corresponding to the performance metric is determined based on the weighting coefficient of the performance metric, the performance baseline value, and the actual performance data, including:

[0026] Determine the ratio of the actual operating data corresponding to the operating indicator to the corresponding operating benchmark value;

[0027] The product of the ratio and the weighting coefficient corresponding to the operating indicator is determined as the performance contribution value corresponding to the operating indicator.

[0028] In one possible implementation, the method further includes:

[0029] Obtain the actual operating information of the processor;

[0030] The actual operating performance value of the processor is determined based on the actual operating information of the processor.

[0031] In one possible implementation, adjusting the runtime resources corresponding to the target processor core based on the actual runtime performance value and the target runtime performance threshold includes:

[0032] When the actual operating performance value of the processor is less than or equal to the first performance threshold, the operating resources corresponding to the target processor core are adjusted according to the actual operating performance value and the target operating performance threshold.

[0033] In one possible implementation, when the actual operating performance value of the processor is less than or equal to a first performance threshold, the operating resources corresponding to the target processor core are adjusted according to the actual operating performance value and the target operating performance threshold, including:

[0034] When the actual operating performance value of the processor is greater than or equal to the second performance threshold and less than or equal to the first performance threshold, the operating resources corresponding to the target processor core are adjusted according to the actual operating performance value and the target operating performance threshold, wherein the second performance threshold is less than the first performance threshold;

[0035] When the actual operating performance value of the processor is less than the second performance threshold, the operating resources corresponding to the target processor core are increased according to the actual operating performance value and the target operating performance threshold.

[0036] In one possible implementation, the method further includes:

[0037] When the actual operating performance value of the processor is greater than the first performance threshold, the target instance running on the target processor core is migrated.

[0038] Secondly, embodiments of this disclosure provide a resource allocation device applied to an electronic device, the electronic device including at least one processor, the processor including at least one first processor core and at least one second processor core, wherein the performance of the instance supported by the second processor core is higher than the performance of the instance supported by the first processor core, the device including: a first determining module, a second determining module, and an adjusting module, wherein...

[0039] The first determining module is used to determine the actual operating performance value of the target processor core in the processor, wherein the target processor core is any one of the at least one first processor core;

[0040] The second determining module is used to determine the target operating performance threshold of the target processor core, wherein the target operating performance threshold is used to represent the maximum operable performance of the target processor core;

[0041] The adjustment module is used to adjust the running resources corresponding to the target processor core according to the actual running performance value and the target running performance threshold, so that the actual running performance value of the second processor core reaches the corresponding target running performance threshold.

[0042] In one possible implementation, the adjustment module is specifically used for:

[0043] Determine the deviation between the target operating performance threshold and the actual operating performance value;

[0044] Based on the deviation value, resource adjustment information corresponding to the target processor core is determined, and the resource adjustment information includes at least one resource adjustment amount corresponding to at least one operating indicator of the target processor core;

[0045] Based on the resource adjustment information, adjust the running resources corresponding to the target processor core.

[0046] In one possible implementation, the adjustment module is specifically used for:

[0047] Determine the preset control coefficients;

[0048] The control value is determined based on the deviation value and the preset control coefficient;

[0049] Based on the control value, determine the resource adjustment information corresponding to the target processor core.

[0050] In one possible implementation, the first determining module is specifically used for:

[0051] Obtain the actual operating information of the target processor core;

[0052] Based on the actual operating information, the actual operating performance value of the target processor core is determined.

[0053] In one possible implementation, the actual operating information includes actual operating data corresponding to each operating indicator among at least one operating indicator; the first determining module is specifically used for:

[0054] Determine the weighting coefficient and operating benchmark value for each of the at least one operating indicators;

[0055] For any given performance indicator, the performance contribution value corresponding to the performance indicator is determined based on the weighting coefficient of the performance indicator, the performance benchmark value, and the actual performance data.

[0056] The actual operating performance value is determined based on the performance contribution value corresponding to each of the at least one operating indicator.

[0057] In one possible implementation, the first determining module is specifically used for:

[0058] Determine the ratio of the actual operating data corresponding to the operating indicator to the corresponding operating benchmark value;

[0059] The product of the ratio and the weighting coefficient corresponding to the operating indicator is determined as the performance contribution value corresponding to the operating indicator.

[0060] In one possible implementation, the first determining module is further configured to:

[0061] Obtain the actual operating information of the processor;

[0062] The actual operating performance value of the processor is determined based on the actual operating information of the processor.

[0063] In one possible implementation, the adjustment module is specifically used for:

[0064] When the actual operating performance value of the processor is less than or equal to the first performance threshold, the operating resources corresponding to the target processor core are adjusted according to the actual operating performance value and the target operating performance threshold.

[0065] In one possible implementation, the adjustment module is specifically used for:

[0066] When the actual operating performance value of the processor is greater than or equal to the second performance threshold and less than or equal to the first performance threshold, the operating resources corresponding to the target processor core are adjusted according to the actual operating performance value and the target operating performance threshold, wherein the second performance threshold is less than the first performance threshold;

[0067] When the actual operating performance value of the processor is less than the second performance threshold, the operating resources corresponding to the target processor core are increased according to the actual operating performance value and the target operating performance threshold.

[0068] In one possible implementation, the adjustment module is further configured to:

[0069] When the actual operating performance value of the processor is greater than the first performance threshold, the target instance running on the target processor core is migrated.

[0070] Thirdly, embodiments of this disclosure provide an electronic device, including: a memory and a processor;

[0071] The memory stores computer-executed instructions;

[0072] The processor executes computer execution instructions stored in the memory, causing the processor to perform the method described in any of the first aspects.

[0073] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the method described in any of the first aspects.

[0074] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the method shown in any of the first aspects.

[0075] This disclosure provides a resource allocation method, apparatus, device, storage medium, and program product. Multiple processor cores in an electronic device can be divided into first processor cores and second processor cores. First processor cores can support low-performance instances, and second processor cores can support high-performance instances. The electronic device can determine the actual operating performance value of a target processor core and a target operating performance threshold for that target processor core. Then, based on the actual operating performance value and the target operating performance threshold, the operating resources corresponding to the target processor core can be adjusted so that the actual operating performance value of the second processor core reaches the corresponding target operating performance threshold. The target processor core can be any one of the first processor cores. By dividing the multiple processor cores in the electronic device into first and second processor cores and adjusting the operating resources of any one of the first processor cores based on the actual operating performance value and the target operating performance threshold, the use of operating resources by the first processor core is limited. This avoids the first processor core consuming excessive operating resources while stably running low-performance instances, allowing the second processor core to consume more operating resources. This ensures that the actual operating performance value of the second processor core reaches the corresponding target operating performance threshold, thereby enabling the high-performance instances supported by the second processor core to run stably and improving the performance stability of the instances supported by each processor core. Attached Figure Description

[0076] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this disclosure, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation of the disclosure. In the drawings:

[0077] Figure 1 is a schematic diagram of the relevant technology;

[0078] Figure 2 is a schematic diagram illustrating the changes in single-core operating performance provided by an exemplary embodiment of this disclosure;

[0079] Figure 3 is a flowchart illustrating a resource allocation method provided by an exemplary embodiment of this disclosure;

[0080] Figure 4 is a schematic diagram of the first processor core and the second processor core provided in an exemplary embodiment of this disclosure;

[0081] Figure 5 is a schematic diagram of the structure of a CPU provided in an exemplary embodiment of this disclosure;

[0082] Figure 6 is a flowchart illustrating another resource allocation method provided by an exemplary embodiment of this disclosure;

[0083] Figure 7 is a flowchart illustrating another resource allocation method provided by an exemplary embodiment of this disclosure;

[0084] Figure 8 is a schematic diagram showing the average operating performance variation of the first processor core and the second processor core provided in an exemplary embodiment of this disclosure;

[0085] Figure 9 is a schematic diagram of the structure of a resource allocation device provided in an exemplary embodiment of this disclosure;

[0086] Figure 10 is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present disclosure. Detailed Implementation

[0087] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0088] To make the objectives, technical solutions, and advantages of this disclosure clearer, the technical solutions of this disclosure will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0089] The relevant technologies will now be explained in detail with reference to Figure 1.

[0090] Figure 1 is a schematic diagram of the relevant technology. Referring to Figure 1, the electronic device may include at least one CPU. For any CPU, the CPU may include at least one Core. For example, the electronic device may include CPU1 and CPU2, and CPU1 and CPU2 may include 18 Cores.

[0091] An electronic device can run at least one instance, which can be used to run applications. For example, an electronic device can run instances E1, E2, E3, and E4. Instance E1 can run online games, instance E2 can run financial applications, instance E3 can run offline applications, and instance E4 can run enterprise websites.

[0092] Multiple cores in an electronic device can support the operation of these four instances. This means that multiple cores can be allocated indiscriminately to any instance to support its operation. For example, nine cores from CPU1 can be allocated to instance E1 to support the operation of instance E1; another nine cores from CPU1 can be allocated to instance E2 to support the operation of instance E2; nine cores from CPU2 can be allocated to instance E3 to support the operation of instance E3; and six cores from CPU2 can be allocated to instance E4 to support the operation of instance E4.

[0093] As the number of instances in an electronic device increases, the number of cores running in the electronic device increases. Multiple cores will compete for CPU resources, and the average performance of a single core will decrease accordingly, as shown in Figure 2.

[0094] Figure 2 is a schematic diagram illustrating the variation in single-core performance provided by an exemplary embodiment of this disclosure. Referring to Figure 2, assuming the maximum average single-core performance is 5, if the electronic device includes 36 cores, as the number of instances in the electronic device increases and / or the application load within the instances increases, the number of running cores increases, and each core competes for CPU resources, causing the average single-core performance to gradually decrease from 5. When all 36 cores in the electronic device are running, the average single-core performance is around 3. At this point, the average performance of all 36 cores cannot reach 5, leading to high response latency and computing power fluctuations in the instances supported by each core, resulting in poor instance performance stability.

[0095] To address the aforementioned issues, this disclosure provides a resource allocation method. Multiple processor cores in an electronic device can be divided into first processor cores and second processor cores. The performance of instances supported by the second processor core can be higher than that of instances supported by the first processor core. The electronic device can determine the actual operating performance value and target operating performance threshold of a target processor core, and adjust the operating resources corresponding to the target processor core based on these values, so that the actual operating performance value of the second processor core reaches the corresponding target operating performance threshold. The target processor core is any one of at least one first processor core. By dividing multiple processor cores in the electronic device into first and second processor cores, and adjusting the operating resources of any one first processor core based on its actual operating performance value and target operating performance threshold, the use of operating resources by the first processor core is limited. This avoids the first processor core consuming excessive operating resources while stably running low-performance instances, allowing the second processor core to utilize more operating resources. This ensures that the actual operating performance value of the second processor core reaches the corresponding target operating performance threshold, thereby enabling the high-performance instances supported by the second processor core to run stably and improving the performance stability of instances supported by each processor core.

[0096] The technical solutions disclosed herein will now be described in detail through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; identical or similar content will not be repeated in different embodiments.

[0097] The execution subject of this disclosure can be an electronic device or a resource allocation device installed in an electronic device. The resource allocation device can be implemented in software or a combination of software and hardware. The resource allocation device can be a processor in the electronic device. For ease of understanding, the following description will use an electronic device as the execution subject.

[0098] Figure 3 is a flowchart illustrating a resource allocation method provided by an exemplary embodiment of this disclosure. Referring to Figure 3, the method may include:

[0099] S301. Determine the actual operating performance value of the target processor core in the processor.

[0100] An electronic device may include at least one processor. For any given processor, the processor may include at least one first processor core and at least one second processor core.

[0101] The performance of instances supported by the second processor core can be higher than that of instances supported by the first processor core. That is, the first processor core can be used to support low-performance instances, and the second processor core can be used to support high-performance instances.

[0102] For example, a low-performance instance can be an instance with a response latency greater than or equal to 100ms and a computing power of less than 4; a high-performance instance can be an instance with a response latency of less than 100ms and / or a computing power greater than or equal to 4.

[0103] The first and second processor cores in the electronic device will be described below with reference to Figure 4.

[0104] Figure 4 is a schematic diagram of a first processor core and a second processor core provided in an exemplary embodiment of this disclosure. Referring to Figure 4, the electronic device may include CPU1 and CPU2, and CPU1 and CPU2 may include 18 cores.

[0105] An electronic device can run multiple instances. These instances can include high-performance instances and low-performance instances. For example, instance E1 running an online game, instance E2 running a financial application, and instance E3 running an offline big data application can all be high-performance instances; instance E4 running an enterprise website can be a low-performance instance.

[0106] For example, if Cores 1-9 in CPU1 support running instance E1, Cores 10-18 support running instance E2, and Cores 7-18 in CPU2 support running instance E3, then since instances E1, E2, and E3 are all high-performance instances, it can be determined that Cores 1-18 in CPU1 and Cores 7-18 in CPU2 are all secondary processor cores. If Cores 1-6 in CPU2 support running instance E4, then since instance E4 is a low-performance instance, it can be determined that Cores 1-6 in CPU2 are all primary processor cores.

[0107] It should be noted that the CPU structure in Figure 4 is a single-die structure, meaning the CPU consists of only one die. Alternatively, the CPU structure can also be a multi-die structure, as shown in Figure 5.

[0108] Figure 5 is a schematic diagram of a CPU structure provided by an exemplary embodiment of this disclosure. Referring to Figure 5, the CPU may include 6 dies, and each die may include multiple cores. Among them, the cores on Die1, Die3, Die4, and Die6 may all be first processor cores, and the cores on Die2 and Die5 may all be second processor cores.

[0109] The target processor core can be any one of at least one first processor core.

[0110] Actual performance values ​​can be used to characterize the actual performance of a target processor core. For example, actual performance values ​​can be actual computing power values.

[0111] Optionally, the actual operating performance value of the target processor core in the processor can be determined by: obtaining the actual operating information of the target processor core; and determining the actual operating performance value of the target processor core based on the actual operating information.

[0112] The actual operation information may include the actual operation data corresponding to each operation indicator in at least one operation indicator.

[0113] For example, at least one operating metric may include at least one of the following: power consumption, operating frequency, core utilization, last-level cache (LLC) bandwidth, LLC capacity, and memory bandwidth.

[0114] For example, electronic devices can obtain the actual operating information of the target processor core, as shown in Table 1:

[0115] Table 1

[0116] The electronic device can then determine the actual operating performance value of the target processor core based on the actual operating information in Table 1. Assume the actual operating performance value of the target processor core is 4.2.

[0117] S302. Determine the target operating performance threshold of the target processor core.

[0118] The target runtime performance threshold can be used to represent the maximum runnable performance of the target processor core.

[0119] Optionally, the target performance threshold can be preset by the user. For example, the target performance threshold can be 3.0.

[0120] For example, an electronic device can determine that the target operating performance threshold for the target processor core is 3.0.

[0121] S303. Based on the actual operating performance value and the target operating performance threshold, adjust the operating resources corresponding to the target processor core so that the actual operating performance value of the second processor core reaches the corresponding target operating performance threshold.

[0122] Electronic devices can determine the resource adjustment information corresponding to the target processor core based on the actual operating performance and target operating performance of the target processor core, and adjust the operating resources corresponding to the target processor core according to the resource adjustment information.

[0123] The resource adjustment information may include at least one resource adjustment amount corresponding to at least one operational indicator.

[0124] Optionally, the operating resources corresponding to the target processor core can be adjusted based on the actual operating performance value and the target operating performance threshold in the following manner: determining the deviation between the target operating performance threshold and the actual operating performance value; determining the resource adjustment information corresponding to the target processor core based on the deviation value; and adjusting the operating resources corresponding to the target processor core based on the resource adjustment information.

[0125] Optionally, the deviation value = target operating performance threshold - actual operating performance value. If the deviation value is positive, the operating resources corresponding to the target processor core can be increased based on the deviation value; if the deviation value is negative, the operating resources corresponding to the target processor core can be decreased based on the deviation value.

[0126] Optionally, the electronic device may have a preset correspondence between deviation values ​​and resource adjustment information.

[0127] For example, if the deviation value is represented by D, the correspondence between the deviation value and resource adjustment information can be shown in Table 2:

[0128] Table 2

[0129] The negative sign "-" indicates a reduction in the amount of resources allocated to the target processor core.

[0130] For example, if an electronic device determines that the actual operating performance value of the target processor core is 4.2 and the target operating performance threshold is 3.0, then the deviation between the target operating performance threshold and the actual operating performance value can be determined to be 3 - 4.2 = -1.2. If the correspondence between the deviation value and the resource adjustment information is as shown in Table 1, since the deviation value is -1.2, the electronic device can determine the resource adjustment information corresponding to the target processor core based on this deviation value, including a power consumption adjustment of -10W, an operating frequency adjustment of -0.2GHz, a core utilization adjustment of -10%, an LLC bandwidth adjustment of -20GB / s, an LLC capacity adjustment of -10MB, and a memory bandwidth adjustment of -5GB / s.

[0131] In the technical solution disclosed herein, since the electronic device has a pre-stored correspondence between deviation values ​​and resource adjustment information, after the electronic device determines the deviation value between the target operating performance threshold and the actual operating performance value, it can quickly determine the resource adjustment information corresponding to the target processor core based on the deviation value, and then adjust the operating resources corresponding to the target processor core based on the resource adjustment information, thereby improving the efficiency of adjusting the operating resources corresponding to the target processor core.

[0132] Optionally, the running resources corresponding to the target processor core can be adjusted according to the resource adjustment information in the following way: determine the initial running resources corresponding to the target processor core; adjust the initial running resources corresponding to the target processor core to the target running resources according to the resource adjustment information.

[0133] Optionally, the initial operating resources may include the initial resource quantity corresponding to at least one operating metric. The target operating resources may include the target resource quantity corresponding to at least one operating metric.

[0134] Based on the resource adjustment information, the initial running resources corresponding to the target processor core are adjusted to the target running resources, so that the actual running resources available to the target processor core do not exceed the target running resources. This achieves the limitation on the running resources used by the target processor core and avoids the target processor core occupying too many running resources when running low-performance instances stably.

[0135] For example, if the initial runtime resources corresponding to the target processor core are as shown in Table 3:

[0136] Table 3

[0137] If the resource adjustment information corresponding to the target processor core includes a power consumption adjustment of -10W, an operating frequency adjustment of -0.2GHz, a core utilization adjustment of -10%, an LLC bandwidth adjustment of -20GB / s, an LLC capacity adjustment of -10MB, and a memory bandwidth adjustment of -5GB / s, then the initial resource amount corresponding to each operating indicator can be reduced according to the resource adjustment information to obtain the target operating resources corresponding to the target processor core, as shown in Table 3.

[0138] In this embodiment, the electronic device can determine the actual operating performance value of a target processor core in the processor and determine the target operating performance threshold of the target processor core. Then, based on the actual operating performance value and the target operating performance threshold, the operating resources corresponding to the target processor core can be adjusted so that the actual operating performance value of the second processor core reaches the corresponding target operating performance threshold. Since multiple processor cores in the electronic device can be divided into first processor cores and second processor cores, and the operating resources of any first processor core can be adjusted based on the actual operating performance value and the target operating performance threshold, the use of operating resources by the first processor core is limited. This avoids the first processor core consuming excessive operating resources while stably running low-performance instances, allowing the second processor core to consume more operating resources. This ensures that the actual operating performance value of the second processor core reaches the corresponding target operating performance threshold, thereby enabling the high-performance instances supported by the second processor core to run stably and improving the performance stability of the instances supported by each processor core.

[0139] The resource allocation method described above will now be explained in detail based on the embodiment in Figure 3 and in conjunction with Figure 6.

[0140] Figure 6 is a flowchart illustrating another resource allocation method provided by an exemplary embodiment of this disclosure. Referring to Figure 6, the method may include:

[0141] S601, Obtain the actual operating information of the target processor core.

[0142] For example, electronic devices can obtain the actual operating information of the target processor core, as shown in Table 1.

[0143] S602. Determine the actual operating performance value of the target processor core based on the actual operating information.

[0144] Since the actual operating information of the target processor core includes actual operating data corresponding to at least one operating indicator, the electronic device can determine the performance contribution value corresponding to each operating indicator based on the actual operating data corresponding to each operating indicator, and determine the actual operating performance value of the target processor core based on the performance contribution value corresponding to each operating indicator.

[0145] Optionally, the actual operating performance value of the target processor core can be determined based on actual operating information in the following ways: determine the weight coefficient and operating baseline value corresponding to each operating indicator in at least one operating indicator; for any operating indicator, determine the performance contribution value corresponding to the operating indicator based on the weight coefficient, operating baseline value, and actual operating data; and determine the actual operating performance value based on the performance contribution value corresponding to each operating indicator in at least one operating indicator.

[0146] Optionally, any operational indicator has a corresponding weighting coefficient and a benchmark value. Both the weighting coefficient and the benchmark value can be preset manually.

[0147] Optionally, for any given performance indicator, the performance contribution value can be determined by the following method, based on the weighting coefficient of the performance indicator, the benchmark value, and the actual performance data: determine the ratio of the actual performance data corresponding to the performance indicator to the corresponding benchmark value; and multiply the ratio by the weighting coefficient of the performance indicator to determine the performance contribution value corresponding to the performance indicator.

[0148] For example, for the target processor core, the weighting coefficients, benchmark values, and actual operating data for each operating metric are shown in Table 4:

[0149] Table 4

[0150] Regarding power consumption, the electronic device can determine that the ratio of the actual operating data of 20W to the corresponding operating baseline value of 10W is 2, and then determine that the performance contribution value corresponding to power consumption is the product of this ratio 2 and the corresponding weighting coefficient 0.3, which is 0.6. Similarly, the electronic device can determine the corresponding performance contribution values ​​for operating frequency, core utilization, LLC bandwidth, LLC capacity, and memory bandwidth, as shown in Table 4.

[0151] Optionally, the electronic device may determine the actual operating performance value as the sum of the performance contribution values ​​corresponding to each operating indicator, or as the product of the performance contribution values ​​corresponding to each operating indicator, etc.

[0152] For example, if the performance contribution values ​​corresponding to each operating indicator of the target processor core are as shown in Table 4, and if the actual operating performance value is the sum of the performance contribution values ​​corresponding to each operating indicator, then the electronic device can determine that the actual operating performance value of the target processor core is 0.60+0.55+0.77+0.73+0.93+0.66≈4.2.

[0153] S603. Determine the target operating performance threshold for the target processor core.

[0154] For example, an electronic device can determine that the target operating performance threshold for the target processor core is 3.0.

[0155] S604. Determine the deviation between the target operating performance threshold and the actual operating performance value.

[0156] For example, if an electronic device determines that the actual operating performance value of the target processor core is 4.2 and the target operating performance threshold is 3, then the deviation between the target operating performance threshold and the actual operating performance value can be determined to be 3-4.2=-1.2.

[0157] S605. Based on the deviation value, determine the resource adjustment information corresponding to the target processor core.

[0158] In an optional embodiment, the electronic device may have a pre-defined correspondence between deviation values ​​and resource adjustment information. For example, the correspondence between deviation values ​​and resource adjustment information may be as shown in Table 2. In this case, the electronic device can directly determine the resource adjustment information corresponding to the target processing core based on the deviation value. The resource adjustment information may include the resource adjustment amount corresponding to each operating indicator.

[0159] In another optional embodiment, the resource adjustment information corresponding to the target processor core can be determined based on the deviation value in the following manner: determining a preset control coefficient; determining a control value based on the deviation value and the preset control coefficient; and determining the resource adjustment information corresponding to the target processor core based on the control value.

[0160] Optionally, the preset control coefficient can be manually preset based on experience. The preset control coefficient can be used to represent the intensity of adjustment and control over the resource quantity. For example, the preset control coefficient can be 2.

[0161] Optionally, the control value can be the product or ratio of the deviation value and the preset control system.

[0162] Electronic devices can have a preset correspondence between control values ​​and resource adjustment information.

[0163] For example, if the preset control coefficient is 2, the control value is represented by U. The control value is the product of the deviation value and the preset control coefficient. The correspondence between the control value and the resource adjustment information is shown in Table 5.

[0164] Table 5

[0165] If the electronic device determines that the deviation between the target operating performance threshold and the actual operating performance value is -1.2, then the control value can be determined as deviation value -1.2 * preset control coefficient 2 = -2.4. Based on the control value -2.4, the electronic device can determine the resource adjustment information corresponding to the target processor core in Table 5, including power consumption adjustment of -10W, operating frequency adjustment of -0.2GHz, core utilization adjustment of -10%, LLC bandwidth adjustment of -20GB / s, LLC capacity of -10MB, and memory bandwidth adjustment of -5GB / s.

[0166] S606. Adjust the running resources corresponding to the target processor core based on the resource adjustment information.

[0167] Optionally, the running resources corresponding to the target processor core can be adjusted according to the resource adjustment information in the following way: determine the initial running resources corresponding to the target processor core; adjust the initial running resources corresponding to the target processor core to the target running resources according to the resource adjustment information.

[0168] For example, if the initial operating resources corresponding to the target processor core are as shown in Table 3, and if the resource adjustment information corresponding to the target processor core includes a power consumption adjustment of -10W, an operating frequency adjustment of -0.2GHz, a core utilization adjustment of -10%, an LLC bandwidth adjustment of -20GB / s, an LLC capacity adjustment of -10MB, and a memory bandwidth adjustment of -5GB / s, then the initial resource amount corresponding to each operating indicator can be reduced according to the resource adjustment information to obtain the target operating resources corresponding to the target processor core, as shown in Table 3.

[0169] It should be noted that the various processing steps (S601-S606) shown in the embodiment of FIG6 do not constitute a specific limitation on the resource allocation process. In other embodiments of this disclosure, the resource allocation process may include more or fewer steps than in the embodiment of FIG6. For example, the resource allocation process may include some of the steps in the embodiment of FIG6, or some steps in the embodiment of FIG6 may be replaced by steps with the same function, or some steps in the embodiment of FIG6 may be split into multiple steps, etc.

[0170] In this embodiment, the electronic device can acquire the actual operating information of the target processor core and determine the actual operating performance value of the target processor core based on the actual operating information. The electronic device can determine the target operating performance threshold of the target processor core and determine the deviation value between the target operating performance threshold and the actual operating performance value. The electronic device can determine the resource adjustment information corresponding to the target processor core based on the deviation value and adjust the operating resources corresponding to the target processor core based on the resource adjustment information. Since multiple processor cores in the electronic device can be divided into first processor cores and second processor cores, and the operating resources of any first processor core can be adjusted based on the actual operating performance value and the target operating performance threshold, the use of operating resources by the first processor core is restricted. This avoids the first processor core from occupying too many operating resources while running low-performance instances stably, allowing the second processor core to occupy more operating resources. This ensures that the actual operating performance value of the second processor core reaches the corresponding target operating performance threshold, thereby enabling the high-performance instances supported by the second processor core to run stably and improving the performance stability of the instances supported by each processor core.

[0171] Below, based on any of the above embodiments and in conjunction with Figure 7, another resource allocation method is provided.

[0172] Figure 7 is a flowchart illustrating another resource allocation method provided by an exemplary embodiment of this disclosure. Referring to Figure 7, the method may include:

[0173] S701. Determine the actual operating performance value of the target processor core in the processor.

[0174] S702, Determine the target operating performance threshold of the target processor core.

[0175] It should be noted that the specific execution process of steps S701 to S702 can be found in steps S301 to S302, and will not be repeated here.

[0176] S703: Obtain the actual operating information of the processor.

[0177] The actual operating information of the processor refers to the entire processor (i.e., the processor where the target processor core resides). Optionally, the actual operating information of the processor may include the actual operating data of the processor corresponding to each operating metric in at least one operating metric.

[0178] For example, at least one operating metric may include at least one of the following: power consumption, operating frequency, CPU utilization, LLC bandwidth, LLC capacity, and memory bandwidth.

[0179] For example, if the processor containing the target processor core is CPU1, the electronic device can obtain the actual operating information of CPU1 as shown in Table 6:

[0180] Table 6

[0181] S704. Determine the actual operating performance value of the processor based on the actual operating information of the processor.

[0182] The actual operating performance value of a processor can be used to characterize the processor's actual operating performance. For example, the actual operating performance value of a processor can be the processor's actual computing power value.

[0183] Optionally, the actual operating performance value of the processor can be determined based on the actual operating information of the processor in the following ways: determine the weight coefficient and processor operating baseline value corresponding to each operating indicator in at least one operating indicator; for any operating indicator, determine the processor performance contribution value corresponding to the operating indicator based on the weight coefficient of the operating indicator, the processor operating baseline value, and the actual operating data of the processor; determine the actual operating performance value of the processor based on the processor performance contribution value corresponding to each operating indicator in at least one operating indicator.

[0184] Optionally, for each processor, any performance metric has a corresponding weighting coefficient and a processor performance baseline value. Both the weighting coefficient and the processor performance baseline value can be preset manually.

[0185] Optionally, for any given performance metric, the processor performance contribution value corresponding to the performance metric can be determined as follows, based on the weighting coefficient of the performance metric, the processor performance baseline value, and the actual processor performance data: determine the processor performance ratio between the actual processor performance data corresponding to the performance metric and the corresponding processor performance baseline value; and multiply the processor performance ratio by the weighting coefficient corresponding to the performance metric to determine the processor performance contribution value corresponding to the performance metric.

[0186] For example, if the processor containing the target processor core is CPU1, the actual processor operating data corresponding to each operating metric for CPU1 is shown in Table 6, and the weight coefficients and processor operating baseline values ​​corresponding to each operating metric are shown in Table 7.

[0187] Table 7

[0188] Regarding power consumption, the electronic device can determine that the processor performance ratio between the actual operating data of 220W and the corresponding processor operating baseline value of 160W is 1.38. Therefore, the processor performance contribution value corresponding to power consumption can be determined as the product of the processor performance ratio of 1.38 and the corresponding weighting coefficient of 0.3, which is 0.41. Similarly, the electronic device can determine the corresponding processor performance contribution values ​​for operating frequency, CPU utilization, LLC bandwidth, LLC capacity, and memory bandwidth, as shown in Table 7. If the actual operating performance value of the processor is the sum of the performance contribution values ​​of each processor, then the electronic device can determine that the actual operating performance value of the processor is 0.41 + 0.60 + 0.73 + 1.06 + 0.95 + 0.75 = 4.5.

[0189] S705. Determine whether the actual operating performance value of the processor is less than or equal to the first performance threshold.

[0190] Optionally, the first performance threshold can be preset manually. For example, the first performance threshold can be 4.25.

[0191] The electronic device can determine whether the processor's actual operating performance value is less than or equal to a first performance threshold. If yes, it means that the processor's actual operating performance has not yet reached a high level, and there are still enough operating resources in the processor for adjustment, so S706 can be executed; if no, it means that the processor's actual operating performance has reached a high level, and there are no longer enough operating resources in the processor for adjustment, so S707 can be executed.

[0192] For example, if the processor's actual operating performance value is 3.8 and the first performance threshold is 4.25, then S706 can be executed because the processor's actual operating performance value of 3.8 is less than the first performance threshold of 4.25; if the processor's actual operating performance value is 4.5, then S707 can be executed because the actual operating performance value of 4.5 is greater than the first performance threshold of 4.25.

[0193] S706. Adjust the running resources corresponding to the target processor core based on the actual running performance value and the target running performance threshold.

[0194] Optionally, when the actual operating performance value of the processor is less than or equal to the first performance threshold, the operating resources corresponding to the target processor core are adjusted according to the actual operating performance value and the target operating performance threshold, which may include the following two cases:

[0195] Case 1: The processor's actual operating performance value is greater than or equal to the second performance threshold, and less than or equal to the first performance threshold.

[0196] The second performance threshold can be lower than the first performance threshold. Optionally, the second performance threshold can be preset. For example, if the first performance threshold is 4.25, then the second performance threshold can be 3.5.

[0197] In this case, the electronic device can adjust the operating resources corresponding to the target processor core based on the actual operating performance value and the target operating performance threshold of the target processor core.

[0198] It should be noted that, based on the actual operating performance value of the target processor core and the target operating performance threshold, the reduction of the operating resources corresponding to the target processor core can be found in the execution process of steps S303 or S604 to S606, which will not be repeated here.

[0199] For example, if the actual operating performance value of the processor is 3.8, the first performance threshold is 4.25, and the second performance threshold is 3.5, since the actual operating performance value of the processor is 3.8, which is greater than the second performance threshold of 3.5, and less than the first performance threshold of 4.25, the electronic device can adjust the operating resources corresponding to the target processor core according to the actual operating performance value and the target operating performance threshold.

[0200] Scenario 2: The processor's actual operating performance value is less than the second performance threshold.

[0201] If the processor's actual performance value is less than the second performance threshold, it indicates that the processor's actual performance is at a low level and the processor has sufficient operating resources. In this case, there is no need to reduce the operating resources of the target processor core. Electronic devices can increase the operating resources corresponding to the target processor core based on the target processor core's actual performance value and the target operating performance threshold.

[0202] It should be noted that the electronic device increases the operating resources corresponding to the target processor core based on the actual operating performance value and the target operating performance threshold. This can be found in the execution process of steps S303 or S604 to S606, which will not be repeated here.

[0203] For example, if the actual operating performance value of the processor is 2.0 and the second performance threshold is 3.5, since the actual operating performance value of the processor is 2.0 which is less than the second performance threshold of 3.5, the electronic device can adjust the operating resources corresponding to the target processor core according to the actual operating performance value of the target processor core and the target operating performance threshold.

[0204] If the actual operating performance value of the target processor core is 2.0, and the target operating performance threshold is 3.0, then the electronic device can determine that the deviation between the target operating performance threshold and the actual operating performance value is 3.0 - 2.0 = 1. If the correspondence between the deviation value and the resource adjustment information is as shown in Table 2, then the electronic device can determine that the resource adjustment information corresponding to the target processor core includes a power consumption adjustment of 7W, an operating frequency adjustment of 0.1GHz, a core utilization adjustment of 7%, an LLC bandwidth adjustment of 10GB / s, an LLC capacity of 5MB, and a memory bandwidth adjustment of 4GB / s. If the initial operating resources corresponding to the target processor core are as shown in Table 8:

[0205] Table 8

[0206] The electronic device can then adjust the initial resource amount of each operating indicator according to the resource adjustment information, and obtain the target operating resources of the target processor as shown in Table 8.

[0207] S707, migrate the target instance running on the target processor core.

[0208] When the actual operating performance value of the processor is greater than the first performance threshold, it indicates that the actual operating performance of the processor has reached a high level, and there are no longer enough operating resources in the processor for adjustment. The target instance running on the target processor core is then migrated.

[0209] It should be noted that the migration of target instances running on the target processor core can refer to relevant existing technologies, which will not be elaborated here.

[0210] For example, if the target instance running on the target processor core is instance E4, and the actual running performance value of the processor is already greater than the first performance threshold, then since it is necessary to prioritize ensuring that the actual running performance value of the second processor core in the processor reaches the corresponding target running performance threshold, instance E4 can be migrated to release the running resources occupied by the target processor core for use by the second processor core in the processor.

[0211] It should be noted that the various processing steps (S701-S707) shown in the embodiment of FIG7 do not constitute a specific limitation on the resource allocation process. In other embodiments of this disclosure, the resource allocation process may include more or fewer steps than that in the embodiment of FIG7. For example, the resource allocation process may include some of the steps in the embodiment of FIG7, or some steps in the embodiment of FIG7 may be replaced by steps with the same function, or some steps in the embodiment of FIG7 may be split into multiple steps, etc.

[0212] In this embodiment, the electronic device can determine the actual operating performance value of a target processor core in the processor and determine the target operating performance threshold of the target processor core. The electronic device can acquire the actual operating information of the processor and determine the actual operating performance value of the processor based on this information. The electronic device can determine whether the actual operating performance value of the processor is less than or equal to a first performance threshold. If so, the electronic device can adjust the operating resources corresponding to the target processor core based on the actual operating performance value and the target operating performance threshold; otherwise, the electronic device can migrate the target instance running on the target processor core. Since multiple processor cores in the electronic device can be divided into a first processor core and a second processor core, and the operating resources of any first processor core can be adjusted based on the actual operating performance value and the target operating performance threshold, or instances running on the first processor core can be migrated, the use of operating resources by the first processor core is limited. This avoids the first processor core occupying too many operating resources, allowing the second processor core to occupy more operating resources, ensuring that the actual operating performance value of the second processor core reaches the corresponding target operating performance threshold. This, in turn, enables the high-performance instances supported by the second processor core to run stably, improving the performance stability of the instances supported by each processor core.

[0213] It should be noted that, since the processor may include at least one first processor core and at least one second processor core, the technical solution of this disclosure can be executed for each of the at least one first processor core, adjusting the running resources corresponding to the at least one first processor core so that the actual running performance value of the at least one second processor core reaches the corresponding target running performance threshold.

[0214] The implementation effect of the technical solution disclosed herein will be explained below with reference to Figure 8.

[0215] Figure 8 is a schematic diagram illustrating the average operating performance variation of the first processor core and the second processor core provided in an exemplary embodiment of this disclosure. Referring to Figure 8, the technical solution of this disclosure can stably maintain the average operating performance of the first processor core within the range of 3.7 to 4.0; and can stably maintain the average operating performance of the second processor core within the range of 4.7 to 5.0.

[0216] Optionally, when manufacturing processors, the processor manufacturers can divide the multiple processor cores into a first processor core and a second processor core, and configure the first and second processor cores differently during production. The configuration of the first processor core can be lower than that of the second processor core. For example, the configuration information of the first and second processor cores can be shown in Table 9:

[0217] Table 9

[0218] When using processors, different processor cores can be allocated to instances. A first processor core can be configured for low-performance instances, and a second processor core can be configured for high-performance instances. The first processor core can utilize resources within a smaller configured resource limit, based on the configuration information, without consuming excessive resources. The second processor core, on the other hand, can utilize resources within a larger configured resource limit, consuming more resources to support the operation of high-performance instances.

[0219] Figure 9 is a schematic diagram of a resource allocation device provided in an exemplary embodiment of this disclosure. Referring to Figure 9, the resource allocation device 10 is applied to an electronic device, which includes at least one processor. The processor includes at least one first processor core and at least one second processor core. The performance of instances supported by the second processor core is higher than the performance of instances supported by the first processor core. The resource allocation device 10 includes: a first determining module 11, a second determining module 12, and an adjusting module 13, wherein...

[0220] The first determining module 11 is used to determine the actual operating performance value of the target processor core in the processor, wherein the target processor core is any one of the at least one first processor core;

[0221] The second determining module 12 is used to determine the target operating performance threshold of the target processor core, wherein the target operating performance threshold is used to represent the maximum operable performance of the target processor core;

[0222] The adjustment module 13 is used to adjust the running resources corresponding to the target processor core according to the actual running performance value and the target running performance threshold, so that the actual running performance value of the second processor core reaches the corresponding target running performance threshold.

[0223] The resource allocation device provided in this disclosure can execute the technical solution shown in the above method embodiments. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0224] In one possible implementation, the adjustment module 13 is specifically used for:

[0225] Determine the deviation between the target operating performance threshold and the actual operating performance value;

[0226] Based on the deviation value, resource adjustment information corresponding to the target processor core is determined, and the resource adjustment information includes at least one resource adjustment amount corresponding to at least one operating indicator of the target processor core;

[0227] Based on the resource adjustment information, adjust the running resources corresponding to the target processor core.

[0228] In one possible implementation, the adjustment module 13 is specifically used for:

[0229] Determine the preset control coefficients;

[0230] The control value is determined based on the deviation value and the preset control coefficient;

[0231] Based on the control value, determine the resource adjustment information corresponding to the target processor core.

[0232] In one possible implementation, the first determining module 11 is specifically used for:

[0233] Obtain the actual operating information of the target processor core;

[0234] Based on the actual operating information, the actual operating performance value of the target processor core is determined.

[0235] In one possible implementation, the actual operating information includes actual operating data corresponding to each operating indicator among at least one operating indicator; the first determining module 11 is specifically used for:

[0236] Determine the weighting coefficient and operating benchmark value for each of the at least one operating indicators;

[0237] For any given performance indicator, the performance contribution value corresponding to the performance indicator is determined based on the weighting coefficient of the performance indicator, the performance benchmark value, and the actual performance data.

[0238] The actual operating performance value is determined based on the performance contribution value corresponding to each of the at least one operating indicator.

[0239] In one possible implementation, the first determining module 11 is specifically used for:

[0240] Determine the ratio of the actual operating data corresponding to the operating indicator to the corresponding operating benchmark value;

[0241] The product of the ratio and the weighting coefficient corresponding to the operating indicator is determined as the performance contribution value corresponding to the operating indicator.

[0242] In one possible implementation, the first determining module 11 is further configured to:

[0243] Obtain the actual operating information of the processor;

[0244] The actual operating performance value of the processor is determined based on the actual operating information of the processor.

[0245] In one possible implementation, the adjustment module 13 is specifically used for:

[0246] When the actual operating performance value of the processor is less than or equal to the first performance threshold, the operating resources corresponding to the target processor core are adjusted according to the actual operating performance value and the target operating performance threshold.

[0247] In one possible implementation, the adjustment module 13 is specifically used for:

[0248] When the actual operating performance value of the processor is greater than or equal to the second performance threshold and less than or equal to the first performance threshold, the operating resources corresponding to the target processor core are adjusted according to the actual operating performance value and the target operating performance threshold, wherein the second performance threshold is less than the first performance threshold;

[0249] When the actual operating performance value of the processor is less than the second performance threshold, the operating resources corresponding to the target processor core are increased according to the actual operating performance value and the target operating performance threshold.

[0250] In one possible implementation, the adjustment module 13 is further configured to:

[0251] When the actual operating performance value of the processor is greater than the first performance threshold, the target instance running on the target processor core is migrated.

[0252] The resource allocation device provided in this disclosure can execute the technical solution shown in the above method embodiments. Its implementation principle and beneficial effects are similar, and will not be described again here.

[0253] Figure 10 is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present disclosure. Referring to Figure 10, the electronic device 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected via a bus 23.

[0254] The memory 22 stores computer-executed instructions;

[0255] The processor 21 executes the computer execution instructions stored in the memory 22, causing the processor 21 to perform the method as shown in the above method embodiment.

[0256] Accordingly, this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the above-described method embodiments.

[0257] Accordingly, this disclosure also provides a computer program product, including a computer program, which, when executed by a processor, can implement the methods shown in the above-described method embodiments.

[0258] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0259] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.

[0260] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0261] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0262] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0263] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0264] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0265] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0266] The above description is merely an embodiment of this disclosure and is not intended to limit the scope of this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.

Claims

1. A resource allocation method applied to an electronic device, the electronic device including at least one processor, the processor including at least one first processor core and at least one second processor core, wherein the performance of an instance supported by the second processor core is higher than the performance of an instance supported by the first processor core, the method comprising: Determine the actual operating performance value of the target processor core in the processor, wherein the target processor core is any one of the at least one first processor core; Determine the target operating performance threshold of the target processor core, wherein the target operating performance threshold is used to represent the maximum operable performance of the target processor core; Based on the actual operating performance value and the target operating performance threshold, the operating resources corresponding to the target processor core are adjusted so that the actual operating performance value of the second processor core reaches the corresponding target operating performance threshold.

2. The method according to claim 1, wherein adjusting the operating resources corresponding to the target processor core based on the actual operating performance value and the target operating performance threshold includes: Determine the deviation between the target operating performance threshold and the actual operating performance value; Based on the deviation value, resource adjustment information corresponding to the target processor core is determined, and the resource adjustment information includes at least one resource adjustment amount corresponding to at least one operating indicator of the target processor core; Based on the resource adjustment information, adjust the running resources corresponding to the target processor core.

3. The method according to claim 2, wherein determining the resource adjustment information corresponding to the target processor core based on the deviation value includes: Determine the preset control coefficients; The control value is determined based on the deviation value and the preset control coefficient; Based on the control value, determine the resource adjustment information corresponding to the target processor core.

4. The method according to any one of claims 1-3, determining the actual operating performance value of the target processor core in the processor, comprising: Obtain the actual operating information of the target processor core; Based on the actual operating information, the actual operating performance value of the target processor core is determined.

5. The method of claim 4, wherein the actual operation information comprises actual operation data corresponding to each of the at least one operation index. Based on the actual operating information, the actual operating performance value of the target processor core is determined, including: Determine the weighting coefficient and operating benchmark value for each of the at least one operating indicators; For any given performance indicator, the performance contribution value corresponding to the performance indicator is determined based on the weighting coefficient of the performance indicator, the performance benchmark value, and the actual performance data. The actual operating performance value is determined based on the performance contribution value corresponding to each of the at least one operating indicator.

6. The method according to claim 5, for any given operating indicator, determining the performance contribution value corresponding to the operating indicator based on the weighting coefficient of the operating indicator, the operating benchmark value, and the actual operating data, includes: Determine the ratio of the actual operating data corresponding to the operating indicator to the corresponding operating benchmark value; The product of the ratio and the weighting coefficient corresponding to the operating indicator is determined as the performance contribution value corresponding to the operating indicator.

7. The method according to any one of claims 1-6, further comprising: Obtain the actual operating information of the processor; The actual operating performance value of the processor is determined based on the actual operating information of the processor.

8. The method according to claim 7, wherein adjusting the operating resources corresponding to the target processor core based on the actual operating performance value and the target operating performance threshold includes: When the actual operating performance value of the processor is less than or equal to the first performance threshold, the operating resources corresponding to the target processor core are adjusted according to the actual operating performance value and the target operating performance threshold.

9. The method according to claim 8, wherein when the actual operating performance value of the processor is less than or equal to a first performance threshold, the operating resources corresponding to the target processor core are adjusted according to the actual operating performance value and the target operating performance threshold, comprising: When the actual operating performance value of the processor is greater than or equal to the second performance threshold and less than or equal to the first performance threshold, the operating resources corresponding to the target processor core are adjusted according to the actual operating performance value and the target operating performance threshold, wherein the second performance threshold is less than the first performance threshold; When the actual operating performance value of the processor is less than the second performance threshold, the operating resources corresponding to the target processor core are increased according to the actual operating performance value and the target operating performance threshold.

10. The method according to claim 8 or 9, further comprising: When the actual operating performance value of the processor is greater than the first performance threshold, the target instance running on the target processor core is migrated.

11. The method according to any one of claims 2-10, wherein adjusting the running resources corresponding to the target processor core according to the resource adjustment information includes: Determine the initial operating resources corresponding to the target processor core, wherein the initial operating resources include the initial resource amount corresponding to at least one operating indicator; Based on the resource adjustment amount corresponding to each operating indicator in the resource adjustment information, the initial resource amount corresponding to each operating indicator in the initial operating resources is adjusted accordingly to obtain the target operating resources corresponding to the target processor core. The target operating resources include the target resource amount corresponding to at least one operating indicator.

12. The method according to claim 11, wherein adjusting the initial resource quantity corresponding to each operating indicator in the initial operating resources according to the resource adjustment quantity corresponding to each operating indicator in the resource adjustment information includes: Depending on whether the resource adjustment amount is positive or negative, the initial resource amount can be increased or decreased.

13. The method according to claim 12, wherein increasing or decreasing the resource amount based on the initial resource amount according to the sign of the resource adjustment amount includes: If the resource adjustment amount is positive, then the corresponding resource adjustment amount is added to the initial resource amount; If the resource adjustment amount is negative, then the corresponding resource adjustment amount is reduced based on the initial resource amount.

14. The method according to any one of claims 1-13, wherein determining the target operating performance threshold of the target processor core comprises: Receive the target operating performance threshold set by the user for the target processor core.

15. The method according to any one of claims 4-14, wherein obtaining the actual operating information of the target processor core includes: The hardware monitoring module of the electronic device collects real-time actual operating data corresponding to at least one operating indicator of the target processor core, and integrates them to obtain the actual operating information of the target processor core.

16. The method according to any one of claims 7-15, wherein determining the actual operating performance value of the processor based on the actual operating information of the processor includes: Determine the processor weight coefficient and processor operating baseline value corresponding to at least one operating indicator in the actual operating information of the processor; For any given performance metric, calculate the processor performance contribution value corresponding to that performance metric based on the processor weight coefficient of that performance metric, the processor performance baseline value, and the corresponding actual processor performance data. The actual operating performance value of the processor is obtained by summing or weighted summing the processor performance contribution values ​​corresponding to the at least one operating indicator.

17. A resource allocation device applied to an electronic device, the electronic device including at least one processor, the processor including at least one first processor core and at least one second processor core, wherein the performance of an instance supported by the second processor core is higher than the performance of an instance supported by the first processor core, the device comprising: The module comprises a first determining module, a second determining module, and an adjustment module, wherein... The first determining module is used to determine the actual operating performance value of the target processor core in the processor, wherein the target processor core is any one of the at least one first processor core; The second determining module is used to determine the target operating performance threshold of the target processor core, wherein the target operating performance threshold is used to represent the maximum operable performance of the target processor core; The adjustment module is used to adjust the running resources corresponding to the target processor core according to the actual running performance value and the target running performance threshold, so that the actual running performance value of the second processor core reaches the corresponding target running performance threshold.

18. An electronic device comprising: At least one processor; as well as A memory that is communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, cause the electronic device to perform the method according to any one of claims 1-16.

19. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the method as described in any one of claims 1-16.

20. A computer program product comprising a computer program that, when executed by a processor, implements the method as claimed in any one of claims 1-16.