Power consumption management method, related device and medium

By predicting the next period state of the solid-state driver and dynamically adjusting the link power state, the balance problem of SSD between improving response speed and reducing power consumption is solved, and the stability and robustness are improved.

CN119718049APending Publication Date: 2025-03-28MAXIO TECHNOLOGY (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411744971.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

How to improve the response speed of solid-state drive (SSD) read and write commands while reducing its power consumption and solve the problem of increasing power consumption of SSD in complex scenarios.

Method used

By predicting the state of the solid-state driver in the next period, the link power state switching is controlled according to the read and write rate and performance threshold to improve the matching degree of read and write traffic and link power state, and to adapt to different performance requirements while reducing power consumption.

Benefits of technology

It improves the stability and robustness of solid-state drivers, achieves low-power operation under different performance requirements, and enhances the adaptability of SSDs in complex and diverse scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718049A_ABST
    Figure CN119718049A_ABST
Patent Text Reader

Abstract

The invention provides a power consumption management method, a related device and a medium. The method comprises the steps that the state of the solid-state drive in the next time period is predicted according to the data read-write rate and a plurality of performance threshold values of the solid-state drive in the previous time period, and the performance threshold values comprise at least one rate threshold value and at least one data size distribution proportion threshold value which are determined according to the compatibility of multiple platform behaviors; and according to the predicted state of the solid-state drive in the next time period, controlling the solid-state drive to be switched to the link power supply state matched with the state of the next time period, thereby adapting to complex and diversified application scenes, improving the matching degree of the read-write flow of the solid-state drive in the next time period and the link power supply state, and improving the user experience. The power consumption can be reduced while different performance requirements are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of memory technology, and in particular relates to a power consumption management method, a related device and a medium. Background Art

[0002] Solid State Drive (SSD) is the main storage device for mobile devices. Its power consumption directly affects the user experience of mobile devices. Improving the read and write command response speed of SSD often requires increasing the voltage and chip operating frequency, which will increase the power consumption of SSD. Therefore, how to find a balance between improving the read and write command response speed and reducing power consumption has become a technical challenge for SSD. Summary of the invention

[0003] In view of the above problems, the present disclosure provides a power consumption management method, related devices and media, aiming to improve the matching degree between the read and write traffic of the SSD in the next period and the link power state, adapt to different performance requirements and reduce power consumption.

[0004] According to a first aspect of the present disclosure, there is provided a power consumption management method for a solid state drive, comprising:

[0005] Predicting a state of the solid-state drive in a next period of time according to a data read and write rate of the solid-state drive in a previous period of time and a plurality of performance thresholds, wherein the plurality of performance thresholds include at least one rate threshold and at least one data volume distribution ratio threshold determined according to compatibility with multiple platform behaviors;

[0006] According to the predicted state of the solid-state drive in the next period, the solid-state drive is controlled to switch to a link power state matching the state of the next period.

[0007] Optionally, the previous period includes a plurality of sub-periods, and predicting the state of the solid-state drive in the next period according to the read and write rate of the solid-state drive in the previous period and a plurality of performance thresholds includes:

[0008] comparing the data reading and writing rate of the solid-state drive in the previous period with a first rate threshold;

[0009] Determine whether the data read and write rates in the multiple sub-periods meet a data volume distribution condition, wherein the data volume distribution condition includes that the proportion of sub-periods in which the data read and write rates in the multiple sub-periods are less than or greater than a certain rate threshold is less than, equal to or greater than a certain data volume distribution ratio threshold;

[0010] According to the comparison result and the judgment result, the state of the solid state drive in the next period is predicted.

[0011] Optionally, predicting the state of the solid-state drive in the next period of time according to the comparison result and the judgment result includes:

[0012] When the data read / write rate of the previous time period is greater than the first rate threshold, and the proportion of sub-time periods in which the corresponding data read / write rate is less than the second rate threshold in the multiple sub-time periods is less than or equal to the first data volume distribution ratio threshold, predicting that the next time period is the first state scenario;

[0013] When the data read / write rate of the previous time period is greater than the first rate threshold, and the proportion of sub-time periods in which the corresponding data read / write rates are less than the second rate threshold in the multiple sub-time periods is greater than the first data volume distribution ratio threshold, predicting that the next time period is the second state scenario;

[0014] In the case where the data read / write rate in the previous time period is less than or equal to the first rate threshold, and the proportion of the sub-time periods in which the corresponding data read / write rate is less than the third rate threshold in the multiple sub-time periods is less than or equal to the second data volume distribution ratio threshold, or the proportion of the sub-time periods in which the corresponding data read / write rate is greater than the fourth rate threshold in the multiple sub-time periods is greater than the third data volume distribution ratio threshold, it is predicted that the next time period is the third state scenario;

[0015] In the case where the data read / write rate in the previous time period is less than or equal to the first rate threshold, and the proportion of the sub-periods in which the corresponding data read / write rate is less than the third rate threshold in the multiple sub-periods is greater than the second data volume distribution ratio threshold, and the proportion of the sub-periods in which the corresponding data read / write rate is greater than the fourth rate threshold in the multiple sub-periods is less than or equal to the third data volume distribution ratio threshold, and the proportion of the sub-periods in which the corresponding data read / write rate is greater than the fourth rate threshold in the multiple sub-periods is less than or equal to the fourth data volume distribution ratio threshold, it is predicted that the next time period is the fourth state scenario;

[0016] Among them, the second rate threshold is smaller than the first rate threshold, the third rate threshold is smaller than the first rate threshold, the fourth rate threshold is larger than the first rate threshold, the second data volume distribution ratio threshold is larger than the third data volume distribution ratio threshold, and the fourth data volume distribution ratio threshold is smaller than the third data volume distribution ratio threshold.

[0017] Optionally, controlling the solid-state drive to switch to a link power state matching the state of the next time period according to the predicted state of the solid-state drive in the next time period comprises:

[0018] If the first state scenario is a performance test scenario, the link power state of the next period is set to the first link power state and the link power state cannot be switched, so as to quickly respond to read and write commands;

[0019] If the second state scenario is a mixed test scenario, the link power state of the next period is set to the first link power state and the link idle time is monitored;

[0020] If the third state scenario is a mixed test scenario, the link power state of the next period is set to the first link power state and the link idle time is monitored;

[0021] The fourth state scenario is an idle test scenario, and the link power state of the next period is immediately set to the second link power state when the link is idle;

[0022] The power consumption of the first link power state is greater than the power consumption of the second link power state.

[0023] Optionally, if the second state scenario is a mixed test scenario, setting the link power state of the next period to the first link power state and monitoring the link idle time includes:

[0024] When the link idle time is greater than the first duration, switching the link power state of the next time period from the first link power state to the second link power state;

[0025] If the third state scenario is a mixed test scenario, setting the link power state of the next period to the first link power state and monitoring the link idle time includes:

[0026] When the link idle time is greater than the second duration, switching the link power state of the next time period from the first link power state to the second link power state;

[0027] The first duration is greater than the second duration.

[0028] Optionally, the several performance thresholds are updated according to the newly added platform behavior.

[0029] According to a second aspect of the present disclosure, there is provided a power consumption management device for a solid state drive, comprising:

[0030] a working state prediction unit, configured to predict a state of the solid-state drive in a next period of time according to a data read and write rate of the solid-state drive in a previous period of time and a plurality of performance thresholds, wherein the plurality of performance thresholds include at least one rate threshold and at least one data volume distribution ratio threshold determined according to compatible behaviors of multiple platforms;

[0031] The link power state control unit is used to control the solid-state drive to switch to a link power state matching the state of the next period according to the predicted state of the solid-state drive in the next period.

[0032] According to a third aspect of the present disclosure, there is provided a solid state drive, comprising:

[0033] Storage medium module;

[0034] A controller comprising the power consumption management device as described above, wherein the power consumption management device is used to execute the above method to control the solid-state drive to switch to a link power state matching the state of the next time period according to the predicted state of the solid-state drive in the next time period.

[0035] According to a fourth aspect of the present disclosure, there is provided a computer system, comprising:

[0036] Computer equipment;

[0037] The solid-state drive as described above includes a host interface in accordance with the PCIe standard. The computer device and the solid-state drive are connected via a transmission path called a link, and data packets in accordance with the PCIe standard are used to transmit data on the link.

[0038] According to a fifth aspect of the present disclosure, a storage medium is provided, on which a computer program or instruction is stored, and when the computer program or instruction is executed by a processor, the steps of any of the methods described above are implemented.

[0039] The present disclosure brings the following beneficial effects:

[0040] The power consumption management method provided by the present disclosure comprises several performance thresholds including at least one rate threshold and at least one data volume distribution ratio threshold determined based on the compatibility with multiple platform behaviors. The data read and write rate of the previous period can accurately characterize the read and write data volume of the solid-state drive in the previous period. The several performance thresholds are statistical results of practical applications and general software tests in the storage industry, which can be compatible with the behaviors of most platforms and adapt to complex and diverse workloads and application scenarios. The data read and write rate of the previous period and several performance thresholds are used to analyze the distribution of the read and write data volume of the previous period, so as to accurately predict the state of the solid-state drive in the next period, and then control the solid-state drive to switch to a link power state matching the state of the next period according to the predicted state of the solid-state drive in the next period, thereby improving the matching degree between the state of the solid-state drive in the next period and the link power state, improving the matching degree between the read and write traffic of the solid-state drive in the next period and the link power state, being able to adapt to different performance requirements while reducing power consumption, thereby improving the stability and robustness of the solid-state drive.

[0041] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure are realized and obtained by the structures particularly pointed out in the description and the drawings.

[0042] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0044] Figure 1 A schematic diagram showing the structure of a computer system provided according to an embodiment of the present disclosure is shown;

[0045] Figure 2 A schematic diagram showing a flow chart of a power consumption management method for a solid-state drive provided according to an embodiment of the present disclosure;

[0046] Figure 3 A schematic diagram showing a flow chart of a power consumption management method for a solid-state drive provided according to an embodiment of the present disclosure;

[0047] Figure 4 A schematic diagram showing a power consumption management device for a solid-state drive provided according to an embodiment of the present disclosure;

[0048] Figure 5 A schematic structural diagram of an electronic device provided according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0049] Various embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. In each of the accompanying drawings, the same elements are represented by the same or similar reference numerals. For the sake of clarity, the various parts in the accompanying drawings are not drawn to scale.

[0050] The following terms are used in this article:

[0051] A solid-state drive is a storage device that is mainly composed of a controller and a storage medium module (e.g., NAND flash memory chip). The controller is responsible for managing and controlling the operation of the storage medium module, including reading, programming, and erasing data.

[0052] PCIe (Peripheral Component Interconnect Express) is one of the interface standards for connecting a host to a memory system (e.g., a solid-state drive). Through an interface based on the PCIe standard, the host and the memory system are connected via a transmission path called a link. On the link, data packets are used to transmit data. The data transmitted using data packets include, for example, requests from the host to the memory system, responses from the memory system to the host, or user data. In the PCIe standard, it is specified that the link can be set to a low power consumption state even if the device is in an operating state. This function is called Active State Power Management (ASPM). When no data packets are transmitted via the link during a specific period, the device uses the ASPM function to change the link from the normal operating state to the low power consumption state. In the PCIe standard, the normal operating state is, for example, specified as the link power state L0. The low power consumption state is, for example, specified as the link power state L1. In the link power state L0, the SSD can send and receive commands and data, can respond quickly to read and write commands, and has high power consumption. In link power state L1, the SSD power consumption is low (lower than link power state L0), but it cannot send or receive commands and data. It needs to exit link power state L1 and return to link power state L0 before it can respond to read and write commands.

[0053] At present, methods for balancing the response speed and power consumption of SSD read and write commands include: first, through hardware implementation, that is, when the CPU in the SSD detects that each module in the SSD is in an idle state, it reduces its operating frequency to reduce power consumption, and when it detects that the module in the SSD is in a working state, it increases its operating frequency to quickly respond to read and write commands; second, through the host to control the SSD working mode, that is, when the host does not need to process read and write commands, it will issue a command to enter a low power state (for example, link power state L1), and the SSD will immediately enter the corresponding low power state after receiving the command, and when the host needs to process the command, it will issue a command to exit the low power state, and the SSD will immediately exit the low power state to the normal action state (for example, link power state L0) after receiving the command to execute the read and write commands.

[0054] However, these technologies all have certain limitations. For example, although the hardware implementation method has a fast processing speed, in complex scenarios, such as mixed read and write plus idle situations, this local optimization measure may lead to redundant hardware operations, thereby causing the power consumption of the SSD to increase. Although the host control SSD working mode method can control power consumption according to the device load, the host behavior may be different on different systems and platforms, which may cause the SSD's read and write command response speed and power consumption to fail to execute as expected, resulting in reduced stability and robustness of the host and SSD.

[0055] Based on this, the present disclosure provides a power consumption management method, related devices and media to adapt to complex and diverse application scenarios, improve the matching degree between the read and write traffic of the SSD in the next period and the link power status, adapt to different performance requirements while reducing power consumption.

[0056] Figure 1 FIG. 1 is a schematic diagram showing a structure of a computer system provided according to an embodiment of the present disclosure. Figure 1 As shown, the computer system 100 provided by the embodiment of the present disclosure includes: a computer device 110 and a solid-state drive 120, wherein the solid-state drive 120 can be understood as an external memory of the computer device 110. The computer device 110 includes a host 111. The solid-state drive 120 may include a controller 121 and a storage medium module 122. The controller 121 includes firmware (FirmWare, referred to as FW) 124 and a host interface 123. In one example, the host interface 123 is an interface based on the PCIe standard, and the computer device 110 and the solid-state drive 120 are connected via a transmission path called a link. On the link, data packets based on the PCIe standard are used to transmit data. The storage medium module 122 may include multiple NAND flash memory chips (Die), for example, Die0 to DieR, R is a positive integer. Each flash memory chip may include multiple planes (Plane), for example, Plane0 to PlaneL, L is a positive integer. Each plane in each flash memory chip can operate concurrently. Each plane may include multiple blocks (Block), such as Figure 1 Block0 to BlockM are shown, where M is a positive integer. Blocks with the same block number in each plane of each flash memory chip form a super block (SPB for short). For example, SPB0 includes Block0 in Plane0 to PlaneL in Die0 to DieR. Each block may include multiple pages (Page) (not shown). Each page may include multiple data storage fragments (Frag) (not shown). Each data storage fragment can store a predetermined amount of data (e.g., 4 KB).

[0057] In some embodiments, an operating system may be run on the computer device 110, and the operating system may be understood as a host 111 of the solid-state drive 120. The host 111 may send instructions (including read / write commands and Trim commands) to the firmware 124. When the host 111 sends a write command to the firmware 124, data may be written to the storage medium module 122 through the host interface 123 according to the write command. When the host 111 sends a read command to the firmware 124, data may be read from the storage medium module 122 through the host interface 123 according to the read command. In some embodiments, the firmware 124 may execute the power consumption management method of the embodiment of the present disclosure to control the solid-state drive to switch to a link power state that matches the state of the next time period according to the predicted state of the solid-state drive in the next time period.

[0058] Since the process of dynamically controlling the link power state of the SSD using the power consumption management method of the embodiment of the present disclosure will be described in detail in the method embodiment below, it will not be repeated here.

[0059] It should be noted that, for the convenience of description, Figure 1 In the example, the component of the computer device 110 does not include the solid state drive 120. Alternatively, the solid state drive 120 may also be a part of the computer device 110.

[0060] Figure 2 A schematic diagram of a power consumption management method for a solid-state drive according to an embodiment of the present disclosure is shown. The power consumption management method of the embodiment of the present disclosure may be performed by Figure 1 The controller 121 in the embodiment is executed. Figure 2 As shown, the power consumption management method of the embodiment of the present disclosure may include:

[0061] In step S210, the state of the solid-state drive in the next time period is predicted based on the data read and write rate of the solid-state drive in the previous time period and several performance thresholds, and the several performance thresholds include at least one rate threshold and at least one data volume distribution ratio threshold determined based on compatibility with multiple platform behaviors.

[0062] In some embodiments, the data read and write rate of the solid-state drive 120 in the previous period (for example, the previous 15 seconds) is counted every predetermined time period (for example, 15 seconds). The data read and write rate of the previous period can accurately characterize the amount of data read and written by the solid-state drive 120 in the previous period. In some embodiments, several performance thresholds include at least one rate threshold and at least one data volume distribution ratio threshold determined based on compatibility with multiple platform behaviors. Several performance thresholds are statistical results of actual applications and general software tests in the storage industry. The amount of read and write data during the test period is counted, and certain compatibility modifications (for example, ±15% margin) are made to ensure compatibility with the behavior of most platforms and adapt to complex and diverse workloads and application scenarios. In some embodiments, the several performance thresholds can be updated according to the newly added platform behavior. According to the updated several performance thresholds and the data read and write rate of the previous period, the distribution of the amount of read and write data in the previous period can be analyzed, which can improve the prediction accuracy of the state of the solid-state drive in the next period under complex and diverse workloads and application scenarios, and improve the platform compatibility of the power consumption management method of the embodiment of the present disclosure.

[0063] In some embodiments, in order to predict the state of the solid-state drive 120 in the next time period, the data read and write rate of the solid-state drive 120 in the previous time period may be compared with a first rate threshold (e.g., 4 MB / s). In some embodiments, multiple sub-periods are selected in chronological order in the previous time period, and the data read and write rates of the solid-state drive 120 in the multiple sub-periods may be counted. For example, 100 100 ms are selected in chronological order in the last 15 s, and the data read and write rates of the solid-state drive 120 in the 100 100 ms are counted respectively. It is determined whether the data read and write rates in the multiple sub-periods meet the data volume distribution conditions. It should be noted that the data volume distribution conditions include that the proportion of sub-periods in which the data read and write rates in the multiple sub-periods are less than or greater than a certain rate threshold is less than, equal to, or greater than a certain data volume distribution ratio threshold.

[0064] In some embodiments, the state of the solid-state drive 120 in the next time period is predicted based on the comparison result and the judgment result. In some embodiments, when the data read / write rate of the previous time period is greater than the first rate threshold (e.g., 4 MB / s), and the proportion A of the sub-periods in which the corresponding data read / write rate is less than the second rate threshold (e.g., 1 MB / s) in the multiple sub-periods is less than or equal to the first data volume distribution ratio threshold (e.g., 90%), it is predicted that the next time period (e.g., the current 15 s) is the first state scenario. In some embodiments, when the data read / write rate of the previous time period is greater than the first rate threshold, and the proportion A of the sub-periods in which the corresponding data read / write rate is less than the second rate threshold in the multiple sub-periods is greater than the first data volume distribution ratio threshold, it is predicted that the next time period is the second state scenario. In some embodiments, when the data read / write rate of the previous period is less than or equal to the first rate threshold, and the proportion B of the sub-periods in which the corresponding data read / write rate is less than the third rate threshold (for example, 2 MB / s) in the multiple sub-periods is less than or equal to the second data volume distribution ratio threshold (for example, 85%), or the proportion C of the sub-periods in which the corresponding data read / write rate is greater than the fourth rate threshold (for example, 10 MB / s) in the multiple sub-periods is greater than the third data volume distribution ratio threshold (for example, 20%), it is predicted that the next period is the third state scenario. In some embodiments, when the data read / write rate of the previous period is less than or equal to the first rate threshold, and the proportion B of the sub-periods in which the corresponding data read / write rate is less than the third rate threshold in the multiple sub-periods is greater than the second data volume distribution ratio threshold, and the proportion C of the sub-periods in which the corresponding data read / write rate is greater than the fourth rate threshold in the multiple sub-periods is less than or equal to the third data volume distribution ratio threshold, and the proportion C of the sub-periods in which the corresponding data read / write rate is greater than the fourth rate threshold in the multiple sub-periods is less than or equal to the fourth data volume distribution ratio threshold (for example, 7%), it is predicted that the next period is the fourth state scenario. It should be noted that the second rate threshold is smaller than the first rate threshold, the third rate threshold is smaller than the first rate threshold, the fourth rate threshold is greater than the first rate threshold, the second data volume distribution ratio threshold is greater than the third data volume distribution ratio threshold, and the fourth data volume distribution ratio threshold is smaller than the third data volume distribution ratio threshold.

[0065] In step S220, according to the predicted state of the solid state drive in the next period, the solid state drive is controlled to switch to a link power state matching the state of the next period.

[0066] In some embodiments, the first state scenario is a performance test scenario, and there is a large amount of read and write data. The link power state of the next time period can be set to link power state L0 and the link power state cannot be switched to quickly respond to read and write commands and optimize the time taken to exit the link power state from link power state L1 to link power state L0.

[0067] In some embodiments, the second state scenario is a mixed test scenario, and the read / write performance test time occupies most of the next period of time. The link power state of the next period of time can be set to link power state L0 and the link idle time can be monitored. In some embodiments, when the link idle time is greater than the first duration (for example, 25 ms), the link power state of the next period of time is switched from link power state L0 to link power state L1. The first duration can be reasonably set to reduce the duration of the solid-state drive 120 entering link power state L1 as much as possible.

[0068] In some embodiments, the third state scenario is a mixed test scenario, the read / write performance test time occupies a small part of the next period, there are read / write commands but the amount of read / write data is not large, the link power state of the next period is set to link power state L0 and the link idle time is monitored. In some embodiments, when the link idle time is greater than the second duration (e.g., 10 ms), the link power state of the next period is switched from link power state L0 to link power state L1, and the duration of the solid-state drive 120 entering link power state L1 can be increased as much as possible by reasonably setting the second duration. In some embodiments, the first duration is greater than the second duration. It should be noted that in the second state scenario, the read / write performance test time occupies most of the next period, while in the third state scenario, the read / write performance test time occupies a small part of the next period, the read / write traffic in the second state scenario is large, and the read / write traffic in the third state scenario is small. Although the link power state of the next period is set to link power state L0 and the link idle time is monitored in both the second state scenario and the third state scenario, the link power state L1 is entered faster in the third state scenario than in the second state scenario.

[0069] In some embodiments, the fourth state scenario is an idle test scenario, and power consumption needs to be minimized. When the link is idle, the link power state of the next period can be immediately set to the link power state L1 to quickly reduce power consumption.

[0070] In some embodiments, step S210 and step S220 are executed again to predict the state of the solid state drive in the next period of the next period, and the solid state drive 120 is controlled to switch to a link power state matching the state of the next period.

[0071] Figure 3 A schematic diagram of a power consumption management method for a solid-state drive according to an embodiment of the present disclosure is shown. The power consumption management method of the embodiment of the present disclosure may be performed by Figure 1 The controller 121 in the embodiment is executed. Figure 3 As shown, the power consumption management method of the embodiment of the present disclosure may include:

[0072] In step S301 , the data read and write rate of the solid state drive 120 in the previous period is counted.

[0073] In step S302 , a plurality of sub-periods are selected in chronological order in the previous period, and data read and write rates of the solid state drive 120 in the plurality of sub-periods are counted.

[0074] In step S303 , it is determined whether the data read and write rate of the solid state drive 120 in the previous period is greater than a first rate threshold (eg, 4 MB / s). If yes, step S304 is executed; if no, step S305 is executed.

[0075] In step S304, determine whether the proportion A of sub-periods in which the corresponding data read and write rates are less than the second rate threshold (for example, 1 MB / s) in multiple sub-periods of the previous time period is less than or equal to the first data volume distribution ratio threshold T1 (for example, 90%). If so, execute step S306; if not, execute step S307.

[0076] In step S306, the next time period is predicted to be a first state scenario, which is a performance test scenario with a large amount of read and write data. The link power state of the next time period is set to link power state L0 and the link power state cannot be switched to quickly respond to read and write commands.

[0077] In step S307, the next period is predicted to be the second state scenario, the second state scenario is a mixed test scenario, the read / write performance test time occupies most of the next period, the link power state of the next period is set to link power state L0 and the link idle time is monitored. In some embodiments, when the link idle time is greater than a first duration (e.g., 25 ms), the link power state of the next period is switched from link power state L0 to link power state L1, and the duration of the solid-state drive 120 entering link power state L1 can be reduced as much as possible by reasonably setting the first duration.

[0078] In step S305, determine whether the proportion B of the sub-periods in the multiple sub-periods of the previous time period whose corresponding data read and write rates are less than the third rate threshold (for example, 2 MB / s) is less than or equal to the second data volume distribution ratio threshold T2 (for example, 85%), or whether the proportion C of the sub-periods in the multiple sub-periods whose corresponding data read and write rates are greater than the fourth rate threshold (for example, 10 MB / s) is greater than the third data volume distribution ratio threshold T3 (for example, 20%). If so, execute step S308; if not, execute step S309.

[0079] In step S308, the next period is predicted to be the third state scenario, the third state scenario is a mixed test scenario, the read and write performance test time occupies a small part of the next period, there are read and write commands but the amount of read and write data is not large, the link power state of the next period is set to link power state L0 and the link idle time is monitored. In some embodiments, when the link idle time is greater than the second time length (for example, 10 ms), the link power state of the next period is switched from link power state L0 to link power state L1, and the time length for the solid-state drive 120 to enter link power state L1 can be increased as much as possible by reasonably setting the second time length.

[0080] In step S309, determine whether the proportion C of sub-periods in which the corresponding data read and write rates are greater than the fourth rate threshold (for example, 10 MB / s) in multiple sub-periods of the previous time period is less than or equal to the fourth data volume distribution ratio threshold T4 (for example, 7%). If so, execute step S310.

[0081] In step S310, the next time period is predicted to be the fourth state scenario, which is an idle test scenario and needs to minimize power consumption. When the link is idle, the link power state of the next time period is immediately set to link power state L1 to quickly reduce power consumption.

[0082] Figure 4 A schematic diagram of a power consumption management device for a solid-state drive according to an embodiment of the present disclosure is shown. Figure 1 The solid state drive 120 in FIG. Figure 4 As shown, the power consumption management device 400 includes a working state prediction unit 410 and a link power state control unit 420 .

[0083] The working status prediction unit 410 is used to predict the state of the solid-state drive in the next time period based on the data read and write rate of the solid-state drive in the previous time period and several performance thresholds, wherein the several performance thresholds include at least one rate threshold and at least one data volume distribution ratio threshold determined based on compatibility with multiple platform behaviors.

[0084] The link power state control unit 420 is used to control the solid-state drive to switch to a link power state matching the state of the next period according to the predicted state of the solid-state drive in the next period.

[0085] Since the process of dynamically controlling the link power state of the SSD using the power consumption management method of the embodiment of the present disclosure has been described in detail in the method embodiment above, it will not be repeated here.

[0086] The present disclosure also provides an electronic device, such as Figure 5As shown, it includes a memory 520, a processor 510, and a program stored in the memory 520 and executable on the processor 510. When the program is executed by the processor 510, each process of each embodiment of the above-mentioned power consumption management method can be implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0087] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, the embodiments of the present disclosure also provide a storage medium, on which a computer program or instruction is stored, and when the computer program or instruction is executed by the processor, each process in each embodiment of the above power consumption management method can be implemented.

[0088] Since the instructions stored in the storage medium can execute the steps in the power consumption management method provided in the embodiment of the present disclosure, the beneficial effects that can be achieved by the power consumption management method provided in the embodiment of the present disclosure can be achieved. For details, please refer to the previous embodiment, which will not be repeated here. The specific implementation of each of the above operations can be referred to the previous embodiment, which will not be repeated here.

[0089] In summary, the power consumption management method provided by the present disclosure includes several performance thresholds including at least one rate threshold and at least one data volume distribution ratio threshold determined according to the compatibility with multiple platform behaviors. The data read and write rate of the previous period can accurately characterize the read and write data volume of the solid-state drive in the previous period. The several performance thresholds are statistical results of practical applications and general software tests in the storage industry. For example, the read and write data volume during the test period is statistically analyzed and certain compatibility modifications (for example, ±15% margin) are made to ensure compatibility with the behaviors of most platforms and adapt to complex and diverse workloads and application scenarios. The data read and write rate of the previous period and several performance thresholds are used to analyze the distribution of the read and write data volume in the previous period, so as to accurately predict the state of the solid-state drive in the next period. Then, according to the predicted state of the solid-state drive in the next period, the solid-state drive is controlled to switch to a link power state matching the state of the next period, thereby improving the matching degree between the state of the solid-state drive in the next period and the link power state, and improving the matching degree between the read and write traffic of the solid-state drive in the next period and the link power state. It can adapt to different performance requirements while reducing power consumption, thereby improving the stability and robustness of the solid-state drive.

[0090] Finally, it should be noted that: Obviously, the above embodiments are only examples for clearly illustrating the present disclosure, and are not intended to limit the implementation methods. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from this are still within the scope of protection of the present disclosure.

Claims

1. A method for managing power consumption of a solid state drive, comprising: Predicting a state of the solid-state drive in a next period of time according to a data read and write rate of the solid-state drive in a previous period of time and a plurality of performance thresholds, wherein the plurality of performance thresholds include at least one rate threshold and at least one data volume distribution ratio threshold determined according to compatibility with multiple platform behaviors; According to the predicted state of the solid-state drive in the next period, the solid-state drive is controlled to switch to a link power state matching the state of the next period.

2. The power consumption management method according to claim 1, wherein: The previous period includes a plurality of sub-periods, and the predicting the state of the solid-state drive in the next period according to the read / write rate of the solid-state drive in the previous period and a plurality of performance thresholds includes: comparing the data reading and writing rate of the solid-state drive in the previous period with a first rate threshold; Determine whether the data read and write rates in the multiple sub-periods meet a data volume distribution condition, wherein the data volume distribution condition includes that the proportion of sub-periods in which the data read and write rates in the multiple sub-periods are less than or greater than a certain rate threshold is less than, equal to or greater than a certain data volume distribution ratio threshold; According to the comparison result and the judgment result, the state of the solid state drive in the next period is predicted.

3. The power consumption management method according to claim 2, wherein: The predicting the state of the solid state drive in the next period of time according to the comparison result and the judgment result includes: When the data read / write rate of the previous time period is greater than the first rate threshold, and the proportion of sub-time periods in which the corresponding data read / write rate is less than the second rate threshold in the multiple sub-time periods is less than or equal to the first data volume distribution ratio threshold, predicting that the next time period is the first state scenario; When the data read / write rate of the previous time period is greater than the first rate threshold, and the proportion of sub-time periods in which the corresponding data read / write rates are less than the second rate threshold in the multiple sub-time periods is greater than the first data volume distribution ratio threshold, predicting that the next time period is the second state scenario; In the case where the data read / write rate in the previous time period is less than or equal to the first rate threshold, and the proportion of the sub-time periods in which the corresponding data read / write rate is less than the third rate threshold in the multiple sub-time periods is less than or equal to the second data volume distribution ratio threshold, or the proportion of the sub-time periods in which the corresponding data read / write rate is greater than the fourth rate threshold in the multiple sub-time periods is greater than the third data volume distribution ratio threshold, it is predicted that the next time period is the third state scenario; In the case where the data read / write rate in the previous time period is less than or equal to the first rate threshold, and the proportion of the sub-periods in which the corresponding data read / write rate is less than the third rate threshold in the multiple sub-periods is greater than the second data volume distribution ratio threshold, and the proportion of the sub-periods in which the corresponding data read / write rate is greater than the fourth rate threshold in the multiple sub-periods is less than or equal to the third data volume distribution ratio threshold, and the proportion of the sub-periods in which the corresponding data read / write rate is greater than the fourth rate threshold in the multiple sub-periods is less than or equal to the fourth data volume distribution ratio threshold, it is predicted that the next time period is the fourth state scenario; Among them, the second rate threshold is smaller than the first rate threshold, the third rate threshold is smaller than the first rate threshold, the fourth rate threshold is larger than the first rate threshold, the second data volume distribution ratio threshold is larger than the third data volume distribution ratio threshold, and the fourth data volume distribution ratio threshold is smaller than the third data volume distribution ratio threshold.

4. The power consumption management method according to claim 3, wherein: According to the predicted state of the solid-state drive in the next period, controlling the solid-state drive to switch to a link power state matching the state of the next period includes: If the first state scenario is a performance test scenario, the link power state of the next period is set to the first link power state and the link power state cannot be switched, so as to quickly respond to read and write commands; If the second state scenario is a mixed test scenario, the link power state of the next period is set to the first link power state and the link idle time is monitored; If the third state scenario is a mixed test scenario, the link power state of the next period is set to the first link power state and the link idle time is monitored; The fourth state scenario is an idle test scenario, and the link power state of the next period is immediately set to the second link power state when the link is idle; The power consumption of the first link power state is greater than the power consumption of the second link power state.

5. The power consumption management method according to claim 4, wherein: If the second state scenario is a mixed test scenario, setting the link power state of the next period to the first link power state and monitoring the link idle time includes: When the link idle time is greater than the first duration, switching the link power state of the next time period from the first link power state to the second link power state; If the third state scenario is a mixed test scenario, setting the link power state of the next period to the first link power state and monitoring the link idle time includes: When the link idle time is greater than the second duration, switching the link power state of the next time period from the first link power state to the second link power state; The first duration is greater than the second duration.

6. The power consumption management method according to claim 1, wherein: The several performance thresholds are updated according to the newly added platform behavior.

7. A power consumption management device for a solid state drive, comprising: a working state prediction unit, configured to predict a state of the solid-state drive in a next period of time according to a data read and write rate of the solid-state drive in a previous period of time and a plurality of performance thresholds, wherein the plurality of performance thresholds include at least one rate threshold and at least one data volume distribution ratio threshold determined according to compatible behaviors of multiple platforms; The link power state control unit is used to control the solid-state drive to switch to a link power state matching the state of the next period according to the predicted state of the solid-state drive in the next period.

8. A solid state drive comprising: Storage medium module; A controller, the controller comprising the power consumption management device as claimed in claim 7, the power consumption management device being used to execute the method as claimed in any one of claims 1 to 6 to control the solid-state drive to switch to a link power state matching the state of the next time period according to the predicted state of the solid-state drive in the next time period.

9. A computer system comprising: Computer equipment; The solid-state drive as claimed in claim 8, comprising a host interface in accordance with the PCIe standard, wherein the computer device and the solid-state drive are connected via a transmission path called a link, and data packets in accordance with the PCIe standard are used to transmit data on the link.

10. A storage medium having a computer program or instruction stored thereon, wherein the computer program or instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 6.