Task management method and device, equipment, medium and product
By obtaining the server's energy efficiency configuration table and real-time power supply power, and dynamically provisioning tasks and resources, the problem of difficulty in identifying the best energy efficiency status of a single server is solved, achieving a more efficient energy-saving and consumption reduction effect.
Patent Information
- Application Number
- CN202510663150.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-05-22
AI Technical Summary
The prior art is difficult to identify and manage the best energy efficiency status during the runtime of a single server, resulting in poor energy saving and consumption reduction effects.
By obtaining the server's energy efficiency configuration table, receiving and allocating tasks to the task stack, and task scheduling and resource allocation are performed according to the energy efficiency configuration table and real-time power supply power, ensuring that tasks are executed in order of energy efficiency, and dynamically adjusting resource usage strategies.
It improves the energy-saving and consumption reduction effect of a single server during the runtime. By dynamically adjusting task scheduling and resource use, it adapts to different load conditions, reduces the real-time temperature of memory and hard disk areas, and reduces the frequent response problems of the cooling system caused by heat aggregation.
Smart Images

Figure CN120196419A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of energy efficiency optimization, and particularly to a task management method, device, equipment, medium and product. Background Art
[0002] The energy efficiency of a server is an important indicator to measure the energy utilization efficiency during its operation, which involves multiple aspects such as hardware configuration, software optimization, and management strategies. The component efficiency of a product, such as CPU (Central Processing Unit) efficiency and power supply efficiency, the number of power-consuming components such as the number of memories and hard disks, the task management of BMC (Baseboard Management Controller) and BIOS (Basic Input / Output System), and the heat dissipation strategy, etc., all have an impact on the energy efficiency result.
[0003] In related technologies, through the task management of multiple nodes or multiple servers, tasks are concentrated on some servers or some nodes, and then standby processing is performed through idle servers or idle nodes to achieve the purpose of energy conservation and consumption reduction. However, this method lacks the recognition and management of whether a single server is in the best 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 conservation and consumption reduction effects for a single server.
[0004] Therefore, how to improve the energy conservation and consumption reduction effect during the operation of a single server is an urgent problem to be solved currently. Summary of the Invention
[0005] This application provides a task management method, device, equipment, medium and product to at least solve the problem of relatively low accuracy and rationality of text chunking in related technologies.
[0006] This application provides a task management method, which includes: Obtain the energy efficiency configuration table of the server; the energy efficiency configuration table includes: the resource quantities and operating powers respectively corresponding to various types of tasks when the energy efficiency ratio is the largest, and the resource quantities include the number of memories and the number of hard disks; Receive multiple tasks, allocate each task to the corresponding task stack, and perform a descending order sorting on multiple task stacks according to the operating power in the energy efficiency configuration table to obtain the sorting result of multiple task stacks; Obtain the power supply power in real time; Calculate the power supply power coefficient and the change rate of the power supply power in a preset working interval; Determine the task scheduling strategy according to the power supply power coefficient and the change rate; According to the sorting result, the energy efficiency configuration table, and the task scheduling policy, perform memory allocation and hard disk allocation for the tasks in each task stack.
[0007] This application also provides a task management device, which includes: An acquisition module, configured to acquire the energy efficiency configuration table of the server; the energy efficiency configuration table includes: the resource quantities and operating powers respectively corresponding to various types of tasks when the energy efficiency ratio is the largest, and the resource quantities include the memory quantity and the hard disk quantity; An allocation module, configured to receive multiple tasks, allocate each task to the corresponding task stack, and perform a descending order sorting on the multiple task stacks according to the operating power in the energy efficiency configuration table to obtain the sorting result of the multiple task stacks; A monitoring module, configured to acquire the power in real time; A calculation module, configured to calculate the power coefficient and the change rate of the power within a preset working range; A determination module, configured to determine the task scheduling policy according to the power coefficient and the change rate; A deployment module, configured to perform memory deployment and hard disk deployment for the tasks in each task stack according to the sorting result, the energy efficiency configuration table, and the task scheduling policy.
[0008] This application also provides an electronic device, including: a memory, configured to store a computer program; a processor, configured to implement the steps of any of the above task management methods when executing the computer program.
[0009] This application also provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above task management methods are implemented.
[0010] This application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of any of the above task management methods are implemented.
[0011] Through this application, by obtaining the energy efficiency configuration table of the server, the memory quantity, hard disk quantity, and operating power corresponding to various task types when the energy efficiency ratio is the largest can be obtained; parsing the received multiple tasks and allocating them to the corresponding task stacks, and sorting the multiple task stacks according to the operating power in the energy efficiency configuration table 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, calculating the power supply power factor and the change rate, and determining the task scheduling strategy according to the power supply power factor and the change rate, the system can dynamically adjust the task scheduling strategy according to the current power usage situation to adapt to different load conditions; allocating memory and hard disks according to the sorting result, the scheduling strategy, and the energy efficiency configuration table. Since the memory and hard disks used by each task are different, the memory and hard disks work in a rotation system, that is, different memory and hard disk areas are scheduled to work at different times, which can disperse the load, avoid a certain area working under high load for a long time, reduce the real-time temperature of the memory and hard disk areas while improving the energy efficiency of the server, and reduce the problem that the heat dissipation system responds frequently due to heat accumulation, further achieving energy conservation and consumption reduction. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0013] To more clearly illustrate the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0014] Figure 1 It is a flowchart of a task management method provided by an embodiment of the present application; Figure 2 It is a structural diagram of a task management device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0015] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present application.
[0016] It should be noted that in the description of this application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or elements inherent to such a process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0017] To enable those skilled in the art of this technology to better understand the solution of this application, the following further detailed description of this application will be given in conjunction with the accompanying drawings and specific embodiments.
[0018] Term Explanation: Server Energy Efficiency: It refers to the ratio between the energy consumed by a server during operation and the computing or storage functions it provides, and is an important indicator for measuring the relationship between server performance and energy consumption.
[0019] Task Stack: It is a data structure used to manage the execution order of tasks, 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 to be executed.
[0020] In the related art, through the task management of multiple nodes or multiple servers, tasks are concentrated on some servers or some nodes, and then standby processing is performed through idle servers or idle nodes to achieve the purpose of energy conservation and consumption reduction. However, this method lacks the identification and management of whether a single server is in the best 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 conservation and consumption reduction effects for a single server.
[0021] Based on the above problems, the embodiments of this application provide a task management method, and the method will be described in detail in combination with the execution process of the task management method.
[0022] Refer to Figure 1 As shown, the task management method provided by the embodiments of the present invention includes the following steps: S11. Obtain the energy efficiency configuration table of the server.
[0023] Among them, the energy efficiency configuration table includes: the resource quantities and operating powers respectively corresponding to various types of tasks when the energy efficiency ratio is the largest, and the resource quantities include the memory quantity and the hard disk quantity.
[0024] In some embodiments, the above step S11 can be implemented in the following manner: Test various task types through the server energy efficiency test software to obtain the energy efficiency configuration table of the server; Or; Obtain the energy efficiency configuration table of the server based on the server configuration information provided by the server manufacturer.
[0025] Specifically, in one way, place the server in an energy efficiency test environment and use energy efficiency test software, such as BenchSEE or SERT (where BenchSEE and SERT are both energy efficiency test software), to obtain the energy efficiency configuration table of the server. Another way is that the server manufacturer provides an energy efficiency mode configuration table for each CPU, reducing the test volume for all users. Although there may be a difference between the provided operating power and the actual server, it does not affect the power ranking of each test mode.
[0026] Optionally, the first above-mentioned way can be implemented through the following steps: Determine various combinations of resource quantities to be tested according to the total memory quantity and total hard disk quantity of the server; Perform traversal tests on various combinations of resource quantities to obtain the energy efficiency ratio, operating power, and test duration of various types of tasks; Generate an initial energy efficiency configuration table according to the energy efficiency ratio, operating power, and test duration corresponding to the various combinations of resource quantities; Analyze the initial energy efficiency configuration table to obtain the memory quantity, hard disk quantity, operating power, and test duration corresponding to each type of task when the energy efficiency ratio is the largest; Generate the energy efficiency configuration table of the server 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 the largest.
[0027] It should be noted that the scenario where all the memory and hard disks of the server are involved in 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. However, the operating system generally treats all memory or hard disks as a whole. For example, all hard disks are combined into a large storage through a RAID (Redundant Array of Independent Disks Controller) card. Even if only a small amount of data is written, both the memory and the hard disk respond and allocate the write. In the embodiments of the present disclosure, according to the address encoding of the memory and the hard disk in the operating system, they are separated into different cache or storage locations at the system level, and the optimal memory and hard disk quantities corresponding to each working scenario are refined.
[0028] Specifically, by controlling the address segments of actual writing and reading, the number of resources actually participating in the test is controlled, that is, the storage address encoding of resources not participating in the test is disabled. For example, the memory circuit can be turned off or the voltage of the circuit can be reduced to make it inoperative through the server BMC or CPLD. The order of the energy efficiency test is to generate an initial energy efficiency configuration table by traversing the energy efficiency ratio, operating power, and test duration of different memory and hard disk quantities participating in the test of the server without shutting down according to the total number of the server's memory and hard disks. Then, according to the results of the initial energy efficiency configuration table, the entries with the best energy efficiency ratio (referring to the highest energy efficiency ratio) under each test type are selected to generate the energy efficiency configuration table of the server.
[0029] It can be understood that for each server order or servers with the same configuration, only 1 server can be tested, and then the energy efficiency configuration table can be passed to all servers with the same order / configuration to reduce the test quantity and cost.
[0030] Exemplarily, as shown in Table 1, Table 1 is the initial energy efficiency configuration table; as shown in Table 2, the label is the filtered energy efficiency configuration table.
[0031] Table 1
[0032] Table 2
[0033] S12. Receive multiple tasks, allocate each task to the corresponding task stack, and perform a descending order sorting on the multiple task stacks according to the operating power in the energy efficiency configuration table to obtain the sorting result of the multiple task stacks.
[0034] Optionally, the above step S12 can be implemented in the following manner: Receive multiple tasks and determine the task types corresponding to each task; Allocate each task to the corresponding task stack according to the task type mapping table.
[0035] Among them, the task type mapping table includes: the corresponding relationship between multiple tasks and multiple task stacks, and each task stack corresponds to one task type.
[0036] Perform a descending order sorting on the multiple task stacks according to the operating power of each task type in the energy efficiency configuration table to obtain the sorting result of the multiple task stacks.
[0037] Specifically, the received tasks are parsed into multiple tasks one by one, and the task type corresponding to each task is determined, such as reading, writing, compressing, encrypting, etc. According to the task type mapping table, each task is assigned to the corresponding task stack, and the multiple task stacks are sorted in descending order according to the operating power of each task type in the energy efficiency configuration table to obtain the sorting result of the multiple task stacks.
[0038] Exemplarily, as shown in Table 3, Table 3 is the task type mapping table. The establishment of the program log 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; the log analysis 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; the log archiving encryption can be mapped to the task stack corresponding to type 1.
[0039] Table 3
[0040] S13. Obtain the power supply power in real time.
[0041] Specifically, by reading the power consumption of the power supply in real time from the BMC or CPLD, and by judging the position of the power consumption in the optimal working range, that is, the power coefficient V and the change rate V, the task invocation strategy is determined.
[0042] Exemplarily, the IPMI instruction can be used to read the power consumption information of the power supply through the BMC; or, the real-time power consumption data of the server can be viewed through the BMC Web console, including the power consumption of the entire node, the power consumption estimation of the fan / PDB, the power consumption of the disk, etc. In addition, the CPLD can communicate with the power management chip through the PMBUS interface to read the real-time power consumption data of the power supply. For example, some power management chips support the PMBUS protocol, and the CPLD can be used to parse the power consumption data provided by these chips. The CPLD can also read various sensor data inside the server, including parameters such as current and voltage, and then calculate the real-time power consumption of the server according to these data.
[0043] S14. Calculate the power coefficient and change rate of the power supply power in the preset working range.
[0044] Optionally, the above step S14 can be implemented in the following manner: Based on the preset working range of the server, determine the maximum load power and the minimum load power corresponding to the preset working range; According to the real-time power of the power supply, the maximum load power and the minimum load power, calculate the power coefficient and change rate of the real-time power of the power supply in the preset working range.
[0045] It should be noted that the conversion efficiency (input power / output power) of the server power supply is different under different load ratios. Basically, the conversion efficiency and the load ratio show a normal relationship, and the best conversion efficiency generally appears at a load ratio of about 40 - 90%. The preset working range can be understood as the range corresponding to the best conversion efficiency.
[0046] Specifically, after setting the load power corresponding to the best efficiency range and the ranges of the power coefficient R and the change rate V are determined by the real-time power P of the power supply and the following formula:
[0047]
[0048] wherein, R represents the power coefficient, that is, R represents the relative position of the real-time power P with respect to and ; represents the minimum load power of the power supply corresponding to the best efficiency range; represents the maximum load power of the power supply corresponding to the best efficiency range; is the real-time power of the power supply; represents the change rate of power; V represents the change rate, 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 change rate V. The value range of V is a real number; when the power P increases, V > 0; when the power P decreases, V < 0.
[0049] Through the above formula calculation, the value range of R is between 0 and 1: When P = , R = 0; When P = , R = 1; When P is between and , R changes between 0 and 1.
[0050] S15. Determine the task scheduling strategy according to the power coefficient of the power supply and the change rate.
[0051] Specifically, determine the task scheduling strategy according to the power coefficient of the power supply and the change rate. In the embodiments of the present disclosure, the task scheduling strategy includes 4 types: the first strategy, the second strategy, the third strategy, and the fourth strategy.
[0052] Among them, the first strategy is to prioritize high-power tasks. Specifically: after each task is completed, the system will first select the task with the highest power from the unfinished tasks for processing. If there are no remaining tasks in the task stack with the currently highest power, tasks in the task stack with the next highest power will be selected in sequence, and so on.
[0053] Exemplarily, assume there are three task stacks corresponding to different power requirements: task stack 1 (power 100W), task stack 2 (power 80W), and task stack 3 (power 60W). After the server completes a task, it will first check if there are any unfinished tasks in task stack 1. If there are, it will process that task; if all tasks in task stack 1 have been completed, it will check task stack 2, and so on. During task scheduling, if there are multiple tasks in task stack 1, the server will process these tasks one by one until all tasks in task stack 1 are completed, and then process the tasks in task stack 2 and task stack 3 in sequence. This strategy ensures that high-power tasks are processed first, improving the overall energy efficiency.
[0054] This strategy of prioritizing high-power tasks can process tasks with higher energy consumption faster, reduce the average processing time of tasks, and improve the overall processing efficiency. In addition, since high-power tasks usually require more resources, prioritizing these tasks can reduce their occupancy time of system resources, which may help optimize the energy efficiency ratio.
[0055] The second strategy is to prioritize tasks with the lowest power requirements. This strategy helps to quickly empty the low-power task stacks. Specifically: first, all task stacks are sorted according to the power of the task stacks. Then, the system reads tasks from each task stack in ascending order of power for processing. When the number of tasks in the task stack with the currently lowest power is 0, the system will continue to allocate tasks from the task stack with the next lowest power, and so on.
[0056] Exemplarily, assume there are three task stacks with power levels A (low), B (medium), and C (high). According to the "prioritize the smallest" strategy, the system will process tasks in the order of A, B, and C, that is, first process all tasks in stack A, then all tasks in stack B, and finally all tasks in stack C.
[0057] Since low-power tasks usually have shorter execution times, prioritizing these tasks can quickly release system resources and improve the system's response speed. By prioritizing low-power tasks, more tasks can be completed faster, thus improving the overall processing efficiency. It helps to optimize the use of system resources and avoid occupying resources for a long time to process a single high-power task.
[0058] The third strategy is to read tasks from each task stack in order of the bottom power of the task stack. In this strategy, the system maintains a list of task stacks, and each task stack has a specific power level. The system reads tasks from each task stack in order of power level (usually in ascending or descending order). Specifically: First, all task stacks are sorted according to the power level of the task stack. Then, the system reads a task from each task stack in the sorted order for processing. After processing a task, the system returns to the start of the sorted list and continues to read the next task in order until all tasks are processed.
[0059] Exemplarily, assume there are three task stacks with power levels of A (low), B (medium), and C (high). According to the "sequential allocation" strategy, the system will process tasks in the order of A, B, C, that is, first process a task from stack A, then a task from stack B, and then a task from stack C, and so on in a cycle until all tasks are processed.
[0060] This sequential call strategy can ensure that each task stack has the opportunity to be processed, avoiding the situation where some task stacks are ignored. By processing tasks with different powers in sequence, the overall load of the system can be balanced and overload can be avoided.
[0061] The fourth strategy is to read tasks from the task stacks in a specific order, which is based on the power level of the task stack, that is, the largest, the smallest, the second largest, the second smallest, until the median task stack. Specifically: In this strategy, the system will first identify the power levels of all task stacks, and then read tasks from the task stacks in the following order, that is, first process the tasks in the task stack with the largest power, then process the tasks in the task stack with the smallest power, then process the tasks in the task stack with the second largest power, then process the tasks in the task stack with the second smallest power, and continue this alternating process until the task stack with the median power is reached.
[0062] Exemplarily, assume there are five task stacks with power levels of 100W, 60W, 80W, 40W, and 120W. According to the "remote call" strategy, the system will process tasks in the following order: read tasks from the task stack with the largest power (120W), read tasks from the task stack with the smallest power (40W), read tasks from the task stack with the second largest power (100W), read tasks from the task stack with the second smallest power (60W), and finally read tasks from the task stack with the median power (80W).
[0063] This strategy is suitable for scenarios that require a balance between handling high-load tasks and low-load tasks. Especially when the system load varies greatly, this scheduling strategy can be used to optimize the overall performance of the system. By alternately processing high-power and low-power tasks, the system load can be better balanced, avoiding overloading the system at a certain moment. The rapid processing of low-power tasks (usually with shorter execution times) can improve the system's response time and enhance the user experience. System resources can be utilized more effectively, avoiding resource waste caused by processing a single type of task for a long time.
[0064] In some embodiments, the above step S15 can be implemented in the following manner: When the power coefficient is a first value, determine the task scheduling strategy as the first strategy; When the power coefficient is greater than the first value and less than a second value, determine the task scheduling strategy according to the power coefficient and the change rate; When the power coefficient is the second value, determine the task scheduling strategy as the second strategy.
[0065] Wherein, the first value can be 0; the second value can be 1. It should be noted that the first value and the second value can also take other reasonable values, and specific limitations are not provided here.
[0066] Specifically, when the power coefficient R is 0, determine the task scheduling strategy as the first strategy. When the power coefficient is 1, determine the task scheduling strategy as the second strategy. When the power coefficient is greater than the first value and less than the second value, further determine the task scheduling strategy according to the power coefficient and the change rate.
[0067] Optionally, the above step (when the power coefficient is greater than the first value and less than the second value, determine the task scheduling strategy according to the power coefficient and the change rate) can be implemented in the following manner: Judge whether the power coefficient is greater than the first value and less than a third value; the third value is less than the second value; If the power coefficient is greater than the first value and less than the third value, then judge whether the change rate is less than or equal to a fourth value; If the change rate is less than or equal to the fourth value, determine the task scheduling strategy as the first strategy; If the change rate is greater than the fourth value and less than or equal to a fifth value, determine the task scheduling strategy as the third strategy; If the change rate is greater than the fifth value, determine the task scheduling strategy as the fourth strategy.
[0068] Among them, the third value can take the value of 0.3, the fourth value can take the value of 0.2, and the fifth value can take the value of 0.5. It should be noted that the third value, the fourth value, and the fifth value can also take other reasonable values, and no specific restrictions are imposed here.
[0069] Specifically, it is determined whether the power supply power factor is greater than the first value and less than the third value. If the power supply power factor is greater than the first value and less than the third value, then 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 first strategy; if the change rate is greater than the fourth value and less than or equal to the fifth value, the task scheduling strategy is determined to be the third strategy; if the change rate is greater than the fifth value, the task scheduling strategy is determined to be the fourth strategy.
[0070] Exemplarily, it is determined whether the power supply power factor R is greater than 0 and less than 0.3. If so, it is determined whether the change rate V is less than or equal to 0.2. If so, the task scheduling strategy is determined to be the first strategy; if the change rate V is greater than 0.2 and less than or equal to 0.5, the task scheduling strategy is determined to be the third strategy; if the change rate V is greater than 0.5, the task scheduling strategy is determined to be the fourth strategy.
[0071] Optionally, determining whether the power supply power factor is greater than the first value and less than the third value further includes: Determining whether the power supply power factor is greater than or equal to the third value and less than the sixth value, where the sixth value is less than the second value; If the power supply power factor is greater than or equal to the third value and less than the sixth value, then it is determined 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, the task scheduling strategy is determined to be the third strategy; If the change rate is greater than the fifth value, the task scheduling strategy is determined to be the second strategy.
[0072] Among them, the sixth value can take the value of 0.7. It should be noted that the sixth value can also take other reasonable values, and no specific restrictions are imposed here.
[0073] Specifically, it is determined whether the power supply power factor is greater than or equal to the third value and less than the sixth value; if the power supply power factor is greater than or equal to the third value and less than the sixth value, then it is determined 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, the task scheduling strategy is determined to be the third strategy; if the change rate is greater than the fifth value, the task scheduling strategy is determined to be the second strategy.
[0074] Exemplarily, determine whether the power factor of the power supply is greater than or equal to 0.3 and less than 0.7; if the power factor of the power supply is greater than or equal to 0.3 and less than 0.7, then 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, then determine the task scheduling strategy as the third strategy; if the change rate is greater than 0.5, then determine the task scheduling strategy as the second strategy.
[0075] Optionally, the above step (determining whether the power factor of the power supply is greater than or equal to the third value and less than the sixth value, where the sixth value is less than the second value) further includes: If the power factor of the power supply is greater than or equal to the sixth value and less than the second value, then 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, then determine the task scheduling strategy as the fourth strategy; If the change rate is greater than the fourth value, then determine the task scheduling strategy as the second strategy.
[0076] Specifically, if the power factor of the power supply is greater than or equal to the sixth value and less than the second value, then 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, then determine the task scheduling strategy as the fourth strategy; if the change rate is greater than the fourth value, then determine the task scheduling strategy as the second strategy.
[0077] Exemplarily, if the power factor of the power supply is greater than or equal to 0.7 and less than 1, then 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, then determine the task scheduling strategy as the fourth strategy; if the change rate is greater than 0.2, then determine the task scheduling strategy as the second strategy.
[0078] S16. According to the sorting result, the energy efficiency configuration table, and the task scheduling strategy, perform memory allocation and hard disk allocation for the tasks in each task stack.
[0079] Specifically, by managing the occupancy of the memory and the hard disk, while ensuring that the server runs at the highest energy efficiency, balance the occupancy ratios of each memory and hard disk, and control the temperatures of each memory and hard disk.
[0080] Suppose the server has 2 CPUs, and each CPU has 6 memory channels. Then the server has a total of 12 memory channels. Each channel supports the installation of 2 memory slots, so the server has a total of 24 memory modules. In terms of hard drives, assume the server has 2 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. By querying the data, it is known that the optimal conversion efficiency range of the power supply is 50% - 80%. Therefore, the maximum power within the optimal conversion efficiency range can be calculated as 1040W, and the minimum power is 650W.
[0081] First, encode and assign values to the actual addresses of the memory and hard drives.
[0082] 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 (e.g., 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 occupancy status of the memory. The initial occupancy status of the memory is unoccupied, represented by "0", and "1" represents the memory is occupied. Exemplarily, the memory encodings of the above server are: DIMMcpu001A0, DIMMcpu001B0, DIMMcpu002A0, DIMMcpu002B0,..., DIMMcpu1050, DIMMcpu105B0, DIMMcpu106A0, DIMMcpu106B0.
[0083] The hard drive encoding format is: STORabbF, where a represents the area of the hard drive. For example, 1 represents the front window area of the hard drive, and 2 represents the rear window area of the hard drive; bb represents the position number of the hard drive in that area. For example, the front window area is divided into 12 blocks, and 01 - 12 represent the position numbers of the hard drives in the front window area. The rear window area is divided into 2 blocks, and 01 - 02 represent the position numbers of the hard drives in the rear window area; F represents the occupancy status of the memory. The initial occupancy status of the hard drive is unoccupied, represented by "0", and "1" represents the hard drive is occupied. Exemplarily, the hard drive encodings of the above server are: STOR1010, STOR1020, STOR1030,..., STOR1120, STOR2010, and STOR2020.
[0084] Optionally, perform memory allocation and hard drive allocation for the tasks in each task stack based on a preset allocation method.
[0085] Among them, the preset allocation method includes a memory allocation method and a hard disk allocation method; the memory allocation method includes: allocating in the order of the central processing unit and the memory channels of the central processing unit; or; allocating in the order of the central processing unit, the memory channels of the central processing unit, and the order of the memory channel positions; the hard disk allocation method includes: remotely allocating in the order of the hard disk areas and the positions in the hard disk areas.
[0086] Specifically, the memory is sequentially allocated according to CPU-channel or CPU-channel-dual-channel memory position. The hard disk is first sequentially allocated according to the area, and then remotely allocated according to the hard disk position, that is, the hard disks with the smallest and largest serial numbers are allocated according to the hard disk position serial number. The relationship between the i-th (i>2) call of the hard disk in the same area and the total number n of hard disks in this area 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 such values, and all need to be called.
[0087] In some embodiments, the above step (performing memory allocation and hard disk allocation for the tasks in each task stack based on the preset allocation method according to the energy efficiency configuration table and the task scheduling strategy) can be implemented in the following manner: Obtain the memory quantity and hard disk quantity of the server; According to the energy efficiency configuration table, obtain the memory quantity and hard disk quantity corresponding to the first task stack when the energy efficiency ratio is the largest; the first task stack is the task stack with the largest running power among the multiple task stacks; According to the scheduling strategy, perform memory allocation and hard disk allocation for the tasks of the first task stack based on the memory allocation method and the hard disk allocation method; Obtain the memory quantity and hard disk quantity corresponding to the second task stack when the energy efficiency ratio is the largest; the running power of the second task stack is less than that of the first task stack; According to the scheduling strategy, perform memory allocation and hard disk allocation for the tasks of the second task stack based on the memory allocation method and the hard disk allocation method.
[0088] Specifically, first, obtain the memory quantity and hard disk quantity of the server. Referring to the above embodiments, the server has a total of 12 memory channels, and each channel supports the installation of 2 memory slots, so the server has a total of 24 memory modules. In terms of hard disks, assume that the server has 2 areas. There are 12 hard disks in the front window area and 2 hard disks in the rear window area. According to the energy efficiency configuration table, read the optimal memory and hard disk quantities corresponding to the first task, and perform memory and hard disk allocation for task operation. Among them, the memory is allocated sequentially according to CPU-channel or CPU-channel-dual-channel memory position. The hard disks are first allocated sequentially according to the area, and then remotely allocated according to the hard disk position, that is, the hard disks with the smallest and largest serial numbers are allocated according to the hard disk position serial number. The relationship between the i-th (i>2) call of the hard disks in the same area and the total number n of hard disks in this area 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 such values, and all need to be called. When allocating the hard disk occupancy, the assignment is synchronously changed to 1. For example, DIMMcpu001A1 and STOR1011 represent that the memory and hard disk are occupied. This continues until the required number of hard disks has been reached.
[0089] Then, read the optimal hard disk quantity and memory quantity corresponding to the second task. The memory still follows the allocation principle of the above steps. Starting from the first memory position of the first channel of the first CPU, read its occupancy value. When the assignment is 1, skip it without allocation and change the assignment to 0; then read the assignment of the first memory bit of the first channel of the second CPU until the memory with an assignment of 0 is read and called, and its assignment is changed to 1.
[0090] When the allocation of the required memory quantity is completed and not all memories have been read (the number of memories read < the maximum memory quantity), the system continues with the remaining memories and changes all assignments to 0 until all memory codes and assignments have been read.
[0091] When all memories have been read and assigned, but the allocation of the required memory quantity has not been completed (the number of memories read = the maximum memory quantity), the system starts reading from the first memory of the first channel of the first CPU again. However, the difference is that when the occupancy code is 1, it is neither called nor assigned, and continue to read the next memory until the required memory quantity is satisfied, and the system aborts and stops reading.
[0092] The same applies to the hard disks, following the order of area sequence allocation and hard disk position remote allocation.
[0093] Exemplarily, assume that the server has 2 CPUs, and each CPU has 6 memory channels. Then the server has a total of 12 memory channels. Each channel supports the installation of 2 memory slots, so the server has a total of 24 memory modules. In terms of hard disks, assume that the server has 2 areas. There are 12 hard disks in the front window area and 2 hard disks in the rear window area. The server is powered by a 1300W power supply. By querying the data, it can be known that the optimal conversion efficiency range of the power supply is 50% - 80%. Therefore, its maximum power within the optimal conversion efficiency range can be calculated as 1040W, and the minimum power is 650W.
[0094] Place the server in an energy efficiency test environment and disable the storage address encoding of the memory and hard disks that do not participate in the test. Obtain the initial energy efficiency configuration table according to the following test plan, as shown in Table 4. Then, based on the results of the initial energy efficiency configuration table, screen the entries with the best energy efficiency ratio (the highest energy efficiency ratio) for each test type to generate the energy efficiency configuration table of the server, as shown in Table 5.
[0095] Table 4
[0096] Table 5
[0097] Sort the task stack according to the operating power in the energy efficiency configuration table of the server. That is, the order of the task stack is Type 1 > Type 2 > Type 3 > Type 6 > Type 7 > Type 5 > Type 4. For example, the specific types corresponding to the above sorting are: AES>Compress>LU>SORT>SHA256>SOR>OLTP.
[0098] For example, the real-time power consumption read from the BMC is 600W, and dP / dt is calculated to get R = 0 and the change rate V = 0. Then, according to the policy process, execute the first policy and preferentially call the tasks in the task stack with the largest stack power. The system calls 1 AES task to execute.
[0099] According to the energy efficiency configuration table of the server, the optimal memory quantity and hard disk quantity corresponding to the first AES task are 10 and 3 respectively. If the allocation is carried out in the order of the central processing unit, the memory channels of the central processing unit, and the order of the memory channel positions, the memory call order of this server is: DIMMcpu001A0, DIMMcpu101A0, DIMMcpu002A0, ……, DIMMcpu105A0, and assign the last occupancy code of the above memory encoding to 1. At this time, the encoding of all memories is: DIMMcpu001A1, DIMMcpu001B0, ……, DIMMcpu005A1, DIMMcpu005B0, DIMMcpu006A0, DIMMcpu006B0, DIMMcpu101A1, DIMMcpu101B0, ……, DIMMcpu105A1, DIMMcpu105B0, DIMMcpu106A0, DIMMcpu106B0. The hard disks are first allocated in order by region and then remotely allocated by hard disk position, that is, call three hard disks STOR1010, STOR2010, and STOR1120, and assign the last occupancy code of the above hard disk encoding to 1 to run the first AES task.
[0100] After the first AES task is completed, at this time, it is monitored that the real-time power has risen to 700W, that is, R = 0.13 < 0.3, the V change rate is 0.03 / s, and the system still executes the first strategy, reads the second AES task and executes it. The memory and hard disk occupancy management module reads the occupancy bits of the corresponding memory in the way of CPU-channel-memory bit. The first memory DIMMcpu011 is shown to be occupied, change its assignment to 0 and skip it. By analogy, when the call is completed, the number of called memories = 10, but the number of read memories is 20 < the maximum memory number 24, so continue to assign occupancy codes to the remaining 4 memories.
[0101] The hard disks are in the same way. After successively reading STOR1011, STOR2011, and STOR1121, they are all occupied, and change their occupancy codes to 0. And continue to read x = round((2k - 1)×n / 2i - 2), k = (1, 2, 3……2i - 3). At this time, the front window area is the third read, that is, i = 3. At this time, x = 6, that is, STOR1060 can be called and assign its occupancy code to 1. The rear window area is still the second read, select the largest hard disk, that is, call STOR2020 and change it to STOR2021. Then continue to read the front window area. At this time, i = 4, and there are 2 x values, that is, 3 and 9. The system calls STOR1030 and assigns it to 1. At this time, the number of called hard disks has been equal to the optimal hard disk number. The system no longer calls and assigns occupancy codes of 0 to all the hard disks whose encodings have not been read.
[0102] So far, all the memory and hard disks for the second AES task are ready, and the second AES task starts to execute.
[0103] After the second AES task runs to completion, it is monitored that the real-time power has risen to 750W at this time, that is, R = 0.25 < 0.3, V is 0.3 / s, and the system starts to execute the fourth strategy, reads the third Compress task from the task stack with the second-highest power and executes it.
[0104] It is obtained from the energy efficiency configuration table that the optimal memory and hard disk quantities for the Compress task are 16 and 6. The memory and hard disk occupancy management module reads the occupancy bits of the corresponding memory in the way of CPU-channel-memory bit. After reading all 24 memories, only 14 memories are called, which is less than the required memory quantity. At this time, the number of called memories < 16, the number of read memories = 14. According to the memory and hard disk occupancy logic diagram, the system starts to read and assign values from DIMMcpu001A again. However, different from the first-round reading, when the occupancy code is 1, it is neither called nor assigned, and the next memory is continued to be read until 16 memories are called. The same is true for the hard disk, which will not be elaborated in this embodiment of the present disclosure.
[0105] The task management method provided by the embodiment of the present disclosure can obtain the memory quantity, hard disk quantity, and operating power corresponding to various task types when the energy efficiency ratio is the largest by obtaining the energy efficiency configuration table of the server; parse the received multiple tasks and allocate them to the corresponding task stacks, and sort the multiple task stacks according to the operating power in the energy efficiency configuration table, which can ensure that high-priority or high-efficiency tasks are executed first, helping to improve the overall efficiency of task processing; by obtaining the real-time power of the power supply, 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 situation to adapt to different load conditions; allocate memory and hard disks according to the sorting result, scheduling strategy, and energy efficiency configuration table. Since the memory and hard disks used by each task are different, the memory and hard disks work in a rotation system, that is, different memory and hard disk areas are scheduled to work at different times, which can disperse the load, avoid a certain area from working under high load for a long time, reduce the real-time temperature of the memory and hard disk areas while improving the energy efficiency of the server, and reduce the problem that the heat dissipation system responds frequently due to heat accumulation, further achieving energy conservation and consumption reduction.
[0106] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.
[0107] Figure 2Schematic diagram of a task management device 200 provided by the present disclosure, as Figure 2 shown, the device in 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, where The acquisition module 210 is configured to acquire an energy efficiency configuration table of the server; the energy efficiency configuration table includes: the resource quantities and operating powers respectively corresponding to various types of tasks when the energy efficiency ratio is the largest, and the resource quantities include the memory quantity and the hard disk quantity; The allocation module 220 is configured to receive multiple tasks, allocate each task to a corresponding task stack, and perform a descending order sorting on the multiple task stacks according to the operating power in the energy efficiency configuration table to obtain a sorting result of the multiple task stacks; The monitoring module 230 is configured to acquire the power supply power in real time; The calculation module 240 is configured to calculate the power supply power coefficient and the change rate of the power supply power in a preset working range; The determination module 250 is configured to determine a task scheduling policy according to the power supply power coefficient and the change rate; The deployment module 260 is configured to perform memory deployment and hard disk deployment for the tasks in each task stack according to the sorting result, the energy efficiency configuration table, and the task scheduling policy.
[0108] As an optional implementation manner of an embodiment of the present disclosure, the acquisition module 210 includes: A first acquisition unit, configured to test various task types through server energy efficiency test software to acquire the energy efficiency configuration table of the server; Or; A second acquisition unit, configured to acquire the energy efficiency configuration table of the server based on the server configuration information provided by the server manufacturer.
[0109] As an optional implementation manner of an embodiment of the present disclosure, the first acquisition unit is specifically configured to: Determine various resource quantity combinations to be tested according to the total memory quantity and the total hard disk quantity of the server; Perform traversal tests on various resource quantity combinations to acquire the energy efficiency ratio, operating power, and test duration of various types of tasks; Generate an initial energy efficiency configuration table according to the energy efficiency ratio, operating power, and test duration corresponding to the various resource quantity combinations; Analyze the initial energy efficiency configuration table to acquire the memory quantity, hard disk quantity, operating power, and test duration respectively corresponding to various types of tasks when the energy efficiency ratio is the largest; Generate an energy efficiency configuration table for the server 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 the largest.
[0110] As an optional implementation manner of the embodiment of the present disclosure, the allocation module is specifically configured to: Receive multiple tasks and determine the task type corresponding to each task; Allocate each task to the corresponding task stack according to the task type mapping table; the task type mapping table includes: the corresponding relationship between multiple tasks and multiple task stacks, and each task stack corresponds to one task type; Sort the multiple task stacks in descending order according to the operating power of each task type in the energy efficiency configuration table to obtain the sorting result of the multiple task stacks.
[0111] As an optional implementation manner of the embodiment of the present disclosure, the calculation module is specifically configured to: Based on the preset working range of the server, determine the maximum load power and the minimum load power corresponding to the preset working range; Calculate the power coefficient and the change rate of the real-time power of the power supply in the preset working range according to the real-time power of the power supply, the maximum load power, and the minimum load power.
[0112] As an optional implementation manner of the embodiment of the present disclosure, the determination module includes: A first determination unit, configured to determine that the task scheduling policy is the first policy when the power coefficient of the power supply is a first value; An analysis unit, configured to determine the task scheduling policy according to the power coefficient and the change rate when the power coefficient of the power supply is greater than the first value and less than a second value; A second determination unit, configured to determine that the task scheduling policy is the second policy when the power coefficient of the power supply is the second value.
[0113] As an optional implementation manner of the embodiment of the present disclosure, the analysis unit includes: Judge whether the power coefficient 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 coefficient of the power supply is greater than the first value and less than the third value, then judge whether the change rate is less than or equal to a fourth value; If the change rate is less than or equal to the fourth value, then determine that the task scheduling policy is the first policy; If the change rate is greater than the fourth value and less than or equal to a fifth value, then determine that the task scheduling policy is the third policy; If the change rate is greater than the fifth value, determine that the task scheduling policy is the fourth policy.
[0114] As an optional implementation manner of the embodiments of the present disclosure, the determining whether the power supply power factor is greater than the first value and less than the third value further includes: Determine whether the power supply power factor is greater than or equal to the third value and less than the sixth value, where the sixth value is less than the second value; If the power supply power factor 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 policy is the third policy; If the change rate is greater than the fifth value, determine that the task scheduling policy is the second policy.
[0115] As an optional implementation manner of the embodiments of the present disclosure, the determining whether the power supply power factor is greater than or equal to the third value and less than the sixth value further includes: If the power supply power factor is greater than or equal to the sixth value and less than the second 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 policy is the fourth policy; If the change rate is greater than the fourth value, determine that the task scheduling policy is the second policy.
[0116] As an optional implementation manner of the embodiments of the present disclosure, the performing memory allocation and hard disk allocation for the tasks in each task stack includes: Perform memory allocation and hard disk allocation for the tasks in each task stack based on a preset allocation method; The preset allocation method includes a memory allocation method and a hard disk allocation method; the memory allocation method includes: allocating in the order of the central processing unit, the memory channels of the central processing unit; or; allocating in the order of the central processing unit, the memory channels of the central processing unit, and the order of the memory channel positions; the hard disk allocation method includes: remotely allocating in the order of the hard disk areas and the positions in the hard disk areas.
[0117] As an optional implementation manner of the embodiments of the present disclosure, the allocation module is specifically configured to: Obtain the memory quantity and hard disk quantity of the server; Obtain the memory quantity and hard disk quantity corresponding to the first task stack when the energy efficiency ratio is the largest according to the energy efficiency configuration table; the first task stack is the task stack with the largest operating power among the multiple task stacks; According to the scheduling policy, perform memory allocation and hard disk allocation for the tasks of the first task stack based on the memory allocation method and the hard disk allocation method; Obtain the memory quantity and hard disk quantity corresponding to the second task stack when the energy efficiency ratio is the largest; the operating power of the second task stack is less than that of the first task stack; According to the scheduling policy, perform memory allocation and hard disk allocation for the tasks of the second task stack based on the memory allocation method and the hard disk allocation method.
[0118] For the description of the features in the corresponding embodiments of the task management device 200, reference can be made to the relevant descriptions in the corresponding embodiments of the task management method, which will not be elaborated here one by one.
[0119] The task management device provided in the embodiments of the present disclosure can obtain the memory quantity, hard disk quantity, and operating power corresponding to various task types when the energy efficiency ratio is the largest by obtaining the energy efficiency configuration table of the server; parse the received multiple tasks and allocate them to the corresponding task stacks, and sort the multiple task stacks according to the operating power in the energy efficiency configuration table, which can ensure that high-priority or high-efficiency tasks are executed first, helping to improve the overall efficiency of task processing; by obtaining the real-time power of the power supply, calculating the power supply power coefficient and the change rate, and determining the task scheduling policy according to the power supply power coefficient and the change rate, the system can dynamically adjust the task scheduling policy according to the current power supply usage situation to adapt to different load conditions; perform memory and hard disk allocation according to the sorting result, scheduling policy, and energy efficiency configuration table. Since the memory and hard disk used by each task are different, the memory and hard disk work in a rotation system, that is, different memory and hard disk areas are scheduled to work at different times, which can disperse the load, avoid a certain area working under high load for a long time, reduce the real-time temperature of the memory and hard disk areas while improving the energy efficiency of the server, and reduce the problem that the heat dissipation system responds frequently due to heat accumulation, further achieving energy conservation and consumption reduction.
[0120] The embodiments of the present application further provide an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the task management method.
[0121] The embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above-mentioned embodiments of the task management method when running.
[0122] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memory (ROM for short), random access memory (RAM for short), external hard drives, magnetic disks, or optical discs that can store computer programs.
[0123] An embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described embodiments of the task management method.
[0124] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above-described embodiments of the task management method.
[0125] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0126] The above provides a detailed introduction to a task management method provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A task management method, characterized in that, The method includes: Obtaining an energy efficiency configuration table of the server; the energy efficiency configuration table includes: the resource quantities and operating powers respectively corresponding to various types of tasks when the energy efficiency ratio is the largest, and the resource quantities include the memory quantity and the hard disk quantity; Receiving multiple tasks, allocating each task to a corresponding task stack, and sorting the multiple task stacks in descending order according to the operating powers in the energy efficiency configuration table to obtain a sorting result of the multiple task stacks; Obtaining the power supply power in real time; Calculating the power supply power coefficient and the change rate of the power supply power in a preset working interval; Determining a task scheduling strategy according to the power supply power coefficient and the change rate; Performing memory allocation and hard disk allocation for the tasks in each task stack according to the sorting result, the energy efficiency configuration table, and the task scheduling strategy.
2. The task management method according to claim 1, wherein The obtaining of the energy efficiency configuration table of the server includes: Testing various task types through server energy efficiency testing software to obtain the energy efficiency configuration table of the server; Or; Obtaining the energy efficiency configuration table of the server based on the server configuration information provided by the server manufacturer.
3. The task management method according to claim 2, wherein The testing of various task types through server energy efficiency testing software to obtain the energy efficiency configuration table of the server includes: Determining multiple resource quantity combinations to be tested according to the total memory quantity and the total hard disk quantity of the server; Performing traversal testing on various resource quantity combinations to obtain the energy efficiency ratio, operating power, and testing duration of various types of tasks; Generating an initial energy efficiency configuration table according to the energy efficiency ratio, operating power, and testing duration corresponding to various resource quantity combinations; Analyzing the initial energy efficiency configuration table to obtain the memory quantity, hard disk quantity, operating power, and testing duration respectively corresponding to various types of tasks when the energy efficiency ratio is the largest; Generating the energy efficiency configuration table of the server according to the memory quantity, hard disk quantity, operating power, and testing duration respectively corresponding to various types of tasks when the energy efficiency ratio is the largest.
4. The task management method according to claim 1, wherein The receiving of multiple tasks, allocating each task to a corresponding task stack, and sorting the multiple task stacks in descending order according to the operating powers in the energy efficiency configuration table to obtain a sorting result of the multiple task stacks includes: Receiving multiple tasks and determining the task types 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: the corresponding relationships between multiple tasks and multiple task stacks, and each task stack corresponds to one task type; Sorting the multiple task stacks in descending order according to the operating powers of various task types in the energy efficiency configuration table to obtain a sorting result of the multiple task stacks.
5. The task management method according to claim 1, characterized in that The calculating of the power supply power coefficient and the change rate of the power supply power in a preset working interval includes: Determining the maximum load power and the minimum load power corresponding to the preset working interval based on the preset working interval of the server; Calculating the power supply power coefficient and the change rate of the power supply power in the preset working interval according to the real-time power of the power supply, the maximum load power, and the minimum load power.
6. The task management method according to claim 5, wherein The determining of the task scheduling strategy according to the power supply power coefficient and the change rate includes: When the power factor of the power supply is the first value, determine that the task scheduling strategy is the first strategy; When the power factor of the power supply is greater than the first value and less than the second value, determine the task scheduling strategy according to the power factor of the power supply and the change rate; When the power factor of the power supply is the second value, determine that the task scheduling strategy is the second strategy.
7. The task management method according to claim 6, wherein The step of determining the task scheduling strategy according to the power factor of the power supply and the change rate when the power factor of the power supply is greater than the first value and less than the second value includes: Judge whether the power factor of the power supply is greater than the first value and less than the third value; the third value is less than the second value; If the power factor of the power supply is greater than the first value and less than the third value, then judge 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.
8. The task management method according to claim 7, wherein The step of judging whether the power factor of the power supply is greater than the first value and less than the third value further includes: Judge whether the power factor of the power supply is greater than or equal to the third value and less than the sixth value, and the sixth value is less than the second value; If the power factor of the power supply is greater than or equal to the third value and less than the sixth value, then judge 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.
9. The task management method according to claim 8, wherein The step of judging whether the power factor of the power supply is greater than or equal to the third value and less than the sixth value further includes: If the power factor of the power supply is greater than or equal to the sixth value and less than the second value, then judge 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 fourth strategy; If the change rate is greater than the fourth value, determine that the task scheduling strategy is the second strategy.
10. The task management method according to claim 1, wherein The step of performing memory allocation and hard disk allocation for the tasks in each task stack includes: Perform memory allocation and hard disk allocation for the tasks in each task stack based on a preset allocation method; The preset allocation method includes a memory allocation method and a hard disk allocation method; the memory allocation method includes: allocating in the order of the central processing unit, the memory channels of the central processing unit; or; allocating in the order of the central processing unit, the memory channels of the central processing unit, and the order of the memory channel positions; the hard disk allocation method includes: remotely allocating in the order of the hard disk areas and the positions in the hard disk areas.
11. The task management method according to claim 10, wherein The step of performing memory allocation and hard disk allocation for the tasks in each task stack based on the preset allocation method according to the energy efficiency configuration table and the task scheduling strategy includes: Obtain the memory quantity and hard disk quantity of the server; According to the energy efficiency configuration table, obtain the memory quantity and hard disk quantity corresponding to the first task stack when the energy efficiency ratio is the largest; the first task stack is the task stack with the largest running power among the multiple task stacks; According to the scheduling policy, perform memory allocation and hard disk allocation for the tasks of the first task stack based on the memory allocation method and the hard disk allocation method; Obtain the memory quantity and hard disk quantity corresponding to the second task stack when the energy efficiency ratio is the largest; the running power of the second task stack is less than that of the first task stack; According to the scheduling policy, perform memory allocation and hard disk allocation for the tasks of the second task stack based on the memory allocation method and the hard disk allocation method.
12. A task management device, characterized in that, The device includes: An obtaining module, configured to obtain an energy efficiency configuration table of the server; the energy efficiency configuration table includes: the resource quantities and running powers respectively corresponding to multiple types of tasks when the energy efficiency ratio is the largest, and the resource quantities include memory quantity and hard disk quantity; An allocation module, configured to receive multiple tasks, allocate each task to the corresponding task stack, and perform a descending order sorting on the multiple task stacks according to the running powers in the energy efficiency configuration table to obtain a sorting result of the multiple task stacks; A monitoring module, configured to obtain the power in real time; A calculation module, configured to calculate the power coefficient and the change rate of the power within a preset working range; A determination module, configured to determine a task scheduling policy according to the power coefficient and the change rate; A deployment module, configured to perform memory allocation and hard disk allocation for the tasks in each task stack according to the sorting result, the energy efficiency configuration table, and the task scheduling policy.
13. An electronic device, characterized in that, including: A memory, configured to store a computer program; A processor, configured to implement the steps of the task management method according to any one of claims 1 to 11 when executing the computer program.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the task management method according to any one of claims 1 to 11 when executed by a processor.
15. A computer program product, comprising a computer program, characterized in that, The computer program implements the steps of the task management method according to any one of claims 1 to 11 when executed by a processor.
Citation Information
Patent Citations
Method and system for controlling battery power dissipation
CN104571462A
Method and device for regulating power consumption of data center
CN107329811A
High-energy-efficiency Spark task scheduling method based on dynamic partitioning
CN111813512A
Task scheduling method and related equipment
CN117666755A
High-efficiency power management method and system for Internet of Things
CN119396272A