Method and device for dynamically balancing power consumption and performance of SSD (Solid State Disk) and computer equipment
By dynamically adjusting the read and write timing cycle of SSD, and comparing the data amount and threshold value of read and write requests, the shortcomings of the SSD controller in balancing power consumption and performance are solved, and the performance and power consumption balance in different scenarios is achieved, which improves the competitiveness of the SSD controller.
Patent Information
- Application Number
- CN202411636698.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-07
AI Technical Summary
Existing SSD controllers have shortcomings in balancing power consumption and performance, and cannot take into account performance and power consumption, resulting in weakening competitiveness.
By receiving the read and write request command, the data amount is recorded and accumulated, the data amount is compared with the preset threshold, and the read and write timing period is dynamically adjusted. For large data volume periods, the first timing process is called to delay reducing power consumption; for small data volume periods, the second timing process is called to use peak performance.
It realizes dynamic adjustment of SSD performance in different read and write request scenarios to balance power consumption and performance and improve the competitiveness of SSD controllers.
Smart Images

Figure CN119576230A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solid state drives, and in particular to a method, device and computer equipment for dynamically balancing power consumption and performance of SSDs. Background Art
[0002] As a new type of storage medium, SSD solid state drive uses NAND particles as data storage. Compared with traditional HDD, its biggest advantage is high read and write performance. As the read and write performance is getting higher and higher, the power consumption is also getting higher and higher. The host is very sensitive to the power consumption and performance of SSD. Therefore, the firmware algorithm must balance the performance and power consumption of SSD as much as possible.
[0003] Generally, SSD controllers do not care about power consumption for the sake of performance, while some SSD controllers limit the peak performance of SSD controllers for the sake of power consumption data. Such an approach cannot take into account both performance and power consumption, and the competitiveness of SSD controllers will be greatly weakened. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method, device and computer equipment for dynamically balancing the power consumption and performance of an SSD, so as to balance the power consumption and performance of the SSD.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: a method for dynamically balancing SSD power consumption and performance, comprising:
[0006] Receive read and write request commands, record the data volume of each read and write request command, and accumulate the data volume of the read and write request commands;
[0007] Compare the data volume of the read / write request command with a preset threshold value to obtain a data volume comparison result;
[0008] If the data volume comparison result is that the data volume of the read / write request command is greater than the preset threshold within the preset time, calling a preset first timing to process the read / write request command, wherein the timing period of the first timing is greater than the timing period of the standard timing;
[0009] If the data volume comparison result is that the data volume of the read / write request command is less than the preset threshold, the preset second timing is called to process the read / write request command, and the timing period of the second timing is equal to the timing period of the standard timing.
[0010] Further, the data volume of the read / write request command is compared with a preset threshold value, and the data volume comparison result obtained includes:
[0011] The data volume of the read and write request commands accumulated within a preset time interval is compared with a preset threshold value to obtain a data volume comparison result within the preset time interval.
[0012] Furthermore, the timing period of the first timing is the timing period of the standard timing plus the first delay time.
[0013] Furthermore, the timing cycle of the standard timing is the processing time of each read / write request command.
[0014] The present invention also provides a device for dynamically balancing SSD power consumption and performance, comprising:
[0015] A data volume statistics module is used to receive read and write request commands, record the data volume of each read and write request command, and accumulate the data volume of the read and write request commands;
[0016] A data volume comparison module is used to compare the data volume of the read / write request command with a preset threshold value to obtain a data volume comparison result;
[0017] A first read / write calling module, configured to call a preset first timing sequence to process the read / write request command if the data volume comparison result shows that the data volume of the read / write request command is greater than a preset threshold within a preset time, wherein the timing period of the first timing sequence is greater than the timing period of the standard timing sequence;
[0018] The second read / write calling module is used to call a preset second timing to process the read / write request command if the data volume comparison result shows that the data volume of the read / write request command is less than a preset threshold, and the timing period of the second timing is equal to the timing period of the standard timing.
[0019] Furthermore, the data volume comparison module is specifically used for:
[0020] The data volume of the read and write request commands accumulated within a preset time interval is compared with a preset threshold value to obtain a data volume comparison result within the preset time interval.
[0021] Furthermore, the timing period of the first timing is the timing period of the standard timing plus the first delay time.
[0022] Furthermore, the timing cycle of the standard timing is the processing time of each read / write request command.
[0023] The present invention also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor implements the above-mentioned SSD power consumption and performance dynamic balancing method when executing the computer program.
[0024] The present invention further provides a storage medium storing a computer program, which can implement the above-mentioned method for dynamically balancing SSD power consumption and performance when executed by a processor.
[0025] The beneficial effects of the present invention are: by identifying scenarios, the read and write performance of the SSD is dynamically adjusted to balance power consumption. For scenarios with a large number of read and write requests, a slow timing is set to limit the performance of the SSD controller to reduce power consumption; for scenarios with a small number of read and write requests, a fast timing is set, that is, peak performance is used, to achieve a balance between performance and power consumption, thereby improving the competitiveness of the SSD controller. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The specific structure of the present invention is described in detail below in conjunction with the accompanying drawings.
[0027] Figure 1 A flow chart of a method for dynamically balancing SSD power consumption and performance according to an embodiment of the present invention;
[0028] Figure 2 A block diagram of a device for dynamically balancing SSD power consumption and performance according to an embodiment of the present invention;
[0029] Figure 3 A schematic block diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0032] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0033] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0034] The first embodiment of the present invention is: a method for dynamically balancing SSD power consumption and performance, comprising the following steps:
[0035] S10, receiving a read / write request command, recording the data volume of each read / write request command, and accumulating the data volume of the read / write request commands.
[0036] In this embodiment, the SSD records each read and write request command in chronological order, and accumulates the data volume of the newly received read and write request commands in sequence.
[0037] S20: Compare the data volume of the read / write request command with a preset threshold value to obtain a data volume comparison result.
[0038] In a specific embodiment, step S20 specifically includes: comparing the data volume of the read and write request commands accumulated within a preset time interval with a preset threshold value to obtain a data volume comparison result within the preset time interval.
[0039] In this embodiment, it is possible to determine whether the data volume of the read / write request command received within 1 second is greater than 96KB at a time interval of one second. If it is greater than 96KB, a data volume comparison result indicating a large data volume is obtained.
[0040] S30. If the data volume comparison result is that the data volume of the read / write request command is greater than a preset threshold within a preset time, a preset first timing is called to process the read / write request command, wherein the timing period of the first timing is greater than the timing period of the standard timing.
[0041] The timing period of the first timing is the timing period of the standard timing plus the first delay time, and the timing period of the standard timing is the processing time of each read / write request command.
[0042] In this embodiment, if the data volume of the received read / write request command is too large, the read / write timing is set to the first timing, the read / write is delayed, and the performance of the controller is limited to reduce power consumption. For example: after processing a read / write request command, a delay of 4 microseconds is performed before processing the next read / write command request.
[0043] S40. If the data volume comparison result is that the data volume of the read / write request command is less than the preset threshold, call a preset second timing sequence to process the read / write request command, wherein the timing period of the second timing sequence is equal to the timing period of the standard timing sequence.
[0044] In this embodiment, if the data volume of the received read / write request command is too small, the read / write timing is set to the second timing, and the read / write timing is not delayed. The peak performance of the SSD controller is used. For example, after processing one read / write request command, the next read / write command request is processed immediately.
[0045] The beneficial effects of this embodiment are: by identifying the scenario, the read and write performance of the SSD is dynamically adjusted to balance the power consumption. For scenarios with a large number of read and write requests, a slow timing is set to limit the performance of the SSD controller to reduce power consumption; for scenarios with a small number of read and write requests, a fast timing is set, that is, peak performance is used, to achieve a balance between performance and power consumption, thereby improving the competitiveness of the SSD controller.
[0046] like Figure 2 As shown, an embodiment of the present invention further provides a device for dynamically balancing SSD power consumption and performance, including:
[0047] The data volume statistics module 10 is used to receive read / write request commands, record the data volume of each read / write request command, and accumulate the data volume of the read / write request commands.
[0048] The data volume comparison module 20 is used to compare the data volume of the read / write request command with a preset threshold value to obtain a data volume comparison result.
[0049] The data volume comparison module 20 is specifically used to compare the data volume of the read and write request commands accumulated within a preset time interval with a preset threshold value to obtain a data volume comparison result within the preset time interval.
[0050] The first read / write calling module 30 is used to call a preset first timing to process the read / write request command if the data volume comparison result is that the data volume of the read / write request command is greater than a preset threshold within a preset time, and the timing period of the first timing is greater than the timing period of the standard timing.
[0051] The timing period of the first timing is the timing period of the standard timing plus the first delay time, and the timing period of the standard timing is the processing time of each read / write request command.
[0052] The second read / write calling module 40 is used to call a preset second timing to process the read / write request command if the data amount comparison result shows that the data amount of the read / write request command is less than a preset threshold, and the timing period of the second timing is equal to the timing period of the standard timing.
[0053] It should be noted that technicians in the relevant field can clearly understand that the specific implementation process of the above-mentioned SSD power consumption and performance dynamic balancing device can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0054] The above-mentioned SSD power consumption and performance dynamic balancing device can be implemented in the form of a computer program. The computer program can be used in Figure 3 Runs on the computer device shown.
[0055] See also Figure 3 , Figure 3 5 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a terminal or a server, wherein the terminal may be an electronic device with communication functions such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of multiple servers.
[0056] See also Figure 3 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .
[0057] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a method for dynamically balancing SSD power consumption and performance.
[0058] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0059] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for dynamically balancing SSD power consumption and performance.
[0060] The network interface 505 is used to communicate with other devices over the network. Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0061] The processor 502 is used to run a computer program 5032 stored in the memory to implement the SSD power consumption and performance dynamic balancing method as described above.
[0062] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0063] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0064] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the SSD power consumption and performance dynamic balancing method as described above.
[0065] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0066] Those of ordinary skill in the art will 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 composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0067] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0068] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0069] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0070] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for dynamically balancing SSD power consumption and performance, characterized in that: include: Receive read and write request commands, record the data volume of each read and write request command, and accumulate the data volume of the read and write request commands; Compare the data volume of the read / write request command with a preset threshold value to obtain a data volume comparison result; If the data volume comparison result is that the data volume of the read / write request command is greater than the preset threshold within the preset time, calling a preset first timing to process the read / write request command, wherein the timing period of the first timing is greater than the timing period of the standard timing; If the data volume comparison result is that the data volume of the read / write request command is less than the preset threshold, the preset second timing is called to process the read / write request command, and the timing period of the second timing is equal to the timing period of the standard timing.
2. The method for dynamically balancing SSD power consumption and performance according to claim 1, wherein: Comparing the data volume of the read / write request command with a preset threshold, the data volume comparison result includes: The data volume of the read and write request commands accumulated within a preset time interval is compared with a preset threshold value to obtain a data volume comparison result within the preset time interval.
3. The method for dynamically balancing SSD power consumption and performance according to claim 1, wherein: The timing period of the first timing sequence is the timing period of the standard timing sequence plus the first delay time.
4. The method for dynamically balancing SSD power consumption and performance as claimed in claim 3, characterized in that: The timing cycle of the standard timing is the processing time of each read / write request command.
5. A device for dynamically balancing SSD power consumption and performance, characterized in that: include: A data volume statistics module is used to receive read and write request commands, record the data volume of each read and write request command, and accumulate the data volume of the read and write request commands; A data volume comparison module is used to compare the data volume of the read / write request command with a preset threshold value to obtain a data volume comparison result; A first read / write calling module, configured to call a preset first timing sequence to process the read / write request command if the data volume comparison result shows that the data volume of the read / write request command is greater than a preset threshold within a preset time, wherein the timing cycle of the first timing sequence is greater than the timing cycle of the standard timing sequence; The second read / write calling module is used to call a preset second timing to process the read / write request command if the data volume comparison result is that the data volume of the read / write request command is less than a preset threshold, and the timing period of the second timing is equal to the timing period of the standard timing.
6. The SSD power consumption and performance dynamic balancing device according to claim 5, characterized in that: The data volume comparison module is specifically used for: The data volume of the read and write request commands accumulated within a preset time interval is compared with a preset threshold value to obtain a data volume comparison result within the preset time interval.
7. The SSD power consumption and performance dynamic balancing device according to claim 5, characterized in that: The timing period of the first timing sequence is the timing period of the standard timing sequence plus the first delay time.
8. The SSD power consumption and performance dynamic balancing device according to claim 7, characterized in that: The timing cycle of the standard timing is the processing time of each read / write request command.
9. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the SSD power consumption and performance dynamic balancing method according to any one of claims 1 to 4 when executing the computer program.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method for dynamically balancing power consumption and performance of an SSD according to any one of claims 1 to 4 can be implemented.