Task management methods, devices, equipment, media and products
By obtaining energy efficiency configuration tables and real-time power power information, the server's task scheduling and resource allocation are optimized, and the energy saving and consumption reduction problems of a single server during operation are solved, improving overall energy efficiency and resource utilization efficiency.
Patent Information
- Application Number
- CN202510663150.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-05-22
AI Technical Summary
In the prior art, the energy saving and consumption reduction effect of a single server during operation is poor, and the power consumption in the idle state may be wasted, and the identification and management of the best energy efficiency state is lacking.
By obtaining the server's energy efficiency configuration table, determining the number of resources and operating power corresponding to the task type, obtaining power power in real time, calculating the power power coefficient and change rate, and using this information, the task scheduling strategy and memory and hard disk provisioning are carried out to optimize the server's energy efficiency status.
It improves the overall energy efficiency of the server, reduces heat aggregation, reduces the temperature of the memory and hard disk areas, and achieves more efficient resource utilization and energy saving and consumption reduction.
Smart Images

Figure CN120196419B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of energy efficiency optimization technology, and in particular to task management methods, devices, equipment, media and products. Background Art
[0002] Server energy efficiency is a key indicator of how effectively a server utilizes energy during operation, encompassing multiple aspects including hardware configuration, software optimization, and management strategies. Product component efficiency, such as the CPU (Central Processing Unit) and power supply efficiency, the number of power-consuming components, such as memory and hard drives, the BMC (Baseboard Management Controller), BIOS (Basic Input / Output System), and operating system task management, as well as cooling strategies, all influence energy efficiency.
[0003] In related technologies, tasks are concentrated on some servers or some nodes through multi-node or multi-server task management, and then standby processing is performed through idle servers or idle nodes to achieve the purpose of energy saving and consumption reduction. However, this method lacks the identification and management of whether a single server is in the optimal energy efficiency state during normal operation, and the power consumption saved in the idle state may be wasted during the server operation period, resulting in poor energy saving and consumption reduction effects on a single server.
[0004] Therefore, how to improve the energy saving and consumption reduction effect of a single server during operation is an urgent problem that needs to be solved. Summary of the Invention
[0005] The present application provides a task management method, apparatus, device, medium and product to at least solve the problem of low accuracy and rationality of text segmentation in related technologies.
[0006] This application provides a task management method, which includes:
[0007] Obtaining an energy efficiency configuration table for the server; the energy efficiency configuration table includes: the resource quantities and operating powers corresponding to various types of tasks when the energy efficiency ratio is maximized, the resource quantities including the memory quantity and the hard disk quantity;
[0008] receiving a plurality of tasks, assigning each task to a corresponding task stack, and sorting the plurality of task stacks in descending order according to the operating power in the energy efficiency configuration table to obtain sorting results of the plurality of task stacks;
[0009] Get power in real time;
[0010] Calculating the power factor and the rate of change of the power supply within a preset operating range;
[0011] Determining a task scheduling strategy based on the power factor and the rate of change;
[0012] Memory allocation and hard disk allocation are performed for tasks in each task stack according to the sorting result, the energy efficiency configuration table and the task scheduling strategy.
[0013] The present application also provides a task management device, comprising:
[0014] An acquisition module is used to obtain an energy efficiency configuration table of the server; the energy efficiency configuration table includes: the resource quantities and operating powers corresponding to various types of tasks when the energy efficiency ratio is maximized, the resource quantities including the memory quantity and the hard disk quantity;
[0015] an allocation module, configured to receive a plurality of tasks, allocate each task to a corresponding task stack, and sort the plurality of task stacks in descending order according to the operating power in the energy efficiency configuration table to obtain a sorting result of the plurality of task stacks;
[0016] Monitoring module, used to obtain power supply power in real time;
[0017] A calculation module, configured to calculate a power factor and a rate of change of the power supply within a preset operating range;
[0018] A determination module, configured to determine a task scheduling strategy based on the power coefficient and the change rate;
[0019] The allocation module is used to perform memory allocation and hard disk allocation for tasks in each task stack according to the sorting result, the energy efficiency configuration table and the task scheduling strategy.
[0020] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned task management methods when executing the computer program.
[0021] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned task management methods are implemented.
[0022] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned task management methods when executed by a processor.
[0023] Through the present application, by obtaining the energy efficiency configuration table of the server, the amount of memory, the number of hard disks and the operating power corresponding to various task types when the energy efficiency ratio is maximized can be obtained; the received multiple tasks are parsed and assigned to the corresponding task stacks, and the multiple task stacks are sorted according to the operating power in the energy efficiency configuration table, which can ensure that high-priority or high-efficiency tasks are executed first, which helps to improve the overall efficiency of task processing; by obtaining the real-time power of the power supply, and calculating the power coefficient and change rate of the power supply, and determining the task scheduling strategy according to the power coefficient and change rate of the power supply, the system can dynamically adjust the task scheduling strategy according to the current power usage to adapt to different load conditions; the memory and hard disk are allocated according to the sorting results, scheduling strategy and energy efficiency configuration table. Since the memory and hard disk used by each task are different, the memory and hard disk work in rotation, that is, different memory and hard disk areas are scheduled to work at different times, which can disperse the load and avoid a certain area from working at high load for a long time. While improving the energy efficiency of the server, the real-time temperature of the memory and hard disk areas is reduced, and the problem of frequent response of the cooling system due to heat accumulation is reduced, thereby further achieving energy saving and consumption reduction. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0025] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0026] Figure 1 A flowchart of a task management method provided in an embodiment of the present application;
[0027] Figure 2 A schematic diagram of the structure of a task management device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0029] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0030] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0031] Explanation of terms:
[0032] Server energy efficiency: refers to the ratio between the energy consumed by a server during operation and the computing or storage functions it provides. It is an important indicator for measuring the relationship between server performance and energy consumption.
[0033] The task stack is a data structure used to manage the order in which tasks are executed, usually following the "last in, first out" principle. During task scheduling, the task stack can be used to track the currently executing task and the tasks that are scheduled to be executed.
[0034] In related technologies, tasks are concentrated on some servers or some nodes through multi-node or multi-server task management, and then standby processing is performed through idle servers or idle nodes to achieve the purpose of energy saving and consumption reduction. However, this method lacks the identification and management of whether a single server is in the optimal energy efficiency state during normal operation, and the power consumption saved in the idle state may be wasted during the server operation period, resulting in poor energy saving and consumption reduction effects on a single server.
[0035] Based on the above problems, an embodiment of the present application provides a task management method, and the method is described in detail in conjunction with the execution process of the task management method.
[0036] Reference Figure 1 As shown, the task management method provided by the embodiment of the present invention includes the following steps:
[0037] S11. Obtain the energy efficiency configuration table of the server.
[0038] The energy efficiency configuration table includes: resource quantities and operating powers corresponding to various types of tasks when the energy efficiency ratio is maximized, and the resource quantities include memory quantities and hard disk quantities.
[0039] In some embodiments, the above step S11 can be implemented as follows:
[0040] Use server energy efficiency testing software to test various task types and obtain the server's energy efficiency configuration table;
[0041] or;
[0042] Based on the server configuration information provided by the server manufacturer, obtain the server's energy efficiency configuration table.
[0043] Specifically, one approach is to place the server in an energy efficiency test environment and use energy efficiency testing software, such as BenchSEE or SERT (both BenchSEE and SERT are energy efficiency testing software), to obtain the server's energy efficiency configuration table. Another approach is for the server manufacturer to provide energy efficiency mode configuration tables for each CPU, reducing the amount of testing required for all users. The operating power provided may differ from the actual server, but this does not affect the power ranking of each test mode.
[0044] Optionally, the first method above can be implemented through the following steps:
[0045] Determine the combination of multiple resource quantities to be tested based on the total amount of memory and hard disks on the server;
[0046] Conduct traversal tests on various resource quantity combinations to obtain the energy efficiency ratio, operating power, and test duration of various types of tasks;
[0047] Generate an initial energy efficiency configuration table based on the energy efficiency ratio, operating power and test duration corresponding to the various resource quantity combinations;
[0048] Analyze the initial energy efficiency configuration table to obtain the memory quantity, hard disk quantity, operating power, and test duration corresponding to various types of tasks when the energy efficiency ratio is maximized;
[0049] An energy efficiency configuration table for the server is generated according to the memory quantity, hard disk quantity, operating power, and test duration corresponding to each type of task when the energy efficiency ratio is maximized.
[0050] It should be noted that the scenario in which all the memory and hard disks of the server are involved in the work is not necessarily the state with the highest energy efficiency of the server. When the server executes different instructions, the throughput data volume of the memory cache unit and the hard disk is inconsistent, but the operating system generally regards all the memory or hard disk as one, such as through a RAID (Redundant Array of Independent Disks Controller) card to merge all the hard disks into a large storage. Even if only a small amount of data is written, the memory and hard disk are responding and allocating the write. The embodiment of the present disclosure is based on the address coding of the memory and hard disk in the operating system, and is separated into different caches or storage locations at the system level, and the optimal amount of memory and hard disk corresponding to each working scenario is refined.
[0051] Specifically, by controlling the actual write and read address segments, the number of resources actually participating in the test is controlled, that is, the storage address codes of resources not participating in the test are disabled. For example, the server BMC or CPLD can be used to shut down the memory circuit or reduce the voltage of the circuit so that it does not work. The order of energy efficiency testing is to test the energy efficiency ratio, operating power and test duration of different memory and hard disk quantities of the server without shutting down the server based on the total number of memory and hard disks in the server, and generate an initial energy efficiency configuration table. Then, based on the survey results of the initial energy efficiency configuration table, the best energy efficiency ratio (referring to the highest energy efficiency ratio) entry corresponding to each test type is selected to generate the energy efficiency configuration table for the server.
[0052] It is understandable that for each server order or servers with the same configuration, only one server can be tested, and then the energy efficiency configuration table can be passed to all servers with the same order / configuration, reducing the number of tests and costs.
[0053] For example, referring to Table 1, Table 1 is an initial energy efficiency configuration table; referring to Table 2, it is an energy efficiency configuration table after screening.
[0054] Table 1
[0055]
[0056] Table 2
[0057]
[0058] S12: Receive multiple tasks, assign each task to a corresponding task stack, and sort the multiple task stacks in descending order according to the operating power in the energy efficiency configuration table to obtain sorting results of the multiple task stacks.
[0059] Optionally, the above step S12 can be implemented as follows:
[0060] Accept multiple tasks and determine the task type corresponding to each task;
[0061] Each task is assigned to the corresponding task stack according to the task type mapping table.
[0062] The task type mapping table includes: a correspondence between multiple tasks and multiple task stacks, and each task stack corresponds to a task type.
[0063] According to the operating power of each task type in the energy efficiency configuration table, the multiple task stacks are sorted in descending order to obtain sorting results of the multiple task stacks.
[0064] Specifically, the received tasks are parsed one by one into multiple tasks, and the task type corresponding to each task is determined, such as reading, writing, compression, encryption, etc., and each task is assigned to the corresponding task stack according to the task type mapping table. According to the operating power of each task type in the energy efficiency configuration table, the multiple task stacks are sorted in descending order to obtain the sorting results of the multiple task stacks.
[0065] For example, refer to Table 3, which is a task type mapping table. The program log creation task can be mapped to the following task stacks: for example, the log compression module can be mapped to the task stack corresponding to type 2; the user authentication module can be mapped to the task stack corresponding to type 4; log analysis and calculation can be mapped to the task stack corresponding to type 3 or type 6; the query interface service can be mapped to the task stack corresponding to type 5; and log archive encryption can be mapped to the task stack corresponding to type 1.
[0066] Table 3
[0067]
[0068] S13. Obtain power supply power in real time.
[0069] Specifically, the task calling strategy is determined by reading the power consumption of the power supply from the BMC or CPLD in real time and judging the position of the power consumption in the optimal working range, that is, the power coefficient V and the change rate V.
[0070] For example, IPMI commands can be used to read power consumption information through the BMC; alternatively, the server's real-time power consumption data, including the power consumption of the entire node, fan / PDB power consumption estimates, and disk power consumption, can be viewed through the BMC web console. Furthermore, the CPLD can communicate with the power management chip via the PMBUS interface to read the power supply's real-time power consumption data. For example, some power management chips support the PMBUS protocol, and the power consumption data provided by these chips can be parsed by the CPLD. The CPLD can also read various sensor data within the server, including parameters such as current and voltage, and then calculate the server's real-time power consumption based on this data.
[0071] S14. Calculate the power factor and the rate of change of the power supply within a preset working range.
[0072] Optionally, the above step S14 can be implemented as follows:
[0073] Based on a preset working range of the server, determining a maximum load power and a minimum load power corresponding to the preset working range;
[0074] The power factor and the rate of change of the real-time power of the power supply in a preset working range are calculated according to the real-time power of the power supply, the maximum load power, and the minimum load power.
[0075] It's important to note that the server power supply's conversion efficiency (input power / output power) varies at different load ratios. Generally, conversion efficiency and load ratio exhibit a normal relationship, with optimal conversion efficiency typically occurring between 40% and 90% load ratios. The preset operating range can be understood as the range corresponding to optimal conversion efficiency.
[0076] Specifically, when the load power corresponding to the optimal efficiency range is set and Finally, the range of power coefficient R and rate of change V is determined by the real-time power P of the power supply and the following formula:
[0077]
[0078]
[0079] Among them, R represents the power coefficient, that is, R represents the real-time power P relative to and relative position; Indicates the minimum load power of the power supply corresponding to the optimal efficiency range; Indicates the maximum load power of the power supply corresponding to the optimal efficiency range; is the real-time power of the power supply; Indicates the rate of change of power; V represents the rate of change, that is, V represents the rate at which the real-time power P changes with time. The greater the power change per unit time, the greater the absolute value of the rate of change V. The value range of V is a real number; when the power P increases, V>0; when the power P decreases, V<0.
[0080] Calculated by the above formula, the value range of R is between 0 and 1:
[0081] When P= When R=0;
[0082] When P= When R=1;
[0083] When P and When , R varies between 0 and 1.
[0084] S15. Determine a task scheduling strategy based on the power coefficient and the change rate.
[0085] Specifically, the task scheduling strategy is determined based on the power coefficient and the change rate of the power supply. In the embodiment of the present disclosure, the task scheduling strategy includes four types: a first strategy, a second strategy, a third strategy, and a fourth strategy.
[0086] The first strategy prioritizes high-power tasks. Specifically, after each task completes, the system prioritizes the most powerful task from the remaining tasks. If there are no remaining tasks in the most powerful task stack, the system selects the next most powerful task from the stack, and so on.
[0087] For example, assume there are three task stacks, each with different power requirements: Task Stack 1 (100W), Task Stack 2 (80W), and Task Stack 3 (60W). After the server completes a task, it first checks Task Stack 1 for any unfinished tasks. If so, it processes that task. If all tasks in Task Stack 1 are complete, it checks Task Stack 2, and so on. During task scheduling, if Task Stack 1 has multiple tasks, the server processes them one by one until all tasks in Task Stack 1 are complete. It then processes tasks in Task Stacks 2 and 3. This strategy ensures that high-power tasks are processed first, improving overall energy efficiency.
[0088] This strategy of prioritizing high-power tasks can process more energy-intensive tasks more quickly, reducing the average processing time of tasks and improving overall processing efficiency. In addition, since high-power tasks are generally more resource-intensive, prioritizing these tasks can reduce the time they occupy system resources, potentially helping to optimize energy efficiency.
[0089] The second strategy is to prioritize tasks with the lowest power requirements. This strategy helps to quickly clear low-power task stacks. Specifically, first, all task stacks are sorted according to their power. Then, the system reads tasks from each task stack in ascending order of power for processing. When the number of tasks in the current task stack with the lowest power is 0, the system will continue to allocate tasks from the task stack with the second lowest power, and so on.
[0090] For example, assume there are three task stacks, with power levels A (low), B (medium), and C (high). Using the "smallest first" strategy, the system processes tasks in the order A, B, and C. That is, all tasks in stack A are processed first, followed by all tasks in stack B, and finally all tasks in stack C.
[0091] Because low-power tasks typically execute for shorter periods of time, prioritizing them can quickly free up system resources and improve system responsiveness. By prioritizing low-power tasks, more tasks can be completed more quickly, improving overall processing efficiency. This helps optimize system resource usage and avoids tying up resources for a single, high-power task for extended periods.
[0092] The third strategy is to read tasks from each task stack sequentially, in order of power at the bottom of the stack. In this strategy, the system maintains a list of task stacks, each with a specific power size. The system reads tasks from each task stack sequentially, in order of power size (usually ascending or descending). Specifically, all task stacks are first sorted by power size. Then, the system reads one task from each task stack in sequence, following the sorted order. After processing a task, the system returns to the beginning of the sorted list and continues to read the next task in order until all tasks have been processed.
[0093] For example, assume there are three task stacks, with power levels A (low), B (medium), and C (high). Using the "sequential allocation" strategy, the system processes tasks in the order A, B, and C. That is, it processes a task from stack A first, followed by a task from stack B, and then a task from stack C, and so on until all tasks are processed.
[0094] This sequential invocation strategy ensures that each task stack has a chance to be processed, preventing some task stacks from being ignored. By processing tasks of different power levels sequentially, the overall system load can be balanced to avoid overload.
[0095] The fourth strategy is to read tasks from the task stack in a specific order based on the power of the task stack, namely, the largest, the smallest, the second largest, the second smallest, and finally the median task stack. Specifically, in this strategy, the system first identifies the power of all task stacks and then reads tasks from the task stack in the following order: first, the tasks in the task stack with the largest power are processed, followed by the tasks in the task stack with the smallest power, then the tasks in the task stack with the second largest power, and finally the tasks in the task stack with the second smallest power, and so on, until the task stack with the median power is reached.
[0096] For example, assume there are five task stacks with power levels of 100W, 60W, 80W, 40W, and 120W, respectively. Using the "remote call" strategy, the system processes tasks in the following order: read tasks from the task stack with the highest power (120W), read tasks from the task stack with the lowest power (40W), read tasks from the task stack with the second highest power (100W), read tasks from the task stack with the second lowest power (60W), and finally read tasks from the task stack with the median power (80W).
[0097] This strategy is suitable for scenarios requiring a balance between high-load and low-load tasks, particularly when the system load varies significantly. This scheduling strategy can optimize overall system performance. By alternating between high- and low-power tasks, the system load can be better balanced, preventing excessive system load at any given moment. Rapid processing of low-power tasks (which typically execute for shorter periods of time) improves system response time and enhances the user experience. It also allows for more efficient utilization of system resources, avoiding the waste of resources caused by prolonged processing of a single task.
[0098] In some embodiments, the above step S15 can be implemented as follows:
[0099] When the power factor of the power supply is a first value, determining that the task scheduling strategy is a first strategy;
[0100] When the power factor is greater than the first value and less than the second value, determining a task scheduling strategy according to the power factor and the change rate;
[0101] When the power factor is a second value, the task scheduling strategy is determined to be a second strategy.
[0102] The first value may be 0, and the second value may be 1. It should be noted that the first value and the second value may also be other reasonable values, which are not specifically limited here.
[0103] Specifically, when the power factor R is 0, the task scheduling strategy is determined to be the first strategy. When the power factor R is 1, the task scheduling strategy is determined to be the second strategy. When the power factor R is greater than the first value and less than the second value, the task scheduling strategy is further determined based on the power factor R and the rate of change.
[0104] Optionally, the above step (when the power factor is greater than the first value and less than the second value, determining the task scheduling strategy based on the power factor and the change rate) can be implemented as follows:
[0105] Determining whether the power factor of the power supply is greater than the first value and less than a third value; the third value is less than the second value;
[0106] If the power factor is greater than the first value and less than a third value, determining whether the rate of change is less than or equal to a fourth value;
[0107] If the change rate is less than or equal to a fourth value, determining that the task scheduling strategy is the first strategy;
[0108] If the change rate is greater than the fourth value and less than or equal to the fifth value, determining that the task scheduling strategy is the third strategy;
[0109] If the change rate is greater than the fifth value, the task scheduling strategy is determined to be the fourth strategy.
[0110] The third value may be 0.3, the fourth value may be 0.2, and the fifth value may be 0.5. It should be noted that the third value, the fourth value, and the fifth value may also be other reasonable values, which are not specifically limited here.
[0111] Specifically, determine whether the power coefficient of the power supply is greater than the first value and less than the third value. If the power coefficient of the power supply is greater than the first value and less than the third value, determine whether the change rate is less than or equal to the fourth value. If the change rate is less than or equal to the fourth value, determine that the task scheduling strategy is the first strategy; if the change rate is greater than the fourth value and less than or equal to the fifth value, determine that the task scheduling strategy is the third strategy; if the change rate is greater than the fifth value, determine that the task scheduling strategy is the fourth strategy.
[0112] Exemplarily, determine whether the power coefficient R of the power supply is greater than 0 and less than 0.3. If so, determine whether the change rate V is less than or equal to 0.2. If so, determine that the task scheduling strategy is the first strategy; if the change rate V is greater than 0.2 and less than or equal to 0.5, determine that the task scheduling strategy is the third strategy; if the change rate V is greater than 0.5, determine that the task scheduling strategy is the fourth strategy.
[0113] Optionally, determining whether the power factor is greater than the first value and less than a third value further includes:
[0114] determining whether the power factor is greater than or equal to the third value and less than a sixth value, and the sixth value is less than the second value;
[0115] If the power factor is greater than or equal to the third value and less than a sixth value, determining whether the rate of change is less than or equal to the fifth value;
[0116] If the change rate is less than or equal to the fifth value, determining that the task scheduling strategy is the third strategy;
[0117] If the change rate is greater than the fifth value, the task scheduling strategy is determined to be the second strategy.
[0118] Among them, the sixth value can be 0.7. It should be noted that the sixth value can also be other reasonable values, and no specific limitation is made here.
[0119] Specifically, determine whether the power supply power coefficient is greater than or equal to the third value and less than the sixth value; if the power supply power coefficient is greater than or equal to the third value and less than the sixth value, determine whether the change rate is less than or equal to the fifth value; if the change rate is less than or equal to the fifth value, determine that the task scheduling strategy is the third strategy; if the change rate is greater than the fifth value, determine that the task scheduling strategy is the second strategy.
[0120] Exemplarily, determine whether the power coefficient is greater than or equal to 0.3 and less than 0.7; if the power coefficient is greater than or equal to 0.3 and less than 0.7, determine whether the change rate is less than or equal to 0.5; if the change rate is less than or equal to 0.5, determine that the task scheduling strategy is the third strategy; if the change rate is greater than 0.5, determine that the task scheduling strategy is the second strategy.
[0121] Optionally, the above step (determining whether the power factor is greater than or equal to the third value and less than a sixth value, and the sixth value is less than the second value) further includes:
[0122] If the power factor is greater than or equal to the sixth value and less than the second value, determining whether the rate of change is less than or equal to the fourth value;
[0123] If the change rate is less than or equal to the fourth value, determining that the task scheduling strategy is the fourth strategy;
[0124] If the change rate is greater than the fourth value, the task scheduling strategy is determined to be the second strategy.
[0125] Specifically, if the power coefficient is greater than or equal to the sixth value and less than the second value, it is determined whether the change rate is less than or equal to the fourth value; if the change rate is less than or equal to the fourth value, the task scheduling strategy is determined to be the fourth strategy; if the change rate is greater than the fourth value, the task scheduling strategy is determined to be the second strategy.
[0126] For example, if the power factor is greater than or equal to 0.7 and less than 1, determine whether the change rate is less than or equal to 0.2; if the change rate is less than or equal to 0.2, determine that the task scheduling strategy is the fourth strategy; if the change rate is greater than 0.2, determine that the task scheduling strategy is the second strategy.
[0127] S16. Perform memory allocation and hard disk allocation for tasks in each task stack according to the sorting result, the energy efficiency configuration table, and the task scheduling policy.
[0128] Specifically, by managing the occupancy of memory and hard disks, while ensuring that the server runs at the highest energy efficiency, the duty cycle of each memory and hard disk is balanced and the temperature of each memory and hard disk is controlled.
[0129] Assuming the server has two CPUs, each with six memory channels, the server has a total of 12 memory channels. Each channel supports two memory slots, for a total of 24 memory modules. Regarding hard drives, assuming the server has two areas, 12 hard drives in the front area and two hard drives in the rear area. The server uses a 1300W power supply. According to data, the optimal conversion efficiency range for power supplies is 50%-80%. Therefore, the maximum power within this optimal conversion efficiency range can be calculated to be 1040W, and the minimum power is 650W.
[0130] First, encode and assign values to the actual addresses of the memory and hard disk.
[0131] The memory encoding format is: DIMMcpuNYYXF, where N represents the CPU number (for example, 0 represents the first CPU and 1 represents the second CPU); YY represents the channel number (for example, 01 to 06); X represents the memory location (for example, when X is A, it means the memory is in slot A, and when X is B, it means the memory is in slot B); F represents the memory occupancy status. The initial occupancy status of the memory is unoccupied, represented by "0", and "1" indicates that the memory is occupied. For example, the memory encoding of the above server is: DIMMcpu001A0, DIMMcpu001B0, DIMMcpu002A0, DIMMcpu002B0, ..., DIMMcpu1050, DIMMcpu105B0, DIMMcpu106A0, DIMMcpu106B0.
[0132] The hard disk encoding format is: STORabbF, where a represents the hard disk area. For example, 1 represents the front window area of the hard disk, and 2 represents the back window area of the hard disk. bb represents the position number of the hard disk in the area. For example, if the front window area is divided into 12 blocks, 01-12 represent the position numbers of the hard disk in the front window area. If the back window area is divided into 2 blocks, 01-02 represent the position numbers of the hard disk in the back window area. F represents the memory occupancy status. The initial occupancy status of the hard disk is unoccupied, represented by "0", and "1" represents the hard disk in the occupied state. For example, the hard disk codes of the above server are: STOR1010, STOR1020, STOR1030, ..., STOR1120, STOR2010, and STOR2020.
[0133] Optionally, memory allocation and hard disk allocation are performed for tasks in each task stack based on a preset allocation method.
[0134] Among them, the preset allocation method includes a memory allocation method and a hard disk allocation method; the memory allocation method includes: allocation according to the order of the central processing unit and the order of the memory channels of the central processing unit; or; allocation according to the order of the central processing unit, the order of the memory channels of the central processing unit, and the order of the memory channel positions; the hard disk allocation method includes: remote allocation according to the order of the hard disk area and the position in the hard disk area.
[0135] Specifically, the memory is allocated sequentially according to the CPU-channel or CPU-channel-dual-channel memory position. The hard disk is first allocated sequentially according to the area, and then remotely allocated according to the hard disk position, that is, the hard disk occupancy with the smallest and largest serial numbers is allocated according to the serial number of the hard disk position. The relationship between the i-th (i>2) call to the hard disk in the same area and the total number of hard disks in the area n is x=round((2k-1)×n / 2i-2), k=(1, 2, 3...2i-3). It should be noted that when i>3, there will be multiple values, and all need to be called.
[0136] In some embodiments, the above steps (performing memory allocation and hard disk allocation for tasks in each task stack based on a preset allocation method according to the energy efficiency configuration table and the task scheduling policy) can be implemented as follows:
[0137] Obtain the amount of memory and hard disk of the server;
[0138] According to the energy efficiency configuration table, obtaining the amount of memory and the amount of hard disk corresponding to the first task stack when the energy efficiency ratio is the highest; the first task stack is the task stack with the highest running power among the multiple task stacks;
[0139] According to the scheduling policy, memory allocation and hard disk allocation are performed for the tasks of the first task stack based on the memory allocation method and the hard disk allocation method;
[0140] Obtaining the amount of memory and the amount of hard disk corresponding to the second task stack when the energy efficiency ratio is maximized; the operating power of the second task stack is less than the operating power of the first task stack;
[0141] According to the scheduling policy, memory allocation and hard disk allocation are performed for the tasks of the second task stack based on the memory allocation method and the hard disk allocation method.
[0142] Specifically, first obtain the server's memory and hard drive counts. Referring to the above example, the server has 12 memory channels, each supporting two memory slots, meaning the server has a total of 24 memory modules. Regarding hard drives, assume the server has two zones: 12 hard drives in the front window zone and two hard drives in the rear window zone. Based on the energy efficiency configuration table, the optimal memory and hard drive counts for the first task are retrieved and memory and hard drive allocation for the task is performed. Memory is allocated sequentially based on CPU-channel or CPU-channel-dual-channel memory locations. Hard drives are first allocated sequentially based on zones, then remotely allocated based on drive location. Specifically, the smallest and largest hard drive occupancy are allocated based on the drive location sequence. The relationship between the i-th (i > 2) hard drive call request in the same zone and the total number of hard drives in that zone, n, is x = round((2k-1) × n / 2i-2), where k = (1, 2, 3, ..., 2i-3). Note that when i > 3, multiple hard drives may be available, all of which need to be called. When allocating hard drive occupancy, the assigned value is simultaneously set to 1. For example, DIMMcpu001A1 and STOR1011 represent the memory hard disk, which is occupied until the required number of hard disks is reached.
[0143] Next, the optimal number of hard disks and memory corresponding to the second task is read. Memory allocation follows the same principles as above, starting with the first memory location in the first channel of the first CPU. If the value is 1, the allocation is skipped and the value is set to 0. Next, the first memory location in the first channel of the second CPU is read and assigned, until the memory location with a value of 0 is read and assigned a value of 1.
[0144] When the required amount of memory is allocated but not all memory has been read (the amount of memory read is less than the maximum amount of memory), the system continues to allocate the remaining memory and changes all values to 0 until all memory codes and values are read.
[0145] When all memories have been read and assigned, but the required amount of memory has not yet been allocated (the amount of memory read = the maximum amount of memory), the system starts reading from the first memory of the first channel of the first CPU. However, the difference is that when the occupancy code read is 1, no call or assignment is made, and the next memory is read until the required amount of memory is met. The system stops reading.
[0146] The same applies to hard disks, which are allocated in the order of regions and remote allocation of hard disk locations.
[0147] For example, assuming the server has two CPUs and each CPU has six memory channels, the server has a total of 12 memory channels. Each channel supports the installation of two memory slots, so the server has a total of 24 memory modules. In terms of hard drives, assuming the server has two areas, there are 12 hard drives in the front window area and 2 hard drives in the rear window area. The server is powered by a 1300W power supply. According to the information, the optimal conversion efficiency range of the power supply is 50%-80%. Therefore, it can be calculated that the maximum power within the optimal conversion efficiency range is 1040W and the minimum power is 650W.
[0148] Place the server in an energy efficiency test environment and disable the storage address encoding of the memory and hard disks not involved in the test. Follow the following test plan to obtain an initial energy efficiency configuration table, as shown in Table 4. Based on the initial energy efficiency configuration table's baseline results, select the entry with the best energy efficiency ratio (the highest energy efficiency ratio) for each test type to generate the server's energy efficiency configuration table, as shown in Table 5.
[0149] Table 4
[0150]
[0151] Table 5
[0152]
[0153] Sort the task stacks by the operating power in the server's energy efficiency configuration table. That is, the order of the task stacks is Type 1 > Type 2 > Type 3 > Type 6 > Type 7 > Type 5 > Type 4. For example, the specific types corresponding to the above order are: AES > Compress > LU > SORT > SHA256 > SOR > OLTP.
[0154] For example, if the real-time power consumption read from the BMC is 600W, and dP / dt is calculated to be R=0 and the rate of change V=0, then according to the policy flow, the first policy is executed, and the task in the task stack with the largest power is called first. The system calls one AES task for execution.
[0155] According to the server's energy efficiency configuration table, the optimal number of memory and hard disks for the first AES task is 10 and 3, respectively. If memory allocation is performed based on the order of CPUs, CPU memory channels, and memory channel locations, the server's memory allocation order is: DIMMcpu001A0, DIMMcpu101A0, DIMMcpu002A0, ..., DIMMcpu105A0. Assigning the last occupancy bit of the above memory encoding to 1, the encoding of all memory is now: DIMMcpu001A1, DIMMcpu001B0, ..., DIMMcpu005A1, DIMMcpu005B0, DIMMcpu006A0, DIMMcpu006B0, DIMMcpu101A1, DIMMcpu101B0, ..., DIMMcpu105A1, DIMMcpu105B0, DIMMcpu106A0, DIMMcpu106B0. The hard disks are first allocated sequentially by region, and then remotely allocated according to the hard disk location. That is, the three hard disks STOR1010, STOR2010, and STOR1120 are called, and the last occupancy code of the above hard disk codes is assigned to 1, and the first AES task is run.
[0156] After the first AES task completes, the real-time power monitoring system detects a rise to 700W, indicating R = 0.13 < 0.3, with a V rate of change of 0.03 / s. The system continues to execute the first policy, reading and executing the second AES task. The memory and hard disk occupancy management module reads the corresponding memory occupancy bits using the CPU-channel-memory bit method. The first memory DIMM, cpu011, indicates occupied. It changes its value to 0 and skips the task. This continues with the same process. By the time the call is complete, the number of called memory blocks is 10, but the number of read memory blocks is 20, which is less than the maximum number of 24. Therefore, the remaining four memory blocks are assigned occupancy codes.
[0157] The hard drives STOR1011, STOR2011, and STOR1121 are read in the same manner, and after they are all occupied, their occupancy codes are changed to 0. The system continues reading x = round((2k-1)×n / 2i-2), k = (1, 2, 3, ... 2i-3). At this point, the front window has been read for the third time, i = 3. At this point, x = 6, STOR1060, can be called and its occupancy code is assigned to 1. The rear window is also read for the second time. The largest hard drive, STOR2020, is selected and called and changed to STOR2021. The front window is read again. At this point, i = 4. There are two x values, 3 and 9. The system calls STOR1030 and assigns it a value of 1. At this point, the number of called hard drives equals the optimal number of hard drives. The system stops calling and assigns the occupancy code of all remaining unread hard drives to 0.
[0158] At this point, the memory and hard disk for the second AES task are all prepared, and the second AES task begins to be executed.
[0159] After the second AES task is completed, the real-time power is monitored to have risen to 750W, that is, R = 0.25 < 0.3, and V is 0.3 / s. The system starts to execute the fourth strategy, reading the third Compress task from the task stack with the second highest power and executing it.
[0160] The optimal number of memories and hard disks for the Compress task is 16 and 6, as obtained from the energy efficiency configuration table. The memory and hard disk occupancy management module reads the corresponding memory occupancy bits in the CPU-channel-memory bit manner. After reading all 24 memories, it completes calling 14 memories, which is less than the required amount of memory. At this time, the number of called memories is <16, and the number of read memories is 14. According to the memory and hard disk occupancy logic diagram, the system starts reading and assigning values from DIMMcpu001A again. However, unlike the first round of reading, when the occupancy code is read as 1, it does not call or assign a value, and continues to read the next memory until the called memory reaches 16. The same is true for the hard disk, and the embodiments of the present disclosure will not be repeated.
[0161] The task management method provided by the embodiments of the present disclosure obtains the energy efficiency configuration table of the server to obtain the memory quantity, hard disk quantity, and operating power corresponding to various task types when the energy efficiency ratio is maximized. The received multiple tasks are parsed and assigned to corresponding task stacks, and the multiple task stacks are sorted according to the operating power in the energy efficiency configuration table. This ensures that high-priority or high-efficiency tasks are executed first, which helps improve the overall efficiency of task processing. The real-time power of the power supply is obtained, and the power coefficient and change rate are calculated. The task scheduling strategy is determined based on the power coefficient and change rate. This allows the system to dynamically adjust the task scheduling strategy based on the current power usage to adapt to different load conditions. The memory and hard disk are allocated based on the sorting results, the scheduling strategy, and the energy efficiency configuration table. Since each task uses different memory and hard disk, the memory and hard disk are rotated to work, that is, different memory and hard disk areas are scheduled to work at different times. This can distribute the load and avoid long-term high-load operation of a certain area. While improving server energy efficiency, it also reduces the real-time temperature of the memory and hard disk areas and reduces the problem of frequent response of the cooling system due to heat accumulation, further achieving energy saving and consumption reduction.
[0162] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0163] Figure 2A structural diagram of a task management device 200 provided by the present disclosure is shown in FIG. Figure 2 As shown, the apparatus of this embodiment includes: an acquisition module 210, an allocation module 220, a monitoring module 230, a calculation module 240, a determination module 250 and a deployment module 260, wherein:
[0164] An acquisition module 210 is configured to acquire an energy efficiency configuration table of the server; the energy efficiency configuration table includes: resource quantities and operating powers corresponding to various types of tasks when the energy efficiency ratio is maximized, the resource quantities including the memory quantity and the hard disk quantity;
[0165] an allocation module 220 for receiving a plurality of tasks, allocating each task to a corresponding task stack, and sorting the plurality of task stacks in descending order according to the operating power in the energy efficiency configuration table to obtain a sorting result of the plurality of task stacks;
[0166] Monitoring module 230, used to obtain power supply power in real time;
[0167] A calculation module 240 is configured to calculate a power factor and a rate of change of the power supply within a preset operating range;
[0168] A determination module 250 is configured to determine a task scheduling strategy based on the power coefficient and the change rate;
[0169] The allocation module 260 is configured to perform memory allocation and hard disk allocation for tasks in each task stack according to the sorting result, the energy efficiency configuration table and the task scheduling policy.
[0170] As an optional implementation of the embodiment of the present disclosure, the acquisition module 210 includes:
[0171] A first acquiring unit is configured to test various task types using server energy efficiency testing software to acquire an energy efficiency configuration table of the server;
[0172] or;
[0173] The second acquiring unit is configured to acquire an energy efficiency configuration table of the server based on the server configuration information provided by the server manufacturer.
[0174] As an optional implementation of the embodiment of the present disclosure, the first acquiring unit is specifically configured to:
[0175] Determine the combination of multiple resource quantities to be tested based on the total amount of memory and hard disks on the server;
[0176] Conduct traversal tests on various resource quantity combinations to obtain the energy efficiency ratio, operating power, and test duration of various types of tasks;
[0177] Generate an initial energy efficiency configuration table based on the energy efficiency ratio, operating power and test duration corresponding to the various resource quantity combinations;
[0178] Analyze the initial energy efficiency configuration table to obtain the memory quantity, hard disk quantity, operating power, and test duration corresponding to various types of tasks when the energy efficiency ratio is maximized;
[0179] An energy efficiency configuration table for the server is generated according to the memory quantity, hard disk quantity, operating power, and test duration corresponding to each type of task when the energy efficiency ratio is maximized.
[0180] As an optional implementation of the embodiment of the present disclosure, the allocation module is specifically configured to:
[0181] Accept multiple tasks and determine the task type corresponding to each task;
[0182] Allocating each task to a corresponding task stack according to a task type mapping table; the task type mapping table includes: a correspondence between multiple tasks and multiple task stacks, each task stack corresponding to a task type;
[0183] According to the operating power of each task type in the energy efficiency configuration table, the multiple task stacks are sorted in descending order to obtain sorting results of the multiple task stacks.
[0184] As an optional implementation of the embodiment of the present disclosure, the computing module is specifically configured to:
[0185] Based on a preset working range of the server, determining a maximum load power and a minimum load power corresponding to the preset working range;
[0186] The power factor and the rate of change of the real-time power of the power supply in a preset working range are calculated according to the real-time power of the power supply, the maximum load power, and the minimum load power.
[0187] As an optional implementation of the embodiment of the present disclosure, the determining module includes:
[0188] a first determining unit, configured to determine that the task scheduling strategy is a first strategy when the power coefficient of the power supply is a first value;
[0189] an analyzing unit, configured to determine a task scheduling strategy based on the power coefficient and the change rate when the power coefficient is greater than the first value and less than a second value;
[0190] The second determining unit is configured to determine that the task scheduling strategy is a second strategy when the power coefficient of the power supply is a second value.
[0191] As an optional implementation of the embodiment of the present disclosure, the analysis unit includes:
[0192] Determining whether the power factor of the power supply is greater than the first value and less than a third value; the third value is less than the second value;
[0193] If the power factor is greater than the first value and less than a third value, determining whether the rate of change is less than or equal to a fourth value;
[0194] If the change rate is less than or equal to a fourth value, determining that the task scheduling strategy is the first strategy;
[0195] If the change rate is greater than the fourth value and less than or equal to the fifth value, determining that the task scheduling strategy is the third strategy;
[0196] If the change rate is greater than the fifth value, the task scheduling strategy is determined to be the fourth strategy.
[0197] As an optional implementation manner of the embodiment of the present disclosure, the determining whether the power factor of the power supply is greater than the first value and less than a third value further includes:
[0198] determining whether the power factor is greater than or equal to the third value and less than a sixth value, and the sixth value is less than the second value;
[0199] If the power factor is greater than or equal to the third value and less than a sixth value, determining whether the rate of change is less than or equal to the fifth value;
[0200] If the change rate is less than or equal to the fifth value, determining that the task scheduling strategy is the third strategy;
[0201] If the change rate is greater than the fifth value, the task scheduling strategy is determined to be the second strategy.
[0202] As an optional implementation manner of the embodiment of the present disclosure, the determining whether the power factor is greater than or equal to the third value and less than a sixth value further includes:
[0203] If the power factor is greater than or equal to the sixth value and less than the second value, determining whether the rate of change is less than or equal to the fourth value;
[0204] If the change rate is less than or equal to the fourth value, determining that the task scheduling strategy is the fourth strategy;
[0205] If the change rate is greater than the fourth value, the task scheduling strategy is determined to be the second strategy.
[0206] As an optional implementation of the embodiment of the present disclosure, the memory allocation and hard disk allocation for tasks in each task stack includes:
[0207] Allocate memory and hard disk for tasks in each task stack based on the preset allocation method;
[0208] The preset allocation method includes a memory allocation method and a hard disk allocation method; the memory allocation method includes: allocation according to the order of the central processing unit and the order of the memory channels of the central processing unit; or; allocation according to the order of the central processing unit, the order of the memory channels of the central processing unit, and the order of the memory channel positions; the hard disk allocation method includes: remote allocation according to the order of the hard disk areas and the positions in the hard disk areas.
[0209] As an optional implementation of the embodiment of the present disclosure, the deployment module is specifically configured to:
[0210] Obtain the amount of memory and hard disk of the server;
[0211] According to the energy efficiency configuration table, obtaining the amount of memory and the amount of hard disk corresponding to the first task stack when the energy efficiency ratio is the highest; the first task stack is the task stack with the highest running power among the multiple task stacks;
[0212] According to the scheduling policy, memory allocation and hard disk allocation are performed for the tasks of the first task stack based on the memory allocation method and the hard disk allocation method;
[0213] Obtaining the amount of memory and the amount of hard disk corresponding to the second task stack when the energy efficiency ratio is maximized; the operating power of the second task stack is less than the operating power of the first task stack;
[0214] According to the scheduling policy, memory allocation and hard disk allocation are performed for the tasks of the second task stack based on the memory allocation method and the hard disk allocation method.
[0215] For the description of the features in the embodiment corresponding to the task management device 200, reference can be made to the relevant description of the embodiment corresponding to the task management method, which will not be repeated here.
[0216] The task management device provided by the embodiment of the present disclosure obtains the energy efficiency configuration table of the server to obtain the memory quantity, hard disk quantity, and operating power corresponding to various task types when the energy efficiency ratio is maximized. The device parses and assigns multiple received tasks to corresponding task stacks, and sorts the multiple task stacks according to the operating power in the energy efficiency configuration table. This ensures that high-priority or high-efficiency tasks are executed first, which helps improve the overall efficiency of task processing. The device obtains the real-time power of the power supply, calculates the power coefficient and change rate of the power supply, and determines the task scheduling strategy based on the power coefficient and change rate. This allows the system to dynamically adjust the task scheduling strategy according to the current power usage to adapt to different load conditions. The device allocates memory and hard disk according to the sorting result, the scheduling strategy, and the energy efficiency configuration table. Since each task uses different memory and hard disk, the memory and hard disk are rotated to work, that is, different memory and hard disk areas are scheduled to work at different times. This can distribute the load and avoid long-term high-load operation of a certain area. While improving server energy efficiency, it also reduces the real-time temperature of the memory and hard disk areas and reduces the problem of frequent response of the cooling system due to heat accumulation, further achieving energy saving and consumption reduction.
[0217] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned task management method embodiments.
[0218] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned task management method embodiments when running.
[0219] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0220] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned task management method embodiments are implemented.
[0221] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned task management method embodiments are implemented.
[0222] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0223] The above is a detailed introduction to a task management method provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A task management method, characterized in that: The method comprises: Obtaining an energy efficiency configuration table for the server; the energy efficiency configuration table includes: the resource quantities and operating powers corresponding to various types of tasks when the energy efficiency ratio is maximized, the resource quantities including the memory quantity and the hard disk quantity; receiving a plurality of tasks, assigning each task to a corresponding task stack, and sorting the plurality of task stacks in descending order according to the operating power in the energy efficiency configuration table to obtain sorting results of the plurality of task stacks; Get power in real time; Calculating the power factor and the rate of change of the power supply within a preset operating range; Determining a task scheduling strategy based on the power factor and the rate of change; Performing memory allocation and hard disk allocation for tasks in each task stack according to the sorting result, the energy efficiency configuration table and the task scheduling strategy; The receiving of multiple tasks, assigning each task to a corresponding task stack, and sorting the multiple task stacks in descending order according to the operating power in the energy efficiency configuration table to obtain sorting results of the multiple task stacks include: Accept multiple tasks and determine the task type corresponding to each task; Allocating each task to a corresponding task stack according to a task type mapping table; the task type mapping table includes: a correspondence between multiple tasks and multiple task stacks, each task stack corresponding to a task type; According to the operating power of each task type in the energy efficiency configuration table, the multiple task stacks are sorted in descending order to obtain sorting results of the multiple task stacks.
2. The task management method according to claim 1, characterized in that: The step of obtaining the energy efficiency configuration table of the server includes: Use server energy efficiency testing software to test various task types and obtain the server's energy efficiency configuration table; or; Based on the server configuration information provided by the server manufacturer, obtain the server's energy efficiency configuration table.
3. The task management method according to claim 2, characterized in that: The server energy efficiency test software is used to test various task types to obtain the server energy efficiency configuration table, including: Determine the combination of multiple resource quantities to be tested based on the total amount of memory and hard disks on the server; Conduct traversal tests on various resource quantity combinations to obtain the energy efficiency ratio, operating power, and test duration of various types of tasks; Generate an initial energy efficiency configuration table based on the energy efficiency ratio, operating power and test duration corresponding to the various resource quantity combinations; Analyze the initial energy efficiency configuration table to obtain the memory quantity, hard disk quantity, operating power, and test duration corresponding to various types of tasks when the energy efficiency ratio is maximized; An energy efficiency configuration table for the server is generated according to the memory quantity, hard disk quantity, operating power, and test duration corresponding to each type of task when the energy efficiency ratio is maximized.
4. The task management method according to claim 1, characterized in that: The calculating of the power factor and the rate of change of the power supply in the preset working range includes: Based on a preset working range of the server, determining a maximum load power and a minimum load power corresponding to the preset working range; The power factor and the rate of change of the power supply power in a preset working range are calculated according to the power supply power, the maximum load power and the minimum load power.
5. The task management method according to claim 4, characterized in that: The determining of a task scheduling strategy according to the power coefficient and the change rate includes: When the power factor of the power supply is a first value, determining that the task scheduling strategy is a first strategy; When the power factor is greater than the first value and less than the second value, determining a task scheduling strategy according to the power factor and the change rate; When the power factor is a second value, the task scheduling strategy is determined to be a second strategy.
6. The task management method according to claim 5, characterized in that: When the power factor is greater than the first value and less than the second value, determining a task scheduling strategy according to the power factor and the change rate includes: Determining whether the power factor of the power supply is greater than the first value and less than a third value; the third value is less than the second value; If the power factor is greater than the first value and less than a third value, determining whether the rate of change is less than or equal to a fourth value; If the change rate is less than or equal to a fourth value, determining that the task scheduling strategy is the first strategy; If the change rate is greater than the fourth value and less than or equal to the fifth value, determining that the task scheduling strategy is the third strategy; If the change rate is greater than the fifth value, the task scheduling strategy is determined to be the fourth strategy.
7. The task management method according to claim 6, characterized in that: The determining whether the power factor is greater than the first value and less than a third value further includes: determining whether the power factor is greater than or equal to the third value and less than a sixth value, and the sixth value is less than the second value; If the power factor is greater than or equal to the third value and less than a sixth value, determining whether the rate of change is less than or equal to the fifth value; If the change rate is less than or equal to the fifth value, determining that the task scheduling strategy is the third strategy; If the change rate is greater than the fifth value, the task scheduling strategy is determined to be the second strategy.
8. The task management method according to claim 7, characterized in that: The determining whether the power factor is greater than or equal to the third value and less than a sixth value further includes: If the power factor is greater than or equal to the sixth value and less than the second value, determining whether the rate of change is less than or equal to the fourth value; If the change rate is less than or equal to the fourth value, determining that the task scheduling strategy is the fourth strategy; If the change rate is greater than the fourth value, the task scheduling strategy is determined to be the second strategy.
9. The task management method according to claim 1, characterized in that: The memory allocation and hard disk allocation for tasks in each task stack include: Allocate memory and hard disk for tasks in each task stack based on the preset allocation method; The preset allocation method includes a memory allocation method and a hard disk allocation method; the memory allocation method includes: allocation according to the order of the central processing unit and the order of the memory channels of the central processing unit; or; allocation according to the order of the central processing unit, the order of the memory channels of the central processing unit, and the order of the memory channel positions; the hard disk allocation method includes: remote allocation according to the order of the hard disk area and the position in the hard disk area.
10. The task management method according to claim 9, characterized in that: The performing memory allocation and hard disk allocation for tasks in each task stack based on a preset allocation method according to the energy efficiency configuration table and the task scheduling policy includes: Obtain the amount of memory and hard disk of the server; According to the energy efficiency configuration table, obtaining the amount of memory and the amount of hard disk corresponding to the first task stack when the energy efficiency ratio is the highest; the first task stack is the task stack with the highest running power among the multiple task stacks; According to the scheduling policy, memory allocation and hard disk allocation are performed for the tasks of the first task stack based on the memory allocation method and the hard disk allocation method; Obtaining the amount of memory and the amount of hard disk corresponding to the second task stack when the energy efficiency ratio is maximized; the operating power of the second task stack is less than the operating power of the first task stack; According to the scheduling policy, memory allocation and hard disk allocation are performed for the tasks of the second task stack based on the memory allocation method and the hard disk allocation method.
11. A task management device, characterized in that: The device comprises: An acquisition module is used to obtain an energy efficiency configuration table of the server; the energy efficiency configuration table includes: the resource quantity and operating power corresponding to multiple types of tasks when the energy efficiency ratio is maximized, the resource quantity including the memory quantity and the hard disk quantity; an allocation module, configured to receive a plurality of tasks, allocate each task to a corresponding task stack, and sort the plurality of task stacks in descending order according to the operating power in the energy efficiency configuration table to obtain a sorting result of the plurality of task stacks; Monitoring module, used to obtain power supply power in real time; A calculation module, configured to calculate a power factor and a rate of change of the power supply within a preset operating range; A determination module, configured to determine a task scheduling strategy based on the power coefficient and the change rate; an allocation module, configured to perform memory allocation and hard disk allocation for tasks in each task stack according to the sorting result, the energy efficiency configuration table and the task scheduling policy; The allocation module is specifically used to: Accept multiple tasks and determine the task type corresponding to each task; Allocating each task to a corresponding task stack according to a task type mapping table; the task type mapping table includes: a correspondence between multiple tasks and multiple task stacks, each task stack corresponding to a task type; According to the operating power of each task type in the energy efficiency configuration table, the multiple task stacks are sorted in descending order to obtain sorting results of the multiple task stacks.
12. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the task management method according to any one of claims 1 to 10 when executing the computer program.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the task management method according to any one of claims 1 to 10.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the task management method according to any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Method and system for controlling battery power dissipation
CN104571462A
High-efficiency power management method and system for Internet of Things
CN119396272A