Energy-saving method and apparatus

By selecting hibernable disks in the storage pool and sleeping them within a specified time period, the problem that storage pools in the prior art is difficult to achieve hibernation of the entire pool, and the energy saving benefits of the storage pool are improved.

WO2025081882A1PCT designated stage expired Publication Date: 2025-04-24HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/100777
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-10-18
Filing Date
2024-06-21
Publication Date
2025-04-24

AI Technical Summary

Technical Problem

The existing storage pool sleeping method is difficult to achieve the entire pool sleeping, resulting in low energy saving benefits.

Method used

The hibernable disk in the storage pool is determined by the computing device and hibernated it for a specified time period to reduce the expected energy consumption of the storage pool.

Benefits of technology

The energy-saving benefits of storage pool sleeping are improved. By accurately selecting the dormant disk and reasonably arranging the backend task processing time period, the impact of disk wake-up and intermittent task execution on energy-saving benefits is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024100777_24042025_PF_FP_ABST
    Figure CN2024100777_24042025_PF_FP_ABST
Patent Text Reader

Abstract

An energy-saving method and an apparatus, which are applied to the technical field of storage. The method comprises: determining a first disk in a storage pool, wherein the storage pool comprises at least two disks, the at least two disks comprise the first disk, and the expected energy consumption of the storage pool is less than or equal to a first threshold during the sleep of the first disk; and sending a first instruction to the first disk, the first instruction being used for instructing sleep in a first time period. In the embodiments of the present application, the sleep in granularities of disks can increase the energy-saving benefits of the sleep of the storage pool.
Need to check novelty before this filing date? Find Prior Art

Description

Energy-saving method and device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on October 18, 2023, with application number 202311350416.1 and application name “A Energy-Saving Method and Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of storage technology, and in particular to an energy-saving method and device. Background Art

[0004] Storage pool hibernation can reduce the operating power consumption of a storage pool, achieving energy savings. Currently, storage pool hibernation is primarily implemented using a split-pool storage approach. Specifically, some storage pools store hot data, while the remaining storage pools store cold data as much as possible. This increases the probability that the storage pool storing cold data will hibernate, thus achieving energy savings. However, it is difficult to hibernate an entire storage pool, resulting in low energy savings from storage pool hibernation.

[0005] Summary of the Invention

[0006] Embodiments of the present application provide an energy-saving method and apparatus for improving energy-saving benefits of storage pool hibernation.

[0007] In a first aspect, the present application provides an energy-saving method, which can be executed by a computing device, or by a computing device cluster, or by a component (such as a chip, etc.) configured in the computing device, without limitation. Taking a computing device as an example, in this method, the computing device determines a first disk in a storage pool, wherein the storage pool includes at least two disks, the at least two disks include the first disk, and the expected energy consumption of the storage pool when the first disk is dormant is less than or equal to a first threshold; and sends a first instruction to the first disk, wherein the first instruction is used to instruct it to dormant within a first time period.

[0008] In the embodiment of the present application, hibernation is performed at the granularity of the disks in the storage pool, which means that some or all disks in the storage pool can be hibernated. Compared with the solution of hibernating the entire pool, the energy saving benefit of hibernating the storage pool can be improved.

[0009] In one possible implementation, the minimum value of the first threshold is a first energy consumption, which is the minimum expected energy consumption of the storage pool when all or part of the at least two disks except the first disk are in hibernation, so as to obtain the maximum benefit of hibernation of the storage pool.

[0010] In a possible implementation, the expected energy consumption of the storage pool when the first disk is dormant is determined based on energy consumption of the at least two disks, load intensity of the at least two disks, and wear of the at least two disks.

[0011] For example, the expected energy consumption of the storage pool may satisfy the following formula:

[0012] Among them, the E object is the expected energy consumption of the storage pool, I is the number of the at least two disks, k is the load intensity of the i-th disk in the at least two disks, and p i,k is the expected energy consumption of the i-th disk, the s i,k is 1 or 0, α is the performance cost parameter, and T i,k is the response delay of the i-th disk, c is the cost of migrating a data block from the i-th disk, n is the number of data blocks migrated from the i-th disk, β is the wear cost parameter, and A is a i Or (1-a i ) said a i is the degree of wear, and i is a positive integer less than or equal to I.

[0013] By adopting the above implementation, the energy consumption of the disk, the load intensity of the disk, and the wear degree of the disk are considered when calculating the expected energy consumption of the storage pool, which can improve the accuracy of screening the disks to be put into hibernation.

[0014] In one possible implementation, the computing device may further receive a first operation from a user, the first operation being used to instruct execution of a first service based on the storage pool; and send a second instruction to the at least two disks, the second instruction being used to instruct execution of multiple background tasks corresponding to the first service within a second time period, the second time period not overlapping with the first time period. Optionally, the first service may be a backup service.

[0015] When the storage pool executes the first service, it generates at least one foreground task and multiple background tasks. The execution times of these multiple background tasks are inconsistent and sporadic. Because a disk requires a certain delay before it can execute tasks after recovering from a power-saving state, the intermittent execution of these multiple background tasks affects energy savings. By centralizing the processing of these multiple background tasks within the second time period, the impact of intermittent execution on energy savings can be avoided, thereby increasing energy savings.

[0016] In a possible implementation, the start time of the second time period is the completion time of the foreground task of the first business, which can reduce the impact of discrete execution of foreground tasks and background tasks on energy saving benefits and improve energy saving benefits.

[0017] In a possible implementation, the computing device may further migrate the hot data in the first disk to a second disk of the at least two disks before the first time period, where the second disk is in operation during the first time period.

[0018] In one possible implementation, the computing device may also receive a second operation before the first time period, where the second operation is used to write the first data to the storage pool; and in response to the second operation, the first data is written to a third disk in the storage pool, where the third disk is in operation during the first time period.

[0019] The computing device writes the data written near the first time period to the third disk that does not need to sleep. Since the newly written data is more likely to be accessed, the above implementation method reduces the probability of waking up the dormant disk and improves energy saving benefits.

[0020] In one possible implementation, the computing device may also receive a third operation within the first time period, where the third operation is used to write the second data to the storage pool; and in response to the third operation, the second data is written to a fourth disk in the storage pool, where the fourth disk is in operation during the first time period. This avoids the impact on energy saving benefits caused by waking up the first disk when writing data to the first disk during the first time period.

[0021] In a possible implementation, the first disk does not store metadata.

[0022] Exemplarily, the computing device may also determine a fifth disk in the storage pool based on the amount of metadata stored in the storage pool, where the fifth disk is in operation during the first time period; and migrate the metadata in the storage pool to the fifth disk.

[0023] Exemplarily, determining the fifth disk in the storage pool according to the amount of metadata in the storage pool includes one or more of the following:

[0024] When the first value is greater than or equal to the second threshold, determining that the fifth disk includes a sixth disk and M disks, and the M disks are newly added disks for storing the metadata;

[0025] When the first value is greater than a third threshold value and less than a second threshold value, determining that the fifth disk is a sixth disk;

[0026] Alternatively, when the first value is less than or equal to a third threshold, determining that the fifth disk is a disk other than N disks in the plurality of sixth disks, and the N disks are disks no longer used to store the metadata;

[0027] Among them, the sixth disk is the disk originally used to store the metadata, the number of the sixth disk is one or more, the first value is the ratio between the number of data blocks used by the metadata and the number of data blocks allowed to be used by the metadata, and M and N are both positive integers.

[0028] For example, M may satisfy:

[0029] The N may satisfy:

[0030] Among them, G upper_bound is the second threshold, G lower_bound is the third threshold, N used is the number of data blocks used by the metadata, N total N is the number of data blocks allowed for the metadata. each The number of data blocks allocated to each of the at least two disks.

[0031] Since metadata is more likely to be accessed, in the above implementation, the metadata in the storage pool is migrated to a non-sleeping disk for centralized storage, so that the metadata is not stored in the disk that is about to sleep. This can reduce the probability of waking up the first disk in the first time period, thereby improving energy saving benefits.

[0032] In one possible implementation, the computing device may further determine the first time period based on the historical load intensity of the storage pool; or the computing device may further receive a fourth operation from the user, the fourth operation being used to indicate the first time period. Exemplarily, before receiving the fourth operation from the user, the computing device may further send a first prompt message to the user, the first prompt message being used to prompt the user to set a sleep time.

[0033] Through the above implementation, the computing device may determine the first time period according to the historical load intensity of the storage pool, or the first time period may be set by the user, and the implementation is flexible.

[0034] In a possible implementation, the first disk does not store hot data.

[0035] In a second aspect, the present application provides an energy-saving device, which can be used to implement the method described in the first aspect and any possible implementation thereof.

[0036] In a third aspect, the present application provides a computing device, comprising a processor configured to read and execute a computer program or instruction stored in a memory, so that the computing device performs the method described in the first aspect and any possible implementation thereof. Optionally, the computing device may further comprise the memory, wherein the memory stores the computer program or instruction.

[0037] In a fourth aspect, the present application further provides a computing device cluster, comprising at least one computing device, each computing device including a processor, the processor of the at least one computing device being configured to read and execute a computer program or instruction stored in a memory, so that the computing device cluster performs the method described in the first aspect and any possible implementation thereof. Optionally, each computing device may further include the memory, wherein the memory stores the computer program or instruction.

[0038] In a fifth aspect, the present application further provides a chip system, comprising at least one processor configured to execute one or more computer programs or instructions in the memory to implement the method described in the first aspect and any possible implementation thereof. Optionally, the at least one processor is coupled to the memory.

[0039] In a sixth aspect, the present application also provides a computer program product comprising computer-executable instructions for enabling a computing device to execute the method described in the first aspect and any possible implementation thereof.

[0040] In a seventh aspect, the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computing device to execute the method described in the above-mentioned first aspect and any possible implementation thereof.

[0041] The technical effects that can be achieved in any of the second to seventh aspects can refer to the description of the beneficial effects in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] FIG1 is a schematic diagram of a system architecture;

[0043] FIG2 is a schematic diagram of a flow chart of an energy-saving method provided in an embodiment of the present application;

[0044] FIG3 is a schematic diagram of the load intensity of a storage pool provided in an embodiment of the present application;

[0045] FIG4 is a schematic diagram of second prompt information provided in an embodiment of the present application;

[0046] FIG5 is a schematic diagram of the execution time of the first service provided in an embodiment of the present application;

[0047] FIG6 is a schematic diagram of data migration provided in an embodiment of the present application;

[0048] FIG7 is a schematic structural diagram of an energy-saving device provided in an embodiment of the present application;

[0049] FIG8 is a schematic structural diagram of another energy-saving device provided in an embodiment of the present application;

[0050] FIG9 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The embodiments of the present application will be presented around a system including multiple devices, components, modules, etc. It should be understood that the system may include other devices, components, modules, etc. not mentioned, or may only include some of the devices, components, or modules, etc. mentioned in the embodiments.

[0052] In the embodiments of the present application, "multiple" may refer to two or more. In view of this, in the embodiments of the present application, "multiple" may also be understood as "at least two". "At least one" may be understood as one or more, for example, one, two or more. For example, "including at least one" means including one, two or more. For example, including at least one of A, B and C, then included may be A, B, C, A and B, A and C, B and C, or A, B and C. "And / or" describes the association relationship of associated objects. Specifically, there may be three relationships. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / ", unless otherwise specified, generally indicates that the previous and subsequent associated objects are in an "or" relationship.

[0053] In the embodiments of this application, ordinal numbers such as "first" and "second" are generally used to distinguish different objects and are not used to define the order, timing, priority, or importance of multiple objects. For example, the first instruction and the second instruction are used to distinguish different instructions and do not define the priority or importance of the two instructions.

[0054] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0055] FIG1 exemplarily illustrates a schematic diagram of the architecture of a system applicable to embodiments of the present application. The system may be, for example, a storage system, without limitation. The system may include a management device and one or more storage pools, with FIG1 illustrating two or more storage pools as an example.

[0056] The management device, which may also be referred to as a manager, controller, or control device, is used to manage one or more corresponding memories, for example, storage resource management, load balancing management, or sleep management. The functions of the management device can be implemented by a computing device, or by a computing device cluster, or by a component configured in a computing device. The embodiments of the present application do not limit the name of the management device and the implementation form of the management device. For example, the management device can monitor the load intensity of the storage units in the storage pool. The management device can send instructions to the storage pool to put the storage pool into a sleep state, etc.

[0057] A storage pool, which may also be referred to as a memory pool, a storage resource pool, or a resource pool, is used to provide data storage services. A storage pool may include one or more storage units. When a storage pool includes multiple storage units, the multiple storage units may be centrally deployed or distributedly deployed without limitation. For example, the multiple storage units included in the storage pool may be deployed in one storage device or in multiple storage devices. Exemplarily, the storage unit may be a device or device for data storage, such as a disk, a hard disk, an optical disk, a hard disk drive (HDD), a solid state disk (SSD), or a tape. It should be understood that the embodiments of the present application do not limit the storage medium of the storage unit. For the sake of simplicity, the following description will be given using a storage unit as an example. It should be understood that "disk" in the following text may be replaced with "storage unit". Figure 1 shows an example of a storage pool including multiple disks.

[0058] The present invention provides an energy-saving method and apparatus for improving the energy efficiency of a storage pool. The method and apparatus described herein are based on the same technical concept. Since the method and apparatus solve similar problems, their implementations can be referenced in conjunction with each other, and any repetitions will not be repeated. This method can be applied to the system architecture shown in Figure 1, but is not limited thereto.

[0059] Figure 2 exemplarily shows a flow chart of an energy-saving method provided by an embodiment of the present application. The method can be executed by a computing device, or can also be executed by a computing device cluster, or can also be executed by a component configured in a computing device, without limitation. For ease of description, the following text will introduce the computing device as an example of the execution subject. When the method provided by an embodiment of the present application is applied to the system shown in Figure 1, the method can be executed by a management device. That is, the computing device can be the management device in the system shown in Figure 1, or can implement the functions of the management device in the system shown in Figure 1.

[0060] S21: The computing device determines a first disk in the storage pool.

[0061] A storage pool may include one or more disks. For a description of the storage pool, please refer to the preceding content and will not be repeated here. The following description uses the example of a storage pool including at least two disks. In this embodiment of the present application, the at least two disks include a first disk. The first disk may also be referred to as a dormant disk, a sleep disk, or a dormant disk, without limitation. Furthermore, the number of first disks may be one or more, without limitation.

[0062] In an embodiment of the present application, the computing device can determine a dormant disk in a storage pool, that is, determine the first disk. Exemplarily, the computing device can determine the first disk in the storage pool based on the load intensity of the storage pool. For example, the computing device can analyze the load intensity of each disk in the storage pool to determine the load level of the storage pool. The load level of the storage pool can be 0 load, or it can also be a light load, or it can also be a heavy load, etc., without limitation. The load intensity can be parameters such as the number of input and output (IO), and / or access bandwidth, without limitation. For example, if the number of IOs in the storage pool per unit time is large, then the load condition of the storage pool can be a heavy load. For another example, if the access bandwidth of the storage pool per unit time is small, then the load condition of the storage pool can be a light load. The embodiment of the present application does not limit the specific division method of light load and heavy load, and the method of determining the load level of the storage pool.

[0063] For example, if the storage pool has a load level of zero, the computing device may determine that the entire storage pool can be hibernated, that is, all disks in the storage pool are first disks. Alternatively, if the storage pool has a load level of light, the computing device may determine that some disks in the storage pool are hibernated, that is, some disks in the storage pool are first disks. Alternatively, if the storage pool has a load level of heavy, the computing device may determine that the storage pool is not hibernated.

[0064] Optionally, the expected energy consumption of the storage pool when the first disk is dormant is less than or equal to a first threshold. The first threshold may be the current energy consumption of the storage pool, or may be pre-configured, or may be determined based on historical data (such as the historical load intensity of the storage pool, etc.), without pre-restriction. Exemplarily, the computing device may determine a dormant disk in the storage pool based on the expected energy consumption of the storage pool. The dormant disk satisfies: when the dormant disk is dormant, the expected energy consumption of the storage pool is less than or equal to the first threshold.

[0065] In one embodiment, the computing device may determine the expected energy consumption of the storage pool based on the energy consumption of at least two disks included in the storage pool, the load intensity of the at least two disks, and the wear of the at least two disks.

[0066] Disks consume different amounts of energy under different load intensities. Data migration can change the load intensity of individual disks, thereby achieving energy savings for individual disks. For example, a storage pool includes disks 1, 2, 3, 4, 5, and 6. The load intensities of these six disks are 50%, 50%, 50%, 20%, 20%, and 10%, respectively. After data migration, the load intensities of these six disks can be 70%, 70%, 50%, 10%, 0, and 0, respectively. As shown in Figure 3, the load intensities of disks 5 and 6 become 0, meaning that after data migration, disks 5 and 6 are dormant disks. Therefore, in one embodiment, a computing device uses the data migration cost as a reference factor when determining the expected energy consumption of the storage pool. This can improve the accuracy of the expected energy consumption. For example, the computing device can determine the expected energy consumption of the storage pool based on the energy consumption of at least two disks included in the storage pool, the load intensity of at least two disks, the wear of at least two disks, and the data migration cost.

[0067] In one embodiment, the computing device can migrate hot data on a disk that is expected to be dormant to a disk that does not need to be dormant. This can adjust the storage layout of hot data in the storage pool, reduce the probability of the dormant disk being awakened during the dormant time period (such as the first time period), and improve energy saving benefits. For example, before the first time period, the computing device can migrate hot data from the first disk to the second disk in the storage pool, and the second disk is in a running state during the first time period. The number of the second disks can be one or more, without limitation. Among them, the disk that does not need to be dormant can be called a running disk, or a running disk, etc., without limitation.

[0068] In one embodiment, the newly written data has a high probability of being accessed, that is, the newly written data may be hot data. Therefore, the computing device can write the newly written data to the running disk to support the user to access the recently written data. For example, before the first time period, the computing device can receive a first operation, and the first operation is used to write the first data to the storage pool; in response to the first operation, the computing device can write the first data to the third disk in the storage pool, and the third disk is in a running state during the first time period. The first data can come from the user, or from the inside of the computing device, without limitation. The number of third disks can be one or more. This embodiment can support users to access the data recently written to the storage pool during the first time period, which can improve the user experience and reduce the problem that the first disk is awakened during the first time period due to the first data being written to the first disk, which is not conducive to energy saving of the storage pool.

[0069] Hot data may include, but is not limited to, data at the chunk (or block) level, data in a logical unit number (LUN), file system data, or directory-level data, which are frequently accessed. It should be understood that the embodiments of the present application do not limit the specific classification of hot data. Data other than hot data may be referred to as cold data.

[0070] Optionally, when determining the expected energy consumption of the storage pool, the computing device may also use the performance cost of at least two disks and / or the response delay of at least two disks as a reference factor to improve the accuracy of the determined expected energy consumption. For example, the computing device may determine the expected energy consumption of the storage pool based on the energy consumption of at least two disks included in the storage pool, the load intensity of at least two disks, the wear of at least two disks, the data migration cost, and the performance cost of at least two disks. For another example, the computing device may determine the expected energy consumption of the storage pool based on the energy consumption of at least two disks included in the storage pool, the load intensity of at least two disks, the wear of at least two disks, the data migration cost, and the response delay of at least two disks. For another example, the computing device may determine the expected energy consumption of the storage pool based on the energy consumption of at least two disks included in the storage pool, the load intensity of at least two disks, the wear of at least two disks, the data migration cost, the performance cost of at least two disks, and the response delay of at least two disks. It should be understood that the computing device may also consider other reference factors that affect energy consumption when determining the expected energy consumption of the storage pool, such as disk capacity or load size, etc., and the embodiments of the present application do not limit this.

[0071] Exemplarily, the reserved energy consumption of the storage pool may satisfy the following formula (1).

[0072] Among them, E object is the expected energy consumption of the storage pool. I is the number of at least two disks, that is, the number of disks included in the storage pool. k can be the load intensity of the i-th disk in the at least two disks. i,k It can be the expected energy consumption of the i-th disk, where i is a positive integer less than or equal to I. i,k It can be 1 or 0. For example, when k=0, s i,k =0; otherwise, s i,k =1. α is the performance cost parameter. T i,k can be the response delay of the i-th disk. c can be the cost of migrating a data block from the i-th disk. n can be the number of data blocks migrated from the i-th disk. β is the wear cost parameter. A can be a i Or it can also be (1-a i ), a iFor example, in a i When it is less than the fourth threshold, A=a i Otherwise, A=(1-a i ).

[0073] The computing device can traverse the sleep strategies of all disks in the storage pool (i.e., which disks are in sleep mode and which disks are in operation) according to the above formula (1). object ≤E original When the computing device can determine that E object The corresponding sleep strategy can achieve energy saving benefits. original is the first threshold. For example, when E object When the energy consumption of the storage pool is less than the current energy consumption of the storage pool, the computing device can determine that the E object The corresponding sleep strategy can achieve energy-saving benefits.

[0074] For example, assume that the storage pool includes disk 1, disk 2, and disk 3. If disk 1 is set to sleep, disk 2 is set to sleep, and disk 3 has object If the E obtained by setting disk 1 to sleep, disk 2 to run, and disk 3 to run is greater than the first threshold, the computing device can determine that the sleep strategy of disk 1 and disk 2 sleeping and disk 3 running cannot obtain energy saving benefits. object If the value is less than or equal to the first threshold, the computing device may determine that the hibernation policy in which disk 1 is hibernating and disks 2 and 3 are running can achieve energy saving benefits.

[0075] In one embodiment, the minimum value of the first threshold value may be a first energy consumption. The first energy consumption is the minimum expected energy consumption of the storage pool when all or some of the disks in the storage pool, excluding the first disk, are in hibernation. This means that the expected energy consumption of the storage pool is minimized when the first disk is in hibernation. In other words, the computing device can determine the minimum expected energy consumption of the storage pool according to the above formula (1), thereby achieving greater energy savings when hibernating according to the hibernation policy corresponding to the minimum expected energy consumption.

[0076] For example, suppose the storage pool includes disk 1 and disk 2. If disk 1 is set to hibernate and disk 2 is set to hibernate, the E object If the E obtained by setting disk 1 to sleep and disk 2 to run is greater than the first threshold, the computing device can determine that the sleep strategy of disk 1 and disk 2 cannot obtain energy saving benefits. object If the E obtained by setting disk 1 to be in sleep mode and disk 2 to be in sleep mode is less than or equal to the first threshold, the computing device can determine that the sleep strategy of disk 1 being in sleep mode and disk 2 being in operation can obtain energy saving benefits. objectIf the E obtained by setting disk 1 to sleep and disk 2 to run is less than the first threshold, the computing device can determine that the sleep strategy of disk 1 running and disk 2 sleeping can obtain energy saving benefits. object Greater than the E obtained by assuming disk 1 is running and disk 2 is dormant object , then the computing device can sleep according to the sleep strategy of disk 1 running and disk 2 sleeping, so as to obtain greater energy saving benefits.

[0077] In another implementation, the computing device may also determine the first disk in the storage pool based on algorithms such as machine learning, without limitation.

[0078] S22: The computing device sends a first instruction to the first disk.

[0079] The first instruction can be used to instruct hibernation within a first time period. The first instruction can be a hibernation instruction, but the embodiment of the present application does not limit the name of the first instruction. Furthermore, the first disk receives the first instruction and enters a hibernation state within the first time period. Optionally, the storage pool may include other disks in addition to the first disk, and the other disks are in a running state within the first time period. That is, the other disks support being accessed, executing tasks, etc. within the first time period. For example, within the first time period, the computing device may receive a third operation, and the third operation is used to write the second data to the storage pool; in response to the third operation, the computing device may write the second data to a fourth disk in the storage pool, and the fourth disk is in a running state within the first time period. This eliminates the need to wake up the first disk, thereby improving energy saving benefits.

[0080] In one embodiment, the computing device may determine the first time period based on the historical load intensity of the storage pool. For example, the computing device may learn the historical load patterns of the storage pool based on algorithms such as machine learning, and predict that the sleep time period is the first time period. Alternatively, the computing device may also predict the user's sleep time window and determine the first time period based on the user's sleep time window, such as determining the first time period as the sleep time window. For example, the computing device may predict the user's sleep time window based on the user's historical access information, where the historical access information is information about the user's access to the storage pool. Alternatively, the computing device may also determine the first time period based on the historical load intensity of the storage pool and the user's sleep time window. The sleep time window may be understood as a time period when the user does not access the storage pool. For example, the sleep time window may be a periodic time period when the user does not access the storage pool, without limitation. For example, the sleep time window may be from 1:00 to 5:00 every day, or from 2:00 to 6:00 every day, etc., without limitation.

[0081] Optionally, the sleep time window may be one or more, without limitation. If there are multiple sleep time windows, the computing device may determine that one of the multiple sleep time windows is the first time period. Alternatively, the computing device may send a second prompt to the user, the second prompt including the multiple sleep time windows; and receive a fifth operation from the user, the fifth operation indicating the first time period. Further, the computing device may determine the first time period based on the fifth operation. Optionally, the first time period indicated by the fifth operation may or may not be within the multiple sleep time windows, i.e., the first time period is set by the user and is not limited. For example, the second prompt may prompt the user to set a sleep time. For example, if the multiple sleep time windows include 23:30-6:00, 23:30-7:00, and 0:00-7:00, the second prompt may include options for 23:30-6:00, 23:30-7:00, 0:00-7:00, and other time period options, as shown in Figure 4. When the user selects the Other Time Period option, the user can set one or more sleep times.

[0082] Optionally, if the user's access pattern to the storage pool changes, the computing device can send a third prompt to the user, prompting the user to promptly change the energy-saving time period. The third prompt can be a text message or a ringtone, and the specific implementation of the third prompt is not limited in this embodiment of the application.

[0083] In the above embodiment, the computing device can determine the first time period based on the historical load intensity of the storage pool. In another embodiment, the user can also actively set the sleep time. For example, the computing device can receive a third operation from the user, and the third operation is used to indicate the first time period, so that a sleep time that suits the user can be selected, which can improve the user experience. Or the user can also set the sleep time in response to the prompt of the computing device. For example, before receiving the third operation from the user, the computing device can also send a first prompt message to the user, and the first prompt message is used to prompt the user to set the sleep time. The first prompt message can be a text message, a ringtone, etc. The embodiment of the present application does not limit the specific implementation form of the first prompt message.

[0084] In one possible implementation, a computing device may receive a first operation from a user, and the first operation may be used to instruct the execution of a first business based on a storage pool. The first business may be, for example, a backup business, etc., without limitation. The storage pool executing the first business will generate at least one foreground task and at least one background task. Furthermore, the computing device may send a second instruction to at least two disks, and the second instruction may be used to instruct the execution of at least one background task corresponding to the first business within a second time period, and the second time period does not overlap with the first time period. When there are multiple background tasks corresponding to the first business, the execution time of the multiple background tasks is not uniform and is scattered. Since a disk needs a certain delay to execute tasks after recovering from an energy-saving state, the intermittent execution of the multiple background tasks will affect the energy-saving benefits, as shown in (1) in Figure 5. In the above implementation, the computing device concentrates the multiple background tasks in the second time period for centralized processing, which can avoid the impact of the intermittent execution of multiple background tasks on the energy-saving benefits, and can extend the sleep time and improve the energy-saving benefits, as shown in (2) in Figure 5. Optionally, the starting time of the second time period may be the completion time of the foreground task of the first business, that is, after the foreground task of the first business is completed, the multiple background tasks of the first business may be executed immediately. This can reduce the impact of the discrete execution of foreground tasks and background tasks on energy saving benefits, extend the sleep time, and improve energy saving benefits, as shown in (3) in Figure 5. Figure 5 takes the first business corresponding to one foreground task and three background tasks (respectively recorded as background task 1, background task 2, and background task 3) as an example.

[0085] Metadata and data are stored in a dispersed manner on the disks in the storage pool. Given that metadata is more likely to be accessed, in one embodiment, the computing device centralizes the metadata in the storage pool to some of the running disks for storage, as shown in FIG6 . For example, metadata may not be stored in the first disk, that is, the first disk does not store metadata. For example, the first disk originally did not store metadata, or the first disk originally stored metadata. After being selected as the dormant disk, the metadata stored on the first disk can be migrated to the running disk (such as the fifth disk). In other words, metadata is not stored in the disk that is about to go into sleep mode, which can reduce the probability of the dormant disk being awakened during the sleep period, thereby improving energy saving benefits.

[0086] The metadata in the storage pool is stored in some running disks. When the amount of metadata in the storage pool increases, the computing device can expand the capacity; or, when the amount of metadata in the storage pool decreases, the computing device can shrink the capacity to improve the utilization of the storage pool. Exemplarily, the computing device can expand or shrink the capacity according to the amount of metadata stored in the storage pool. For example, the computing device can determine the fifth disk in the storage pool based on the amount of metadata stored in the storage pool, and the fifth disk is in a running state during the first time period. The number of the fifth disk can be one or more, without limitation. Furthermore, the computing device can migrate the metadata in the storage pool to the fifth disk. For example, the computing device can migrate the metadata in the first disk to the fifth disk. It should be understood that if the fifth disk originally stores metadata, the metadata in the fifth disk can remain unchanged.

[0087] For example, the computing device may determine the fifth disk by one or more of the following: when the first value is greater than or equal to the second threshold, the computing device may determine that the fifth disk includes the sixth disk and M disks, where the M disks are newly added disks for storing metadata, and M is a positive integer; when the first value is greater than the third threshold and less than the second threshold, the computing device may determine that the fifth disk is the sixth disk; or, when the first value is less than or equal to the third threshold, the computing device may determine that the fifth disk is a disk other than N disks in a plurality of sixth disks, where N disks are disks no longer used to store metadata, and N is a positive integer. Among them, the sixth disk is the disk originally used to store metadata. The sixth disk is in operation during the first time period. The number of sixth disks is one or more. The first value may be the ratio between the number of data blocks used for metadata and the number of data blocks allowed to be used by metadata. For example, the first value may be recorded as N used / N total . N used The number of data blocks that can be used for metadata. N total It can be the total number of data blocks that metadata can use. total / N each Can be greater than or equal to the maximum number of metadata columns, N each The number of data extents that can be allocated to each disk in the storage pool.

[0088] It should be pointed out that when the computing device is expanded, a new disk can be added to store metadata. The added metadata will be written to the new disk first, and data balancing will be performed on the newly added disk instead of the disk originally used to store metadata. This can reduce data migration and extend the life of the disk.

[0089] Exemplarily, the above M may satisfy the following formula (2).

[0090] Where X∈(X1,X2) means X is greater than X1 and less than X2. upper_bound It can be the second threshold. lower_bound It can be the third threshold. used The number of data blocks that can be used for metadata. N total The total number of data blocks that can be used for metadata. N each The number of data extents that can be allocated to each disk in the storage pool.

[0091] Exemplarily, the above M may also satisfy the following formula (3).

[0092] The various parameters in formula (3) can refer to the description of formula (2) and will not be repeated here.

[0093] In other words, the value of M can be determined by formula (2), or by formula (3), or by both formula (2) and formula (3).

[0094] Exemplarily, the above N may satisfy the following formula (4).

[0095] The various parameters in formula (4) can refer to the description of formula (2) and will not be repeated here.

[0096] Exemplarily, the above N may also satisfy the following formula (5).

[0097] The various parameters in formula (5) can refer to the description of formula (2) and will not be repeated here.

[0098] In other words, the value of N can be determined by formula (4), or by formula (5), or by both formula (4) and formula (5).

[0099] Given the high probability of hot data being accessed, in one embodiment, the computing device can migrate hot data from a dormant disk to some active disks, as shown in Figure 6. For example, if a first disk does not store hot data, the computing device can migrate the hot data from the first disk to a second disk in the storage pool before a first time period. The second disk is in an active state during the first time period. This allows the second disk to provide access to the hot data during the first time period, reducing the probability of the first disk being awakened during the first time period and improving energy savings.

[0100] In Figure 6, the storage pool includes eight disks, designated Disk 1, Disk 2, Disk 3, Disk 4, Disk 5, Disk 6, Disk 7, and Disk 8. Disk 1, Disk 2, Disk 3, Disk 4, and Disk 5 are active disks, while Disk 6, Disk 7, and Disk 8 are dormant disks. Each disk includes a metadata area and a data area. The metadata area is used to store metadata, while the data area is used to store data. The metadata in Disk 6 is migrated to Disk 2, so Disk 6, Disk 7, and Disk 8 no longer store metadata. The hot data in Disk 7 is migrated to Disk 5, and the hot data in Disk 8 is migrated to Disk 4, so that Disk 6, Disk 7, and Disk 8 no longer store hot data.

[0101] An embodiment of the present application provides an energy-saving device. FIG7 exemplarily shows a schematic structural diagram of an energy-saving device provided by an embodiment of the present application. Optionally, the energy-saving device 700 can be a computing device, or a component in a computing device, for implementing the content of the embodiment shown in FIG2 . As shown in FIG7 , the energy-saving device 700 can include a disk sleep / wake-up decision module, a background disk access service control module, and a sleep disk selection module. It should be understood that the embodiment of the present application no longer limits the division and names of the various modules of the energy-saving device 700.

[0102] The disk hibernation / wakeup decision module can sense the load intensity of the storage pool, analyze the load intensity of the storage pool, and determine whether to hibernate the storage pool or wake up a dormant disk. The disk hibernation / wakeup decision module can also determine a first time period, such as determining the first time period based on historical load intensity and / or a hibernation time window. For details, please refer to the aforementioned method embodiments and will not be repeated here. The background disk access service regulation module can query background tasks, suspend background tasks, or resume background tasks, without limitation. The background disk access service regulation module can centralize multiple background tasks corresponding to a first service in a second time period and / or immediately execute multiple background tasks corresponding to the first service after completing the foreground tasks corresponding to the first service, thereby increasing the hibernation duration and improving energy efficiency. For specific implementation, please refer to the aforementioned method embodiments and will not be repeated here. The dormant disk selection module can determine the number of dormant disks and select dormant disks based on disk energy consumption, disk load intensity, and disk wear. For specific implementation, please refer to the aforementioned method embodiments and will not be repeated here. The dormant disk selection module can also be used to migrate metadata from dormant disks to active disks, etc. For specific implementation, please refer to the aforementioned method embodiments and will not be repeated here.

[0103] Furthermore, the energy-saving device 700 may send a first instruction to the storage pool to cause the dormant disk selected in the storage pool to enter dormancy within a first time period. It should be understood that the energy-saving device 700 may or may not include the storage pool, without limitation. FIG7 illustrates an example in which the energy-saving device does not include the storage pool. Furthermore, the entire storage pool may enter dormancy, or only some of the disks in the storage pool may enter dormancy, without limitation. FIG7 illustrates an example in which some of the disks in the storage pool enter dormancy.

[0104] It should be noted that the background disk access service regulation module and the dormant disk selection module are both optional modules. In other words, the energy-saving device 700 may only include the disk dormant / wake-up decision module. For example, the disk dormant / wake-up decision module may determine whether the entire storage pool is dormant, or determine whether some disks in the storage pool are dormant, based on algorithms such as machine learning. Alternatively, the energy-saving device 700 may only include the disk dormant / wake-up decision module and the background disk access service regulation module. Alternatively, the energy-saving device 700 may only include the disk dormant / wake-up decision module and the dormant disk selection module.

[0105] The present application also provides an energy-saving device. FIG8 exemplarily shows a schematic diagram of the structure of another energy-saving device provided in the present application. The energy-saving device 800 can be used to execute the method in the embodiment shown in FIG2 .

[0106] In one embodiment, energy-saving device 800 may include a processing module 801 and a transceiver module 802. Processing module 801 may be configured to process data, such as executing the processing-related steps described in any of the above-described method embodiments. Transceiver module 802 may be configured to implement corresponding communication functions, such as receiving or sending relevant data, information, or messages. Transceiver module 802 may also be referred to as a communication interface, a communication module, or a transceiver unit.

[0107] Optionally, the energy-saving device 800 may further include a storage module, which is not shown in Figure 8. The storage module may be used to store instructions and / or data, and the processing module 801 may read the instructions and / or data in the storage module to enable the energy-saving device 800 to implement the aforementioned method embodiment.

[0108] Optionally, the transceiver module 802 may include a sending module and a receiving module. The sending module is used to perform the sending operation in the above method embodiment. The receiving module is used to perform the receiving operation in the above method embodiment.

[0109] It should be noted that the energy-saving device 800 may include a sending module but not a receiving module. Alternatively, the energy-saving device 800 may include a receiving module but not a sending module. The specific implementation depends on whether the above solution executed by the energy-saving device 800 includes a sending action and a receiving action.

[0110] Optionally, the energy-saving device 800 can be used to perform the actions performed by the computing device in the embodiment shown in FIG. 2 . For details, please refer to the relevant introduction of the embodiment shown in FIG. 2 , which will not be repeated here. For example, the energy-saving device 800 can perform the following scheme:

[0111] The processing module 801 can be used to determine a first disk in a storage pool, wherein the storage pool includes at least two disks, the at least two disks include the first disk, and the expected energy consumption of the storage pool when the first disk is dormant is less than or equal to a first threshold.

[0112] The transceiver module 802 may be configured to send a first instruction to the first disk, where the first instruction is used to instruct the first disk to sleep within a first time period.

[0113] In a possible implementation, the minimum value of the first threshold is a first energy consumption, where the first energy consumption is the minimum expected energy consumption of the storage pool when all or part of the at least two disks except the first disk are in hibernation.

[0114] In a possible implementation, the expected energy consumption of the storage pool when the first disk is dormant is determined based on energy consumption of the at least two disks, load intensity of the at least two disks, and wear of the at least two disks.

[0115] In one possible implementation, the transceiver module 802 may also be configured to receive a first operation from a user, the first operation being used to instruct execution of a first service based on the storage pool; and to send a second instruction to the at least two disks, the second instruction being used to instruct execution of multiple background tasks corresponding to the first service within a second time period, where the second time period does not overlap with the first time period. Optionally, the first service may be a backup service. Optionally, the start time of the second time period is the completion time of the foreground task of the first service.

[0116] In a possible implementation, the processing module 801 may also be configured to migrate the hot data in the first disk to a second disk of the at least two disks before the first time period, where the second disk is in operation during the first time period.

[0117] In one possible implementation, before the first time period, the transceiver module 802 can also be used to receive a second operation, where the second operation is used to write the first data into the storage pool; the processing module 801 can also be used to write the first data into a third disk in the storage pool in response to the second operation, where the third disk is in operation during the first time period.

[0118] In one possible implementation, the transceiver module 802 can also be used to receive a third operation within the first time period, and the third operation is used to write the second data into the storage pool; the processing module 801 can also be used to write the second data into a fourth disk in the storage pool in response to the third operation, and the fourth disk is in an operating state during the first time period.

[0119] In one possible implementation, the processing module 801 can also be used to determine the fifth disk in the storage pool based on the amount of metadata stored in the storage pool, and the fifth disk is in operation during the first time period; and migrate the metadata in the storage pool to the fifth disk.

[0120] Illustratively, the processing module 801 may also be configured to perform one or more of the following:

[0121] When the first value is greater than or equal to the second threshold, determining that the fifth disk includes a sixth disk and M disks, and the M disks are newly added disks for storing the metadata;

[0122] When the first value is greater than a third threshold value and less than a second threshold value, determining that the fifth disk is a sixth disk;

[0123] Alternatively, when the first value is less than or equal to a third threshold, determining that the fifth disk is a disk other than N disks in the plurality of sixth disks, and the N disks are disks no longer used to store the metadata;

[0124] Among them, the sixth disk is the disk originally used to store the metadata, the number of the sixth disk is one or more, the first value is the ratio between the number of data blocks used by the metadata and the number of data blocks allowed to be used by the metadata, and M and N are both positive integers.

[0125] In one possible implementation, processing module 801 may further be configured to determine the first time period based on the historical load intensity of the storage pool; or, transceiver module 802 may further be configured to receive a fourth operation from the user, the fourth operation being configured to indicate the first time period. Exemplarily, before receiving the fourth operation from the user, transceiver module 802 may further be configured to send a first prompt message to the user, the first prompt message being configured to prompt the user to set a sleep time.

[0126] For the above specific implementation process, please refer to the relevant description of the embodiment shown in Figure 2, which will not be repeated here.

[0127] It is understandable that the above-mentioned multiple functional modules can be implemented based on software, hardware or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.

[0128] The embodiment of the present application also provides a computing device 900. The computing device 900 can be a server, etc., without limitation. As shown in Figure 9, the computing device 900 may include a processor 901. The processor 901 can implement the method in the embodiment shown in Figure 2. It should be understood that the embodiment of the present application does not limit the number of processors in the computing device 900. The processor 901 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0129] Optionally, the computing device 900 may further include a memory 902 (indicated by a dotted line in FIG9 ). The memory 902 may include a volatile memory, such as a random access memory (RAM). The memory 902 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD). The memory 902 stores executable program code, and the processor 901 executes the executable program code to implement the method of the embodiment corresponding to FIG2 .

[0130] Optionally, the computing device 900 may further include a communication interface 904 (indicated by a dotted line in FIG9 ). The communication interface 904 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 900 and other devices or a communication network.

[0131] Optionally, the computing device 900 may further include a bus 903. The processor 901, the memory 902, and the communication interface 904 communicate via the bus 903. The bus 903 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 903 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG9 shows only one line, but this does not mean that there is only one bus or one type of bus. The bus 903 may include a path for transmitting information between the various components of the computing device 900 (e.g., the processor 901, the memory 902, and the communication interface 904).

[0132] Based on the above embodiments, the present application also provides a computer program product, which includes: a computer program (also called code, or instructions), which, when executed, enables a computer to execute the methods described in the embodiments of the present application.

[0133] Based on the above embodiments, the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the computer executes the methods described in the embodiments of the present application.

[0134] Based on the above embodiments, the present application further provides a chip, which is used to read a computer program stored in a memory to implement the various methods described in the embodiments of the present application.

[0135] Based on the above embodiments, the present application provides a chip system, which includes a processor for supporting a computer device to implement the various methods described in the embodiments of the present application. In one possible design, the chip system also includes a memory for storing the necessary programs and data for the computer device. The chip system can be composed of a chip or can include a chip and other discrete devices.

[0136] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0137] The present application is described with reference to the flow chart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart flow or multiple flows and / or one box or multiple boxes of the block diagram.

[0138] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0139] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0140] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application also intends to include these modifications and variations.

Claims

1. An energy saving method, characterized in that: The method comprises: Determine a first disk in a storage pool, wherein the storage pool includes at least two disks, the at least two disks include the first disk, and an expected energy consumption of the storage pool when the first disk is dormant is less than or equal to a first threshold; A first instruction is sent to the first disk, where the first instruction is used to instruct hibernation within a first time period.

2. The method according to claim 1, characterized in that The minimum value of the first threshold is a first energy consumption, and the first energy consumption is the minimum expected energy consumption of the storage pool when all or part of the at least two disks except the first disk are in hibernation.

3. The method according to claim 1 or 2, characterized in that: The expected energy consumption of the storage pool when the first disk is in hibernation is determined according to the energy consumption of the at least two disks, the load intensity of the at least two disks, and the wear degree of the at least two disks.

4. The method according to claim 3, characterized in that The expected energy consumption of the storage pool satisfies: Among them, the E object is the expected energy consumption of the storage pool, I is the number of the at least two disks, k is the load intensity of the i-th disk among the at least two disks, and p i,k is the expected energy consumption of the i-th disk, and the s i,k is 1 or 0, α is a performance cost parameter, and T i,k is the response delay of the i-th disk, c is the cost of migrating a data block from the i-th disk, n is the number of data blocks migrated from the i-th disk, β is the wear cost parameter, and A is a i Or (1-a i ), the a i is the degree of wear, and i is a positive integer less than or equal to I.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: receiving a first operation from a user, where the first operation is used to instruct execution of a first service based on the storage pool; A second instruction is sent to the at least two disks, where the second instruction is used to instruct execution of multiple background tasks corresponding to the first business within a second time period, and the second time period does not overlap with the first time period.

6. The method according to claim 5, characterized in that The start time of the second time period is the completion time of the foreground task of the first service.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Before the first time period, hot data in the first disk is migrated to a second disk of the at least two disks, and the second disk is in operation during the first time period.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Before the first time period, receiving a second operation, where the second operation is used to write the first data into the storage pool; In response to a second operation, the first data is written to a third disk in the storage pool, and the third disk is in an operating state during the first time period.

9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: In the first time period, receiving a third operation, where the third operation is used to write second data into the storage pool; In response to the third operation, the second data is written to a fourth disk in the storage pool, and the fourth disk is in operation during the first time period.

10. The method according to any one of claims 1 to 9, characterized in that The first disk does not store metadata.

11. The method according to claim 10, characterized in that The method further comprises: Determining, according to the data volume of the metadata stored in the storage pool, a fifth disk in the storage pool, wherein the fifth disk is in a running state during the first time period; The metadata in the storage pool is migrated to the fifth disk.

12. The method according to claim 11, characterized in that Determining the fifth disk in the storage pool according to the amount of metadata in the storage pool includes one or more of the following: When the first value is greater than or equal to the second threshold, it is determined that the fifth disk includes the sixth disk and M disks, and the M disks are newly added disks for storing metadata; When the first value is greater than the third threshold value and less than the second threshold value, determining that the fifth disk is the sixth disk; or, When the first value is less than or equal to the third threshold, determining that the fifth disk is a disk other than N disks in the plurality of sixth disks, and the N disks are disks no longer used to store metadata; Among them, the sixth disk is a disk originally used to store metadata, the number of the sixth disk is one or more, the first value is the ratio between the number of data blocks used by metadata and the number of data blocks allowed to be used by metadata, and M and N are both positive integers.

13. The method according to claim 12, characterized in that The M satisfies: The N satisfies: Among them, the G upper_bound is the second threshold, the G lower_bound is the third threshold, the N used is the number of data blocks used by metadata, the N total N is the number of data blocks allowed to be used by metadata. each The number of data blocks allocated to each of the at least two disks.

14. The method according to any one of claims 1 to 13, characterized in that The method further comprises: The first time period is determined according to the historical load intensity of the storage pool.

15. The method according to any one of claims 1 to 13, characterized in that The method further comprises: A fourth operation is received from a user, where the fourth operation is used to indicate the first time period.

16. The method according to claim 15, characterized in that The method further comprises: Before receiving a fourth operation from the user, first prompt information is sent to the user, where the first prompt information is used to prompt the user to set a sleep time.

17. The method according to any one of claims 1 to 16, characterized in that The first disk does not store hot data.

18. An energy-saving device, characterized in that: It includes a processing module and a transceiver module, wherein: The processing module is configured to determine a first disk in a storage pool, wherein the storage pool includes at least two disks, the at least two disks include the first disk, and an expected energy consumption of the storage pool when the first disk is dormant is less than or equal to a first threshold; The transceiver module is used to send a first instruction to the first disk, where the first instruction is used to instruct sleep within a first time period.

19. The device according to claim 18, characterized in that The minimum value of the first threshold is a first energy consumption, and the first energy consumption is the minimum expected energy consumption of the storage pool when all or part of the at least two disks except the first disk are in hibernation.

20. The device according to claim 18 or 19, characterized in that The expected energy consumption of the storage pool when the first disk is in hibernation is determined according to the energy consumption of the at least two disks, the load intensity of the at least two disks, and the wear degree of the at least two disks.

21. The device according to claim 20, characterized in that The expected energy consumption of the storage pool satisfies: Among them, the E object is the expected energy consumption of the storage pool, I is the number of the at least two disks, k is the load intensity of the i-th disk among the at least two disks, and p i,k is the expected energy consumption of the i-th disk, and the s i,k is 1 or 0, α is a performance cost parameter, and T i,k is the response delay of the i-th disk, c is the cost of migrating a data block from the i-th disk, n is the number of data blocks migrated from the i-th disk, β is the wear cost parameter, and A is a i Or (1-a i ), the a i is the degree of wear, and i is a positive integer less than or equal to I.

22. The device according to any one of claims 18 to 21, characterized in that The transceiver module is also used for: receiving a first operation from a user, where the first operation is used to instruct execution of a first service based on the storage pool; A second instruction is sent to the at least two disks, where the second instruction is used to instruct execution of multiple background tasks corresponding to the first business within a second time period, and the second time period does not overlap with the first time period.

23. The device according to claim 22, characterized in that The start time of the second time period is the completion time of the foreground task of the first service.

24. The device according to any one of claims 18 to 23, characterized in that The processing module is also used for: Before the first time period, hot data in the first disk is migrated to a second disk of the at least two disks, and the second disk is in operation during the first time period.

25. The device according to any one of claims 18 to 24, characterized in that The transceiver module is further used to: receive a second operation before the first time period, and the second operation is used to write the first data into the storage pool; The processing module is further configured to: in response to a second operation, write the first data to a third disk in the storage pool, where the third disk is in operation during the first time period.

26. The device according to any one of claims 18 to 25, characterized in that The transceiver module is further used to: receive a third operation within the first time period, wherein the third operation is used to write the second data into the storage pool; The processing module is further configured to: in response to the third operation, write the second data to a fourth disk in the storage pool, where the fourth disk is in operation during the first time period.

27. The device according to any one of claims 18 to 26, characterized in that The first disk does not store metadata.

28. The device according to claim 27, characterized in that The processing module is also used for: Determining, according to the data volume of the metadata stored in the storage pool, a fifth disk in the storage pool, wherein the fifth disk is in a running state during the first time period; The metadata in the storage pool is migrated to the fifth disk.

29. The device according to claim 28, characterized in that When determining the fifth disk in the storage pool according to the data amount of the metadata in the storage pool, the processing module is used to perform one or more of the following: When the first value is greater than or equal to the second threshold, it is determined that the fifth disk includes the sixth disk and M disks, and the M disks are newly added disks for storing metadata; When the first value is greater than the third threshold value and less than the second threshold value, determining that the fifth disk is the sixth disk; or, When the first value is less than or equal to the third threshold, determining that the fifth disk is a disk other than N disks in the plurality of sixth disks, and the N disks are disks no longer used to store metadata; Among them, the sixth disk is a disk originally used to store metadata, the number of the sixth disk is one or more, the first value is the ratio between the number of data blocks used by metadata and the number of data blocks allowed to be used by metadata, and M and N are both positive integers.

30. The device according to claim 29, characterized in that The M satisfies: N satisfies: Among them, the G upper_bound is the second threshold, the G lower_bound is the third threshold, the N used is the number of data blocks used by metadata, the N total N is the number of data blocks allowed to be used by metadata. each The number of data blocks allocated to each of the at least two disks.

31. The device according to any one of claims 18 to 30, characterized in that The processing module is also used for: The first time period is determined according to the historical load intensity of the storage pool.

32. The device according to any one of claims 18 to 30, characterized in that The transceiver module is also used for: A fourth operation is received from a user, where the fourth operation is used to indicate the first time period.

33. The device according to claim 32, characterized in that The transceiver module is also used for: Before receiving a fourth operation from the user, first prompt information is sent to the user, where the first prompt information is used to prompt the user to set a sleep time.

34. The device according to any one of claims 18 to 33, characterized in that The first disk does not store hot data.

35. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor; The processor of at least one computing device is configured to read the computer program or instructions stored in the memory, so that the computing device cluster executes the method according to any one of claims 1 to 17.

36. A computer-readable storage medium, characterized in that: The method comprises computer program instructions, which, when executed by a computing device cluster, cause the computing device cluster to perform a method as claimed in any one of claims 1 to 17.

37. A computer program product, characterized in that The computer program product comprises instructions, which, when executed by a computer device cluster, cause the computer device cluster to perform the method according to any one of claims 1 to 17.

Citation Information

Patent Citations

  • Data manipulation method and device for sleep disk

    CN103576835A

  • Disk sleep processing method and apparatus

    CN105138416A

  • Disk dormant state control method, device and equipment and readable storage medium

    CN109614050A

  • Storage system and energy-saving control method

    CN113867617A