Method and device for controlling storage device

The controller dynamically adjusts the operating frequency of the hard disks in the hard disk domain and adjusts the operating frequency of the hard disk according to the business load, solving the problem of increased power consumption of the hard disk domain in the storage device and realizing efficient energy-saving management of the hard disk.

CN120653093APending Publication Date: 2025-09-16CHENGDU HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410298835.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-15
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The power consumption generated by the hard disk domain in a storage device when reading and writing data increases the operating cost of the storage system. Existing technologies fail to effectively manage the power consumption of the hard disk domain.

Method used

The controller dynamically adjusts the operating frequency of the hard disks in the hard disk domain and adjusts the operating frequency of the hard disks according to the business load to optimize power consumption. This includes increasing the frequency under high load to meet performance requirements and reducing the frequency under low load to save energy.

Benefits of technology

It achieves precise management of hard disk power consumption, reduces hard disk energy consumption, improves hard disk utilization efficiency, and avoids power waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653093A_ABST
    Figure CN120653093A_ABST
Patent Text Reader

Abstract

The invention provides a method for controlling a storage device and a controller, the storage device comprises the controller and a hard disk domain, the hard disk domain comprises K hard disks, and the method comprises the steps that the controller obtains the bandwidth occupation amount of a load when the hard disk domain processes a first service, the working frequency of the K hard disks in the hard disk domain when processing the first service is a first frequency; the controller adjusts the working frequency of the K hard disks from the first frequency to a second frequency, the second frequency is larger than the first frequency under the condition that the bandwidth occupation amount of the hard disk domain is larger than a preset hard disk read-write bandwidth threshold value, and the second frequency is larger than the first frequency under the condition that the bandwidth occupation amount of the hard disk domain is smaller than the preset hard disk read-write bandwidth threshold value. The second frequency is smaller than the first frequency. According to the technical scheme, the hard disk power consumption of the storage equipment can be effectively managed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage, and more particularly, to a method and apparatus for controlling a storage device. Background Art

[0002] Storage devices such as storage arrays and storage servers can consist of a large number of hard drives. When using storage devices to transmit or store business data, to meet business needs and ensure reliability, the hard drives can be divided into multiple physically isolated drive domains, each containing multiple hard drives. Users can configure different services in different drive domains based on business needs, for example, storing different business data in different drive domains.

[0003] However, when a storage device reads and writes data through a disk domain, the hard disks in the disk domain consume power, increasing the operating costs of the storage system. Therefore, it is necessary to effectively manage the power consumption of the disk domain in the storage device. Summary of the Invention

[0004] The present application provides a method and controller for controlling a storage device, which can manage the operating frequency of hard disks in a hard disk domain, thereby effectively managing the power consumption of the hard disks and the hard disk domain.

[0005] In a first aspect, an embodiment of the present application provides a method for controlling a storage device, which includes a controller and a hard disk domain, the hard disk domain including K hard disks, where K is a positive integer greater than 1, the method including: the controller obtains the bandwidth occupancy of the load of the hard disk domain when processing a first business, the bandwidth occupancy of the load is the sum of the bandwidth occupancy of the load of the K hard disks when processing the first business, and the operating frequency of the K hard disks in the hard disk domain when processing the first business is a first frequency; the controller adjusts the operating frequency of the K hard disks from the first frequency to a second frequency, wherein, when the bandwidth occupancy of the hard disk domain is greater than a preset hard disk read and write bandwidth threshold, the second frequency is greater than the first frequency, and when the bandwidth occupancy of the hard disk domain is less than the preset hard disk read and write bandwidth threshold, the second frequency is less than the first frequency.

[0006] It's important to understand that a hard drive's operating frequency affects its power consumption. For example, lower operating frequencies produce lower power consumption, while higher frequencies produce higher power consumption. In other words, hard drive power consumption and operating frequency are generally positively correlated. Most existing hard drives use a default frequency, which isn't always the optimal operating frequency for power consumption.

[0007] In the solution of the embodiment of the present application, the controller can determine the operating frequency of the hard disk in the hard disk domain that is suitable for the current business needs, thereby realizing the management of the power consumption of the hard disk domain. For example, in an IDLE scenario or a scenario with a small business load, the controller can reduce the operating frequency of the hard disk or components in the hard disk, such as the main controller and memory, and then reduce the power consumption of the hard disk as a whole or components in the hard disk, such as the main controller and memory, to ensure that the hard disk uses the minimum power consumption to meet the business performance requirements and realize hard disk energy saving. For another example, in a scenario with a high business load pressure, the controller can increase the operating frequency of the hard disk or components in the hard disk, such as the main controller and memory. Although the overall power consumption of the hard disk is high, it can ensure that the hard disk meets the business performance requirements to avoid waste of hard disk power consumption.

[0008] Therefore, the controller of the storage device manages the operating frequency of the hard disk, determines the operating frequency of the hard disk in the hard disk domain that is suitable for current business needs, and then effectively manages the power consumption of the hard disk, which can increase the energy-saving granularity, thereby managing the hard disk more efficiently and achieving hard disk energy saving.

[0009] In combination with the first aspect, in certain implementations of the first aspect, before adjusting the operating frequencies of the K hard disks from the first frequency to the second frequency, the method further includes: the controller obtaining a correspondence between multiple operating frequencies of the hard disk and multiple preset hard disk read / write bandwidth thresholds, the multiple operating frequencies corresponding one-to-one to and positively correlated with the multiple hard disk read / write bandwidth thresholds, the bandwidth usage of the load of the hard disk at any one of the multiple operating frequencies being no greater than the corresponding hard disk read / write bandwidth threshold, the multiple operating frequencies including the first frequency and the second frequency; wherein the first frequency corresponds to a first hard disk read / write bandwidth threshold among the multiple hard disk read / write bandwidth thresholds, the second frequency corresponds to a second hard disk read / write bandwidth threshold among the multiple hard disk read / write bandwidth thresholds, the bandwidth usage of the hard disk domain is no greater than the sum of the K second hard disk read / write bandwidth thresholds of the K hard disks, if the bandwidth usage of the hard disk domain is greater than the sum of the K first hard disk read / write bandwidth thresholds of the K hard disks, the second frequency is greater than the first frequency, and if the bandwidth usage of the hard disk domain is less than the sum of the K first hard disk read / write bandwidth thresholds of the K hard disks, the second frequency is less than the first frequency.

[0010] In the solution of the embodiment of the present application, based on the correspondence between multiple operating frequencies of multiple hard disks and multiple preset hard disk read and write bandwidth thresholds, precise frequency modulation of the operating frequency of the hard disk domain can be achieved, and the operating frequency of the hard disk domain can be managed, thereby achieving optimal energy saving.

[0011] In combination with the first aspect, in certain implementations of the first aspect, when the bandwidth usage of the hard disk domain is 0 or less than a preset lower threshold, the method further includes: the controller stopping execution of background tasks of the storage device.

[0012] In the solution of the embodiment of this application, the disk domain's background tasks periodically issue commands to query disk-related information (such as temperature routine tests and smart routine tests). These routine tests may cause additional power consumption in the disk domain. To eliminate this additional power consumption, the controller can control the execution time of background tasks, instructing K hard disks not to execute background task commands. At this point, the K hard disks will not receive any I / O from the host, thus achieving optimal energy savings.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the hard disk includes a main controller and / or a memory, and the controller adjusts the operating frequency of the K hard disks from the first frequency to the second frequency, including: the controller adjusts the operating frequency of the main controller and / or memory of each of the K hard disks to the second frequency.

[0014] In combination with the first aspect, in some implementations of the first aspect, the memory includes a non-volatile memory NAND and / or a dynamic random access memory DRAM.

[0015] In combination with the first aspect, in certain implementations of the first aspect, the bandwidth occupancy of the hard disk domain is the bandwidth occupancy of the load of the hard disk domain when processing the first business in the first time period.

[0016] In combination with the first aspect, in some implementations of the first aspect, the storage device is a storage array or a storage server.

[0017] In a second aspect, an embodiment of the present application provides a controller for controlling a storage device, which further includes a hard disk domain, which includes K hard disks, where K is a positive integer greater than 1, and the controller includes: an acquisition unit, used to obtain the bandwidth occupancy of the load of the hard disk domain when processing a first business, where the bandwidth occupancy of the load is the sum of the bandwidth occupancy of the loads of the K hard disks when processing the first business, and the operating frequency of the K hard disks in the hard disk domain when processing the first business is a first frequency; a processing unit, used to adjust the operating frequency of the K hard disks from the first frequency to a second frequency, where, when the bandwidth occupancy of the hard disk domain is greater than a preset hard disk read and write bandwidth threshold, the second frequency is greater than the first frequency, and when the bandwidth occupancy of the hard disk domain is less than the preset hard disk read and write bandwidth threshold, the second frequency is less than the first frequency.

[0018] In combination with the second aspect, in certain implementations of the second aspect, before the processing unit adjusts the operating frequencies of the K hard disks from the first frequency to the second frequency, the acquisition unit is further used to: obtain a correspondence between multiple operating frequencies of the hard disk and multiple preset hard disk read and write bandwidth thresholds, the multiple operating frequencies and the multiple hard disk read and write bandwidth thresholds are one-to-one corresponding and positively correlated, the bandwidth occupancy of the load of the hard disk at any operating frequency among the multiple operating frequencies is not greater than the corresponding hard disk read and write bandwidth threshold, the multiple operating frequencies include the first frequency and the second frequency; wherein, the first frequency corresponds to The second frequency corresponds to the first hard disk read and write bandwidth threshold among the multiple hard disk read and write bandwidth thresholds, the bandwidth occupancy of the hard disk domain is not greater than the sum of the K second hard disk read and write bandwidth thresholds of the K hard disks, and when the bandwidth occupancy of the hard disk domain is greater than the sum of the K first hard disk read and write bandwidth thresholds of the K hard disks, the second frequency is greater than the first frequency, and when the bandwidth occupancy of the first hard disk domain is less than the sum of the K first hard disk read and write bandwidth thresholds of the K hard disks, the second frequency is less than the first frequency.

[0019] In combination with the second aspect, in some implementations of the second aspect, when the bandwidth usage of the hard disk domain is 0 or less than a preset lower threshold, the processing unit is further used to: stop execution of background tasks of the storage device.

[0020] In combination with the second aspect, in certain implementations of the second aspect, the hard disk includes a main controller and / or a memory, and the processing unit is specifically used to: adjust the operating frequency of the main controller and / or memory of each of the K hard disks to the second frequency.

[0021] In combination with the second aspect, in some implementations of the second aspect, the memory includes a non-volatile memory NAND and / or a dynamic random access memory DRAM.

[0022] In combination with the second aspect, in certain implementations of the second aspect, the bandwidth occupancy of the hard disk domain is the bandwidth occupancy of the load of the hard disk domain when processing the first business in the first time period.

[0023] In combination with the second aspect, in some implementations of the second aspect, the storage device is a storage array or a storage server.

[0024] Some possible implementation methods and beneficial effects of the second aspect can be referred to the first aspect and will not be repeated here.

[0025] In a third aspect, a controller is provided, comprising a processor and a memory, wherein the memory is configured to store a computer program, and the processor is configured to call and execute the computer program from the memory, so that the controller executes the method in any possible implementation of the first aspect.

[0026] In a fourth aspect, the present application provides a storage device comprising: a processor, a memory, and instructions stored in the memory and executable on the processor, wherein when the instructions are executed, the storage device executes the method in any possible implementation of the first aspect.

[0027] Optionally, the storage device is a storage array or a storage server.

[0028] In a fifth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in any possible implementation of the first aspect.

[0029] It should be noted that the above-mentioned computer program code can be stored in whole or in part on the first storage medium, wherein the first storage medium can be packaged together with the processor or separately packaged with the processor, and the embodiments of the present application do not specifically limit this.

[0030] In a sixth aspect, a computer-readable medium is provided, which stores a program code. When the computer program code is run on a computer, the computer executes the method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is an architectural diagram of a storage device applicable to an embodiment of the present application.

[0032] Figure 2 This is a flowchart of a method for controlling a storage device according to an embodiment of the present application.

[0033] Figure 3 This is a flowchart of a method for controlling a storage device according to an embodiment of the present application.

[0034] Figure 4 This is a schematic diagram of adjusting the hard disk frequency according to an embodiment of the present application.

[0035] Figure 5 This is another process diagram of the method for controlling a storage device according to an embodiment of the present application.

[0036] Figure 6 Schematic diagram of a controller according to an embodiment of the present application.

[0037] Figure 7is a schematic diagram of a controller according to another embodiment of the present application. DETAILED DESCRIPTION

[0038] The technical solution in this application will be described below with reference to the accompanying drawings.

[0039] Before introducing the embodiments, the terms involved in this application are described in detail.

[0040] Hard disk domain:

[0041] When using storage devices to transmit or store business data, the hard drives within the storage device can be divided into one or more physically isolated disk domains to meet business needs and ensure reliability. A disk domain is a grouping of multiple hard drives, which can include some or all of the hard drives in the entire system. By consolidating multiple hard drives within a disk domain and reserving hot spare capacity, storage resources can be uniformly provided to the storage pool. In other words, a disk domain is a group of hard drives, and a hard drive can belong to only one disk domain.

[0042] In an embodiment of the present application, the number of hard disks in a hard disk domain can be large, such as hundreds. The hard disk domain can also include different types of hard disks, and each type of hard disk can be assigned to a corresponding storage tier. For example, solid state disks (SSDs) can be assigned to the high-performance tier, serial attached SCSI (SAS) hard disks can be assigned to the performance tier, and near-line serial attached SCSI (NL-SAS) hard disks can be assigned to the capacity tier.

[0043] The primary function of a disk domain is to separate different groups of hard drives, achieving complete isolation of faults, performance, and storage resources. Furthermore, since the storage pool's storage space comes from disk domains, the capacity of a disk domain directly determines the available capacity of the storage pool. Users can configure different services in different disk domains based on business needs, for example, storing different business data in different disk domains.

[0044] For ease of understanding, first combine Figure 1 The architecture of a storage device applicable to the embodiments of the present application is introduced. The storage device can be composed of a large number of hard disks.

[0045] like Figure 1 As shown, Figure 1 A schematic structural diagram of the storage device 100 is shown. Figure 1 The storage device 100 shown includes at least a controller 110 and at least one hard disk domain (eg Figure 1The hard disk domain 120 and the hard disk domain 130 shown in FIG. 1 , and each hard disk domain includes multiple hard disks (such as Figure 1 1 and 132 in hard disk domain 120 and hard disk 131 and 132 in hard disk domain 130). Controller 110 may be connected to the hard disks in the at least one hard disk domain to manage the hard disks in the storage device, and the hard disks may be used to provide storage resources for data.

[0046] It is worth noting that Figure 1 The storage device architecture shown is only an example. In actual application, the components included in the storage device architecture are not limited to Figure 1 For example, in other possible storage device architectures, the storage device may further include an I / O interface, etc., and may also include a Figure 1 There may be more or fewer hard disk domains, and the storage device may include multiple processors.

[0047] The hard disk mentioned in this application may be, for example, the aforementioned SSD, SAS disk, or NL-SAS disk, or a serial advanced technology attachment (SATA) disk. In embodiments of this application, the storage device may be a storage array, a storage server, or an array device using hard disks (regardless of type) as primary media, a memory device, or the like. The storage array may be, for example, a redundant array of independent disks (RAID), and the controller 110 may be an array controller.

[0048] At present, hard disks such as solid-state hard disks are mainly composed of a main controller (master controller), flash memory (NAND) particles, dynamic random access memory (DRAM) cache particles (optional), etc. For example, in an embodiment of the present application, the DRAM can be a double data rate synchronous dynamic random access memory (DDR). The power consumption of a hard disk can include master control power consumption, NAND power consumption, DDR power consumption, and power supply power consumption, among which the power consumption of the main controller accounts for the largest proportion of power consumption under different business models. Table 1 shows a schematic diagram of power consumption proportions provided in an embodiment of the present application.

[0049] Table 1

[0050] Business Scenario Total hard disk power consumption Main controller NAND DDR Power loss IDLE 7.5w 51% 3% 8% 33% Sequential read 7G / s 11.3w 51% 13% 5% 25% Sequential write 4G / s 12.8w 34% 28% 10% 23%

[0051] As shown in Table 1, when the business scenario is idle (IDLE), the total power consumption of a single hard disk is 7.5W, of which the power consumption of the main controller accounts for 51%; when the sequential read rate is 7G / s, the total power consumption of a single hard disk reaches 11.3W, of which the power consumption of the main controller accounts for 51%; when the sequential write rate is 4G / s, the total power consumption of a single hard disk reaches 12.8W, of which the power consumption of the main controller accounts for 34%.

[0052] Table 1 shows that in idle scenarios or scenarios with light business load, the workload of the main controller, NAND, and DDR is relatively small, but the power consumption of a single hard drive, 7.5 W, is still relatively high. In sequential read and write scenarios, the power consumption of a single hard drive increases with the load, thereby increasing the operating cost of the storage system.

[0053] The operating frequency of the hard disk will have an impact on the hard disk power consumption. For example, when the operating frequency of the hard disk is low, the power consumption is small, and when the operating frequency is high, the power consumption is large. In other words, the hard disk power consumption is generally positively correlated with the hard disk operating frequency. Most existing hard disks use a default frequency, which is not the optimal operating frequency for the current hard disk power consumption. For example, when the hard disk is in an IDLE scenario, using the default frequency instead of a low operating frequency will cause additional hard disk power consumption; for another example, when the hard disk is in a higher workload scenario, the hard disk performance when using the default frequency may not meet the business load requirements, resulting in a higher total hard disk power consumption but unable to meet business needs, resulting in a waste of hard disk power consumption. Therefore, it is necessary to effectively manage the hard disk power consumption of storage devices.

[0054] Therefore, in order to solve the above technical problems, an embodiment of the present application proposes a method 200 for controlling a storage device. This method 200 can manage the operating frequency of the hard disk, and thus effectively manage the power consumption of the hard disk, thereby increasing the energy-saving granularity, thereby more efficiently managing the hard disk and achieving hard disk energy saving.

[0055] Figure 2 2 is a flowchart of a method 200 for controlling a storage device according to an embodiment of the present application. Figure 2 The method shown can be used by Figure 1 The controller 110 shown is executed. For ease of distinction, the "controller" hereinafter is used to indicate the controller that controls the storage device, and the "master controller" is used to indicate the master controller that controls a single hard disk. Method 200 includes steps 210 to 230. For ease of description, the following description assumes that the storage device includes one hard disk domain and the hard disk domain includes K hard disks, where K is a positive integer greater than 1. The case where the storage device includes multiple hard disk domains is the superposition of the embodiments of the present application executed separately in multiple hard disk domains.

[0056] Optionally, step 210: obtaining a correspondence between multiple operating frequencies of the hard disk and multiple hard disk read and write bandwidth thresholds.

[0057] It should be understood that step 210 obtains the correspondence between multiple operating frequencies of a single hard disk and multiple hard disk read and write bandwidth thresholds. Since multiple hard disks in each hard disk domain are used for the same business processing or the multiple hard disks have the same operating frequency, the correspondence between multiple operating frequencies of the hard disk domain and multiple hard disk read and write bandwidth thresholds can be determined by summing the number of hard disks.

[0058] The multiple operating frequencies correspond to and are positively correlated with the multiple hard disk read / write bandwidth thresholds. The bandwidth usage of a single hard disk load at any of the multiple operating frequencies is no greater than the corresponding hard disk read / write bandwidth threshold. In the embodiment of the present application, the bandwidth usage, hard disk read / write bandwidth, and hard disk read / write bandwidth threshold are expressed in the same unit, for example, bps, Mbps (or MB / s, B / s).

[0059] The operating frequency of a hard disk can be the operating frequency of a component included in the hard disk, such as the operating frequency of a main controller, the operating frequency of a NAND drive, or the operating frequency of a DDR drive. Tables 2 and 3 respectively show the corresponding relationships between the operating frequencies of a main controller and a DDR drive, and the hard disk read / write bandwidth threshold. The corresponding relationship between the operating frequency of a NAND drive and the hard disk read / write bandwidth threshold can be similarly defined.

[0060] Table 2

[0061]

[0062] Table 3

[0063]

[0064]

[0065] It is noteworthy that the operating frequency and hard disk read and write bandwidth threshold values ​​shown in Tables 2 and 3 are only examples and do not impose any limitation on the embodiments of the present application. The present application does not limit the acquisition method of Tables 2 and 3 and the corresponding relationship determination method (such as the division method of operating frequency and hard disk read and write bandwidth threshold value). For example, the maximum hard disk read and write bandwidth of the hard disk at operating frequencies of different sizes can be obtained by experiment, and then the curve of the operating frequency of the hard disk and the hard disk performance (i.e., maximum hard disk read and write bandwidth) of the hard disk can be obtained, and the corresponding relationship as shown in Tables 2 and 3 can be determined based on the curve. Wherein, the hard disk read and write bandwidth threshold value can be determined according to the above-mentioned maximum hard disk read and write bandwidth, for example, when the operating frequency of the main control is 500Mhz, the corresponding hard disk read and write bandwidth threshold value 5Gbps is the maximum hard disk read and write bandwidth when the operating frequency of the main control is 500Mhz, or the hard disk read and write bandwidth threshold value can also be a value less than the maximum hard disk read and write bandwidth, and the present application does not limit this.

[0066] Optionally, the embodiment of the present application can divide the operating frequency of the hard disk into multiple levels. Table 4 shows another correspondence between the operating frequency of the hard disk and the hard disk read and write bandwidth threshold. For example, when the hard disk operating frequency is the highest level 10, the corresponding main control, NAND and DDR operating frequencies can be the highest operating frequencies, such as the main control operating frequency of 500Mhz shown in Table 2, the DDR operating frequency of 2800Mhz shown in Table 3, etc. In other words, the multiple operating frequency levels shown in Table 4 can correspond to the multiple operating frequencies of the hard disk or components in the hard disk, such as the main controller or memory. This correspondence can be the correspondence between the operating frequencies in Tables 2 and 3 and the operating frequency levels in Table 4.

[0067] Table 4

[0068]

[0069] Optionally, when a storage device includes multiple hard disk domains, the multiple hard disk domains may all use the corresponding relationships between multiple operating frequencies and multiple hard disk read / write bandwidth thresholds as shown in Tables 2 to 4, or may use different corresponding relationships. Figure 1 The hard disk domain 120 shown can use the corresponding relationships shown in Tables 2 to 4, while the business load of the hard disk domain 130 is smaller, so a corresponding relationship with a smaller operating frequency range (such as the hard disk operating frequency is only levels 1 to 5) and a smaller hard disk read and write bandwidth threshold range (such as only 0 to 2 Gbps) can be used.

[0070] Optionally, the hard disk read / write bandwidth threshold corresponding to the hard disk operating frequency being the lowest operating frequency may be 0 as shown in Tables 2 to 4, or may be a preset lower limit threshold that is greater than 0 but extremely small, such as 0.1 Gbps.

[0071] The hard disk read and write bandwidth threshold may also be referred to as hard disk performance value, hard disk transmission performance, or any other name used to describe the speed threshold when the hard disk reads and writes business data, and this application does not limit this.

[0072] Step 220: Obtain the bandwidth usage of the load of the hard disk domain when processing the first service.

[0073] The load bandwidth usage is the sum of the load bandwidth usage of the K hard disks in the hard disk domain when processing the first service. For example, if K is 5, the read load bandwidth usage of the five hard disks when processing the first service can be different, such as 1Gbps, 0.5Gbps, 1Gbps, 3Gbps, and 2Gbps, respectively, and the total load bandwidth usage of the hard disk domain is 7.5Gbps; the read load bandwidth usage of the five hard disks when processing the first service can be the same, such as 1.5Gbps, and the total load bandwidth usage of the hard disk domain is 7.5Gbps.

[0074] Optionally, the controller can determine the bandwidth usage of the load of the hard disk domain by statistically analyzing the load (workload) status of the hard disk domain when processing the corresponding business within a certain time period. For example, the controller determines that the bandwidth usage of the load of the hard disk domain 120 is 8Gbps by counting the load capacity of the hard disk domain 120 when processing the first business (such as reading and writing business data of the first business) in the first time period (taking 10 seconds as an example) as 80Gb; and determines that the bandwidth usage of the load of the hard disk domain 130 is 5Gbps by counting the load capacity of the hard disk domain 130 when processing the second business (such as reading and writing business data of the second business) in the second time period (which may be different from the first time period, taking 10 seconds as an example).

[0075] The bandwidth usage of the load may also be referred to as the total load bandwidth or any other name used to describe the sum of the read and write bandwidths of K hard disks in the hard disk domain, which is not limited in this application.

[0076] Step 230: Adjust the operating frequency of the K hard disks from the first frequency to a second frequency.

[0077] It should be understood that the controller adjusts the operating frequency of all hard disks in the hard disk domain, that is, K hard disks, from the first frequency to the second frequency. The first frequency is the operating frequency of the K hard disks in the hard disk domain when processing the first business. In the case where the bandwidth occupancy of the hard disk domain is greater than the preset hard disk read and write bandwidth threshold, the second frequency is greater than the first frequency, and in the case where the bandwidth occupancy of the hard disk domain is less than the preset hard disk read and write bandwidth threshold, the second frequency is less than the first frequency. In the case where method 200 includes step 210, the preset hard disk read and write bandwidth threshold may be the hard disk read and write bandwidth threshold corresponding to the first frequency as shown in Tables 2 to 4. In the case where method 200 does not include step 210, the preset hard disk read and write bandwidth threshold may be a hard disk read and write bandwidth threshold manually preset by the user based on the performance of the hard disk domain when it is at the first frequency.

[0078] For example, the first frequency and the second frequency may be any of the operating frequencies listed in Tables 2 to 4, such as the operating frequencies of the host controller, NAND, and DDR corresponding to the operating frequency levels of the hard disk shown in Table 4, or the specific operating frequencies of the host controller and DDR shown in Tables 2 and 3. The process of step 230 will be described in detail below in conjunction with Examples 1 to 3 and is not detailed here.

[0079] Therefore, the controller can determine the operating frequency of the hard disk in the hard disk domain that is suitable for the current business needs through step 230, thereby realizing the management of the power consumption of the hard disk domain. For example, in an IDLE scenario or a scenario with a small business load, the controller can reduce the operating frequency of the hard disk or components in the hard disk, such as the main controller and memory, and thereby reduce the power consumption of the hard disk as a whole or components in the hard disk, such as the main controller and memory, to ensure that the hard disk uses the minimum power consumption to meet the business performance requirements and realize hard disk energy saving. For another example, in a scenario with a high business load pressure, the controller can increase the operating frequency of the hard disk or components in the hard disk, such as the main controller and memory. Although the overall power consumption of the hard disk is high, it can ensure that the hard disk meets the business performance requirements to avoid waste of hard disk power consumption.

[0080] The following combination Figures 3 to 5 Examples 1 to 3 provided in this application are introduced to describe the specific process of step 230.

[0081] Example 1:

[0082] Figure 3 A schematic flow chart of step 230 shown in Example 1 is shown. For ease of description, the operating frequency of the hard disk domain when processing the first service is frequency #A, and frequency #A corresponds to the hard disk read / write bandwidth threshold #A. That is, the subsequent letters are used to briefly represent the corresponding relationship between the operating frequency and the hard disk read / write bandwidth threshold. Figure 3The steps shown include step 331 to step 337. For ease of description, the "bandwidth usage" hereinafter refers to the bandwidth usage of the hard disk domain when processing the first service.

[0083] Step 331: Figure 3 As shown, after obtaining the bandwidth occupancy of the hard disk domain in step 220, the controller first needs to determine whether the hard disk domain at frequency #A at this time can continue to meet the processing requirements of the first business, or to compare the bandwidth occupancy with the sum of the K hard disk read and write bandwidth thresholds #A of the K hard disks in the hard disk domain. In other words, in Example 1, the controller compares the bandwidth occupancy when the K hard disks process the first business (the sum of the K hard disks) with the sum of the hard disk performance values ​​of the K hard disks at frequency #A to determine whether the K hard disks can meet the performance requirements of the first business. When the K hard disks can meet the performance requirements of the first business, that is, when the sum of the K hard disk read and write bandwidth thresholds #A is not less than the bandwidth occupancy, the controller executes step 335; when the K hard disks cannot meet the performance requirements of the first business, that is, when the sum of the K hard disk read and write bandwidth thresholds #A is less than the bandwidth occupancy, the controller executes step 332.

[0084] Taking the correspondence shown in Table 4 as an example, frequency #A can be the frequency of the hard disk (or a component in the hard disk, such as the main controller or memory) corresponding to hard disk operating frequency level 6 shown in Table 4, and hard disk read / write bandwidth threshold #A can be 3 Gbps as shown in Table 4. If K is 10, the controller determines that the sum of the 10 hard disk read / write bandwidth thresholds #A for the 10 hard disks is 30 Gbps. If the total load capacity of K hard disks within a certain time period (such as 10s) is 500Gb, the controller determines that the bandwidth usage is 50Gbps, which is greater than the sum of the K hard disk read and write bandwidth thresholds #A of the K hard disks, and then determines that the current working frequency level 6 of the hard disks in the hard disk domain cannot meet the performance requirements of the first business, and the working frequency of the hard disks in the hard disk domain needs to be increased; if the total load capacity of K hard disks within a certain time period (such as 10s) is 200Gb, the controller determines that the bandwidth usage is 20Gbps, which is less than the sum of the K hard disk read and write bandwidth thresholds #A of the K hard disks, and then determines that the current working frequency level 6 of the hard disks in the hard disk domain can already meet the performance requirements of the first business, and there is no need to increase the working frequency level; similarly, when the bandwidth usage is 30Gbps, the current working frequency level 6 of the hard disks in the hard disk domain can already meet the performance requirements of the first business.

[0085] Step 332: Figure 3As shown, when the bandwidth usage is greater than the sum of the K hard disk read and write bandwidth thresholds #A, the controller can determine whether there is a hard disk read and write bandwidth threshold #B, so that the bandwidth usage is not greater than the sum of the K hard disk read and write bandwidth thresholds #B. In other words, the controller determines through step 332 that the hard disks in the hard disk domain need to be adjusted to or increased to an operating frequency. When there is a hard disk read and write bandwidth threshold #B so that the bandwidth usage is not greater than the sum of the K hard disk read and write bandwidth thresholds #B, the controller determines that the operating frequency of the K hard disks needs to be adjusted from frequency #A to a higher frequency #B, that is, executes step 334, to meet the performance requirements of the first business; when there is no hard disk read and write bandwidth threshold #B so that the bandwidth usage is not greater than the sum of the K hard disk read and write bandwidth thresholds #B, or in other words, the bandwidth usage exceeds the highest hard disk read and write bandwidth of the K hard disks, the controller determines that the operating frequency of the K hard disks is the highest operating frequency, that is, executes step 333, to meet the performance requirements of the first business as much as possible.

[0086] Based on the example described above, frequency #A can be the frequency of the hard disk (or a component in the hard disk, such as a main controller or memory) corresponding to hard disk operating frequency level 6 shown in Table 4, and the hard disk read / write bandwidth threshold #A can be 3Gbps as shown in Table 4. If K is 10, the controller determines that the sum of the 10 hard disk read / write bandwidth thresholds #A for the 10 hard disks is 30Gbps. For example, if the bandwidth usage is 40Gbps, the controller can traverse the hard disk read / write bandwidth thresholds in Table 4 and determine that the hard disk read / write bandwidth threshold of 4Gbps corresponding to the operating frequency level 8 meets the performance requirement of the bandwidth usage. That is, the sum of the K hard disk read / write bandwidth thresholds of 4Gbps is not less than the bandwidth usage. The controller then determines that the operating frequency of the K hard disks is adjusted or increased from operating frequency level 6 to operating frequency level 8. For another example, if the bandwidth usage is 34 Gbps, the controller can traverse the hard disk read and write bandwidth thresholds in Table 4 and determine that the hard disk read and write bandwidth threshold of 3.5 Gbps corresponding to the operating frequency level 7 meets the performance requirement of the bandwidth usage. That is, the sum of the 3.5 Gbps read and write bandwidth thresholds of the K hard disks is not less than the bandwidth usage. The controller then determines to adjust or increase the operating frequencies of the K hard disks from operating frequency level 6 to operating frequency level 7. For another example, if the bandwidth usage is 55 Gbps, the controller can traverse the hard disk read and write bandwidth thresholds in Table 4 and determine that the bandwidth usage is greater than the sum of the 5 Gbps read and write bandwidth thresholds of the K hard disks. That is, the hard disk read and write bandwidths of the K hard disks cannot meet the bandwidth usage requirement. The controller then determines to adjust or increase the operating frequencies of the K hard disks from operating frequency level 6 to the highest operating frequency level 10 to meet the performance requirement of the first service as much as possible.

[0087] Step 335: Figure 3As shown, when the bandwidth usage is not greater than the sum of the K hard disk read and write bandwidth thresholds #A, the controller can determine whether there is a hard disk read and write bandwidth threshold #C, so that the bandwidth usage is not greater than the sum of the K hard disk read and write bandwidth thresholds #C. In other words, the controller determines through step 335 whether there are hard disks in the hard disk domain that need to be adjusted to or reduced to an operating frequency to reduce the power consumption of the hard disk domain and achieve hard disk energy saving. When there is a hard disk read and write bandwidth threshold #C so that the bandwidth usage is not greater than the sum of the K hard disk read and write bandwidth thresholds #C, the controller determines that the operating frequency of the K hard disks needs to be adjusted from frequency #A to a lower frequency #C, that is, executes step 336, so as to reduce the power consumption of the hard disk by lowering the operating frequency; when there is no hard disk read and write bandwidth threshold #C so that the bandwidth usage is not greater than the sum of the K hard disk read and write bandwidth thresholds #C, or in other words, the operating frequency lower than frequency #A cannot meet the performance requirements of the first business, the controller determines that the operating frequency of the K hard disks remains unchanged at frequency #A, that is, executes step 337.

[0088] Based on the example described above, frequency #A can be the frequency of a hard disk (or a component in a hard disk, such as a main controller or memory) corresponding to hard disk operating frequency level 6 as shown in Table 4, and the hard disk read / write bandwidth threshold #A can be 3Gbps as shown in Table 4. If K is 10, the controller determines that the sum of the 10 hard disk read / write bandwidth thresholds #A for the 10 hard disks is 30Gbps. For example, if the bandwidth usage is 18Gbps, the controller can traverse the hard disk read / write bandwidth thresholds in Table 4 and determine that the hard disk read / write bandwidth threshold of 2Gbps corresponding to the operating frequency level 4 meets the performance requirement of the bandwidth usage. That is, the sum of the K hard disk read / write bandwidth thresholds of 2Gbps is not less than the bandwidth usage. The controller then determines that the operating frequency of the K hard disks is adjusted or reduced from operating frequency level 6 to operating frequency level 4. For another example, if the bandwidth usage is 27 Gbps, the controller can traverse the hard disk read and write bandwidth thresholds in Table 4 and determine that the hard disk read and write bandwidth thresholds corresponding to the working frequency levels 1 to 5 cannot meet the performance requirements of the bandwidth usage, that is, they are all less than the bandwidth usage. Then the controller determines that the working frequencies of the K hard disks remain unchanged at the working frequency level 6.

[0089] It should be understood that the highest operating frequency, frequency #B, and frequency #C in the above example can all be the second frequency mentioned in step 230, and frequency #A is the first frequency.

[0090] Optionally, in some embodiments of the present application, when the controller reduces the operating frequency of K hard disks, the amplitude of the reduction in operating frequency can be set. For example, taking the hard disk operating frequency levels shown in Table 4 as an example, if the controller determines that the operating frequency levels of K hard disks can be reduced from 8 to 4, the operating frequency levels of the K hard disks can be directly reduced to 4, or it can be reduced to 7 first, and then, based on the bandwidth occupancy of the load in a certain subsequent time period, it is determined whether to continue to reduce the operating frequency levels of the K hard disks to 6, and so on. In this way, it is possible to prevent the hard disk operating frequency from decreasing too much due to a short-term trough in the business, so that the hard disk cannot meet the performance requirements of subsequent businesses that are not in the trough.

[0091] Optionally, in some embodiments of the present application, when the controller needs to increase the operating frequency of K hard disks, it can choose to increase it to a higher operating frequency than expected to avoid sudden peaks in business. For example, taking the hard disk operating frequency levels shown in Table 4 as an example, if the controller determines that the operating frequency levels of K hard disks can be increased from 6 to 7, it can be directly increasing the operating frequency levels of the K hard disks to 7, or directly increasing them to 8 or 9 or other operating frequency levels higher than 7, and then determining whether to continue to reduce the operating frequency levels of the K hard disks to 7 based on the bandwidth occupancy of the load in a certain subsequent time period, and so on. In this way, frequent adjustments or frequent increases in the operating frequency of the hard disks caused by sudden outbreaks of business can be prevented, and the problem that the increase in the operating frequency of the hard disks still cannot meet the performance requirements of the burst business can be avoided.

[0092] Example 2:

[0093] Figure 4 A schematic flowchart of step 230 in Example 2 is shown, including steps 430 to 437. Unlike Example 1, which compares bandwidth usage with the sum of the read / write bandwidth thresholds for K hard drives, Example 2 determines the average bandwidth usage of each of the K hard drives based on the bandwidth usage and the K hard drives, and then compares the average bandwidth usage with the hard drive read / write bandwidth threshold. The steps in Example 2 are essentially the same as those in Example 1 and are only briefly described below.

[0094] Step 430: Unlike Example 1, in Example 2, after obtaining the bandwidth usage, the controller determines the average bandwidth usage of each of the K hard disks. For example, if the bandwidth usage is 30 Gbps and K is 10, the controller determines the average bandwidth usage of each hard disk to be 3 Gbps. This average bandwidth usage is used to compare with the hard disk read and write bandwidth thresholds shown in Tables 2 to 4.

[0095] Step 431: Figure 4As shown, after the controller determines the average bandwidth occupancy, the controller needs to compare the average bandwidth occupancy with the hard disk read and write bandwidth threshold #A corresponding to frequency #A. In other words, Example 2 replaces the comparison of the bandwidth occupancy in step 331 of the embodiment with the sum of the K hard disk read and write bandwidth threshold #A with the comparison of the average bandwidth occupancy with the hard disk read and write bandwidth threshold #A. When the K hard disks can meet the performance requirements of the first business, that is, the hard disk read and write bandwidth threshold #A is not less than the average bandwidth occupancy, the controller executes step 435; when the K hard disks cannot meet the performance requirements of the first business, that is, the hard disk read and write bandwidth threshold #A is less than the average bandwidth occupancy, the controller executes step 432.

[0096] Step 432: Figure 4 As shown, when the average bandwidth occupancy is greater than the hard disk read and write bandwidth threshold #A, the controller can determine whether there is a hard disk read and write bandwidth threshold #B, so that the average bandwidth occupancy is not greater than the hard disk read and write bandwidth threshold #B. In other words, the controller determines through step 432 that the hard disks in the hard disk domain need to be adjusted to or increased to an operating frequency. When there is a hard disk read and write bandwidth threshold #B so that the average bandwidth occupancy is not greater than the hard disk read and write bandwidth threshold #B, the controller determines that the operating frequency of the K hard disks needs to be adjusted from frequency #A to a higher frequency #B, that is, executes step 434, to meet the performance requirements of the first business; when there is no hard disk read and write bandwidth threshold #B so that the average bandwidth occupancy is not greater than the hard disk read and write bandwidth threshold #B, or when the bandwidth occupancy exceeds the highest hard disk read and write bandwidth of the K hard disks, the controller determines that the operating frequency of the K hard disks is the highest operating frequency, that is, executes step 433, to meet the performance requirements of the first business as much as possible.

[0097] Step 435: Figure 4 As shown, when the average bandwidth occupancy is not greater than the hard disk read and write bandwidth threshold #A, the controller can determine whether there is a hard disk read and write bandwidth threshold #C, so that the average bandwidth occupancy is not greater than the sum of the hard disk read and write bandwidth threshold #C. In other words, the controller determines through step 435 whether there are hard disks in the hard disk domain that need to be adjusted to or reduced to an operating frequency to reduce the power consumption of the hard disk domain and achieve hard disk energy saving. When there is a hard disk read and write bandwidth threshold #C so that the average bandwidth occupancy is not greater than the hard disk read and write bandwidth threshold #C, the controller determines that the operating frequency of the K hard disks needs to be adjusted from frequency #A to a lower frequency #C, that is, execute step 436, so as to reduce the power consumption of the hard disk by lowering the operating frequency; when there is no hard disk read and write bandwidth threshold #C so that the average bandwidth occupancy is not greater than the hard disk read and write bandwidth threshold #C, or in other words, the operating frequency lower than frequency #A cannot meet the performance requirements of the first business, the controller determines that the operating frequency of the K hard disks remains unchanged at frequency #A, that is, execute step 437.

[0098] The specific solution of Example 2 can refer to the description of Example 1 and will not be repeated here.

[0099] Example 3:

[0100] Figure 5 A schematic diagram of adjusting the operating frequency is shown in Example 3. Unlike the multiple comparisons of bandwidth usage or average bandwidth usage with the hard disk read / write bandwidth threshold in Examples 1 and 2, the controller can directly determine the hard disk read / write bandwidth threshold interval within which the bandwidth usage or average bandwidth usage falls, and determine a second frequency that meets the service requirements.

[0101] For example, Figure 5 The figure shows the fitting curve of the hard disk domain's operating frequency and the hard disk read / write bandwidth threshold. The vertical axis is the total hard disk read / write bandwidth threshold of K hard disks or the sum of the K hard disk read / write bandwidth thresholds. The fitting curve of a single hard disk's operating frequency and the hard disk read / write bandwidth threshold (for example, the maximum hard disk read / write bandwidth at any operating frequency) can be determined by the corresponding relationship between the hard disk's operating frequency and hard disk performance obtained through experimental testing. For ease of description, Figure 5 The fitting curve in is a straight line. In other embodiments of the present application, the fitting curve can also be an arbitrary curve, which is not limited in the present application. Based on the fitting curve, the corresponding relationship between multiple operating frequencies of a single hard disk and multiple hard disk read and write bandwidth thresholds as shown in Tables 2 to 4 can be determined. The fitting curve of the hard disk domain can be determined by the sum of the hard disk read and write bandwidth thresholds of K hard disks, that is, the superposition of K hard disks. Figure 5 As shown in the figure, multiple operating frequencies and multiple hard disk read and write bandwidth thresholds divide the fitting curve into multiple intervals. The controller can be located in the Figure 5 Alternatively, the controller may determine the operating frequency of the K hard disks based on the operating frequency corresponding to the higher end of the interval where the bandwidth usage is located.

[0102] In other embodiments of the present application, Figure 5 The vertical axis shown can be the hard disk read and write bandwidth threshold of a single hard disk, and the controller can be located according to the average bandwidth usage. Figure 5 The interval positions in the multiple intervals shown determine the operating frequencies of the K hard disks.

[0103] The following describes the specific solution of embodiment 3 by taking the operating frequency of the hard disk domain when processing the first service as frequency #3 as an example.

[0104] For example, when the controller determines that the bandwidth usage is at Figure 5When the triangle is positioned as shown, that is, between thresholds #2 and #3, the controller can determine that the operating frequency of the K hard drives is frequency #3, corresponding to threshold #3. In other words, the controller can determine that the hard drives' operating frequencies meet the performance requirements of the first service at the original frequency #3, but cannot meet the performance requirements of the first service at frequency #2. Therefore, the controller determines that the operating frequencies of the K hard drives need to remain unchanged at the original frequency #3.

[0105] For another example, when the controller determines that the bandwidth usage is Figure 5 When the circular position shown is between threshold #3 and threshold #4, the controller can determine that the operating frequency of the K hard disks is frequency #4 corresponding to threshold #4. In other words, the controller can determine that the operating frequency of the K hard disks does not meet the performance requirements of the first business when it is the original frequency #3, but meets the performance requirements of the first business when it is the frequency #4. Therefore, the operating frequency of the K hard disks needs to be increased to frequency #4 or frequency #5 which is higher than frequency #4. Similarly, when the controller determines that the bandwidth usage is between Figure 5 When the rectangular position shown is between thresholds #4 and #5, the controller can determine that the operating frequency of the K hard drives is frequency #5, corresponding to threshold #5. In other words, it can be determined that the operating frequency of the K hard drives does not meet the performance requirements of the first service at the original frequency #3, but does meet the performance requirements of the first service at frequency #5. Therefore, the operating frequency of the K hard drives needs to be increased to frequency #5.

[0106] For another example, when the controller determines that the bandwidth usage is Figure 5 When it is in the trapezoidal position shown, that is, in the interval after the threshold #5, it can be determined that the operating frequency of the K hard disks does not meet the performance requirements of the first business when it is the original frequency #3, and the operating frequency does not meet the performance requirements of the first business when it is the highest frequency #5. Therefore, the operating frequency of the K hard disks needs to be increased to frequency #5 to meet the business needs as much as possible.

[0107] For another example, when the controller determines that the bandwidth usage is Figure 5 When the bandwidth usage is in the hexagonal position shown, that is, in the interval between threshold #1 and threshold #2, the controller can determine that the operating frequency of the K hard disks is frequency #2 corresponding to threshold #2. In other words, it can be determined that the performance requirements of the first service are met when the operating frequency of the hard disk is the original frequency #3, but there will be additional power waste. Therefore, the controller determines that the operating frequency of the K hard disks can be reduced from the original frequency #3 to frequency #2. Similarly, when the controller determines that the bandwidth usage is in the interval between 0 and threshold #1, it can be determined that the operating frequency of the K hard disks can be reduced from the original frequency #3 to frequency #2 or frequency #1 which is lower than frequency #2, etc.

[0108] In order to further increase the energy-saving granularity and thus save energy more efficiently, when the controller reduces the operating frequency of K hard disks to the minimum operating frequency shown in Tables 2 to 4, or when the bandwidth occupancy is 0 or lower than the preset lower limit threshold, an embodiment of the present application also proposes a method for managing hard disk power consumption.

[0109] Currently, the disk domain's background tasks periodically issue commands to query drive information (such as temperature and smart tests). These tests can cause additional power consumption in the disk domain. To eliminate this additional power consumption, when the operating frequency of the K hard drives is the minimum frequency shown in Tables 2 to 4, the controller can control the execution time of background tasks. When the disk domain's bandwidth usage is 0 (no production tasks) or below a preset lower threshold, the controller can instruct the K hard drives not to execute background task commands. At this point, the K hard drives will not receive any I / O from the host, achieving optimal energy savings.

[0110] Combined with the above Figures 1 to 5 The method for controlling a storage device according to an embodiment of the present application is described in detail. Figure 6 and Figure 7 The device of the embodiment of the present application is described in detail. It should be noted that, Figure 6 and Figure 7 The device shown can implement each step in the above method, and for the sake of brevity, it will not be described again here.

[0111] Figure 6 Schematic diagram of a controller according to an embodiment of the present application. Figure 6 The controller 600 shown can implement Figure 2 、 Figure 3 、 Figure 4 In other words, the steps in Example 1 to Example 3 can be implemented. Figure 6 The controller 600 shown includes an acquisition unit 610 and a processing unit 620 .

[0112] An acquiring unit 610 is configured to acquire a bandwidth usage of a load of the disk domain when processing a first service, where the bandwidth usage of the load is the sum of the bandwidth usages of the loads of the K disks when processing the first service, and the operating frequency of the K disks in the disk domain when processing the first service is a first frequency.

[0113] The processing unit 620 is used to adjust the operating frequency of the K hard disks from the first frequency to the second frequency, wherein when the bandwidth occupancy of the hard disk domain is greater than a preset hard disk read and write bandwidth threshold, the second frequency is greater than the first frequency; when the bandwidth occupancy of the hard disk domain is less than the preset hard disk read and write bandwidth threshold, the second frequency is less than the first frequency.

[0114] In an optional embodiment, the acquisition unit 610 and the processing unit 620 may be a processor 720, and the controller may further include an input / output interface 730 and a memory 710, as shown in FIG. Figure 7 shown.

[0115] Figure 7 It is a schematic block diagram of a controller according to another embodiment of the present application. Figure 7 The controller 700 shown may include: a memory 710, a processor 720, and an input / output interface 730. The memory 710, the processor 720, and the input / output interface 730 are connected via a communication connection. The memory 710 is used to store program instructions, and the processor 720 is used to execute the program instructions stored in the memory 720 to control the input / output interface 730 to receive input data and information and output data such as operation results. The data and information received by the input / output interface 730 may be stored in a hard disk.

[0116] It should be understood that in the embodiment of the present application, the processor 720 can adopt a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiment of the present application.

[0117] The memory 710 may include a read-only memory and a random access memory, and provides instructions and data to the processor 720. A portion of the processor 720 may also include a non-volatile random access memory. For example, the processor 720 may also store information about the device type.

[0118] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor 720 or by instructions in the form of software. The method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 710, and the processor 720 reads the information in the memory 710 and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.

[0119] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0120] It should also be understood that in the embodiments of the present application, the hard disk drive (HDD) serves as one of the storage media for the primary site and the backup site, and can be a solid state disk (SSD), a mechanical hard disk (mechanical hard disk), a hybrid hard disk (SSHD), etc.

[0121] It should also be understood that in the embodiments of the present application, the memory may include read-only memory and random access memory, and provide instructions and data to the processor. A portion of the processor may also include non-volatile random access memory. For example, the processor may also store device type information.

[0122] It should be understood that in the embodiments of the present application, "B corresponding to A" means that B is associated with A and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based solely on A, but B can also be determined based on A and / or other information.

[0123] It should be understood that the term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0124] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0125] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0126] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0128] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be read by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0129] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for controlling a storage device, characterized in that: The storage device includes a controller and a hard disk domain, the hard disk domain includes K hard disks, where K is a positive integer greater than 1, and the method includes: The controller obtains a bandwidth occupancy of a load of the hard disk domain when processing a first service, where the bandwidth occupancy of the load is the sum of the bandwidth occupancy of the loads of the K hard disks when processing the first service, and the operating frequency of the K hard disks in the hard disk domain when processing the first service is a first frequency; The controller adjusts the operating frequency of the K hard disks from the first frequency to a second frequency, wherein when the bandwidth occupancy of the hard disk domain is greater than a preset hard disk read and write bandwidth threshold, the second frequency is greater than the first frequency; and when the bandwidth occupancy of the hard disk domain is less than the preset hard disk read and write bandwidth threshold, the second frequency is less than the first frequency.

2. The method according to claim 1, characterized in that Before adjusting the operating frequencies of the K hard disks from the first frequency to the second frequency, the method further includes: The controller obtains a correspondence between multiple operating frequencies of the hard disk and multiple preset hard disk read / write bandwidth thresholds, the multiple operating frequencies corresponding to the multiple hard disk read / write bandwidth thresholds one-to-one and positively correlated, and a bandwidth occupancy of a load of the hard disk at any operating frequency among the multiple operating frequencies is not greater than the corresponding hard disk read / write bandwidth threshold, the multiple operating frequencies including the first frequency and the second frequency; Among them, the first frequency corresponds to the first hard disk read and write bandwidth threshold among the multiple hard disk read and write bandwidth thresholds, the second frequency corresponds to the second hard disk read and write bandwidth threshold among the multiple hard disk read and write bandwidth thresholds, and the bandwidth occupancy of the hard disk domain is not greater than the sum of the K second hard disk read and write bandwidth thresholds of the K hard disks. When the bandwidth occupancy of the hard disk domain is greater than the sum of the K first hard disk read and write bandwidth thresholds of the K hard disks, the second frequency is greater than the first frequency. When the bandwidth occupancy of the hard disk domain is less than the sum of the K first hard disk read and write bandwidth thresholds of the K hard disks, the second frequency is less than the first frequency.

3. The method according to claim 1 or 2, characterized in that When the bandwidth usage of the hard disk domain is 0 or less than a preset lower threshold, the method further includes: The controller stops execution of a background task of the storage device.

4. The method according to any one of claims 1 to 3, characterized in that The hard disk includes a main controller and / or a memory, and the controller adjusts the operating frequency of the K hard disks from the first frequency to the second frequency, including: The controller adjusts the operating frequency of the main controller and / or memory of each of the K hard disks to the second frequency.

5. The method according to any one of claims 1 to 4, characterized in that The bandwidth usage of the hard disk domain is the bandwidth usage of the load when the hard disk domain processes the first service in the first time period.

6. The method according to any one of claims 1 to 5, characterized in that The storage device is a storage array or a storage server.

7. A controller, characterized in that: The controller is applied to a storage device, the storage device further comprising a hard disk domain, the hard disk domain comprising K hard disks, where K is a positive integer greater than 1, and the controller comprises: an acquiring unit, configured to: acquire a bandwidth occupancy of a load of the hard disk domain when processing a first service, where the bandwidth occupancy of the load is the sum of the bandwidth occupancy of the loads of the K hard disks when processing the first service, and the operating frequency of the K hard disks in the hard disk domain when processing the first service is a first frequency; A processing unit is used to: adjust the operating frequency of the K hard disks from the first frequency to a second frequency, wherein when the bandwidth occupancy of the hard disk domain is greater than a preset hard disk read and write bandwidth threshold, the second frequency is greater than the first frequency; when the bandwidth occupancy of the hard disk domain is less than the preset hard disk read and write bandwidth threshold, the second frequency is less than the first frequency.

8. The controller according to claim 7, characterized in that Before the processing unit adjusts the operating frequencies of the K hard disks from the first frequency to the second frequency, the acquiring unit is further configured to: Obtaining a correspondence between multiple operating frequencies of the hard disk and multiple preset hard disk read / write bandwidth thresholds, where the multiple operating frequencies correspond to the multiple hard disk read / write bandwidth thresholds one-to-one and are positively correlated, and a bandwidth occupancy of a load of the hard disk at any operating frequency among the multiple operating frequencies is not greater than the corresponding hard disk read / write bandwidth threshold, the multiple operating frequencies including the first frequency and the second frequency; Among them, the first frequency corresponds to the first hard disk read and write bandwidth threshold among the multiple hard disk read and write bandwidth thresholds, the second frequency corresponds to the second hard disk read and write bandwidth threshold among the multiple hard disk read and write bandwidth thresholds, and the bandwidth occupancy of the hard disk domain is not greater than the sum of the K second hard disk read and write bandwidth thresholds of the K hard disks. When the bandwidth occupancy of the hard disk domain is greater than the sum of the K first hard disk read and write bandwidth thresholds of the K hard disks, the second frequency is greater than the first frequency. When the bandwidth occupancy of the hard disk domain is less than the sum of the K first hard disk read and write bandwidth thresholds of the K hard disks, the second frequency is less than the first frequency.

9. The controller according to claim 7 or 8, characterized in that: When the bandwidth usage of the hard disk domain is 0 or less than a preset lower threshold, the processing unit is further configured to: Stop the execution of the background task of the storage device.

10. The controller according to any one of claims 7 to 9, characterized in that: The hard disk includes a main controller and / or a memory, and the processing unit is specifically configured to: The operating frequency of the main controller and / or memory of each of the K hard disks is adjusted to the second frequency.

11. The controller according to any one of claims 7 to 10, characterized in that: The bandwidth usage of the hard disk domain is the bandwidth usage of the load when the hard disk domain processes the first service in the first time period.

12. The controller according to any one of claims 7 to 11, characterized in that: The storage device is a storage array or a storage server.

13. A storage device, characterized in that: include: A processor and a memory, the memory being used to store a program or code, and the processor being used to call and run the program or code from the memory to execute the method according to any one of claims 1 to 6.

14. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device, the computing device is caused to perform the method according to any one of claims 1 to 6.

15. A computer-readable medium, characterized in that The method comprises computer program instructions, which, when executed on a computing device, cause the computing device to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Memory frequency switching device and method

    CN112540665A

  • DDR memory frequency adjustment method, computer device and computer readable storage medium

    CN114020215A

  • Data transmission path switching method and device, storage medium and electronic equipment

    CN116708304A