Control methods and apparatus for storage devices, storage media and electronic devices

By acquiring transmission bandwidth values ​​in real time and adjusting the number of access operations on the storage device, the problem of low control efficiency of the storage device when the transmission link is abnormal is solved, the control efficiency and concurrent access performance of the storage device are improved, and the stability of the service is ensured.

CN117762333BActive Publication Date: 2026-11-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311776360.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-21
Publication Date
2026-11-17
Estimated Expiration
2043-12-21

AI Technical Summary

Technical Problem

In existing technologies, storage devices lack automatic emergency handling mechanisms when transmission links fail, resulting in low control efficiency and impacting storage performance and service stability.

Method used

By acquiring the current value of the transmission bandwidth in real time when the server performs parallel access operations on the storage device through the controller, and determining the target number based on the current value and the maximum allowed bandwidth, the system automatically prohibits some storage devices from performing access operations. This optimizes the number of storage devices performing parallel operations and ensures that efficient access can still be maintained when the transmission link bandwidth is reduced.

Benefits of technology

It enables automatic adjustment of storage device access operations when the transmission link bandwidth is reduced, improving the control efficiency and concurrent access performance of storage devices and ensuring the stable operation of services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117762333B_ABST
    Figure CN117762333B_ABST
Patent Text Reader

Abstract

This application provides a control method and apparatus for a storage device, a storage medium, and an electronic device. The method includes: during the process of a server performing parallel access operations on each storage device in a first group of storage devices through a controller, obtaining a first current value of a first maximum transmission bandwidth and obtaining a second current value of a second maximum transmission bandwidth; if the first current value is less than the second current value and the first current value is less than a preset first maximum value, determining a first target number based on the first current value and the value of the maximum allowed transmission bandwidth of each storage device in the first group of storage devices; if the number of storage devices included in the first group of storage devices is greater than the first target number, prohibiting the server from performing access operations on a first portion of the storage devices in the first group of storage devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a control method and apparatus for a storage device, a storage medium, and an electronic device. Background Technology

[0002] With the continuous growth of information, there are higher requirements for server storage performance. Machines paired with controllers can effectively improve data transmission rates. When anomalies occur in the storage link (or transmission link), such as bandwidth reduction or speed reduction, current technologies only report these anomalies and wait for manual intervention; there are no corresponding automatic emergency handling mechanisms, which understandably results in weak disaster recovery capabilities. Furthermore, controller anomalies can severely impact storage performance, and if manual intervention is not timely, service interruptions can easily occur.

[0003] When the bandwidth reduction or speed reduction anomalies of the device are non-intermittent contact problems and are due to the failure of the device itself, they cannot be recovered by methods such as replugging, reloading, and link restarting. For the storage controller, this will still form a link bottleneck and seriously affect the performance of storage devices (e.g., hard drives).

[0004] Understandably, storage devices have relatively low control efficiency in related technologies. Summary of the Invention

[0005] This application provides a method and apparatus for controlling a storage device, a storage medium, and an electronic device, to at least solve the problem of low control efficiency of storage devices in related technologies.

[0006] According to one embodiment of this application, a method for controlling a storage device is provided, comprising: during the process of a server performing parallel access operations on each storage device in a first group of storage devices through a controller, obtaining a first current value of a first maximum transmission bandwidth and obtaining a second current value of a second maximum transmission bandwidth, wherein the first maximum transmission bandwidth is the maximum transmission bandwidth allowed by a first transmission link between the server and the controller, and the second maximum bandwidth is the maximum transmission bandwidth allowed by a second transmission link between the controller and the first group of storage devices; and when the first current value is less than the second current value and the first current value is less than a preset first maximum value, adjusting the control method according to the first current value. A first target number is determined based on the maximum allowed transmission bandwidth of each storage device in the first group of storage devices. The first target number is the maximum number of storage devices that the server is allowed to execute the access operation in parallel when the first maximum transmission bandwidth is the first current value and the second maximum transmission bandwidth is the second current value. If the number of storage devices included in the first group of storage devices is greater than the first target number, the server is prohibited from executing the access operation on a first portion of the storage devices in the first group of storage devices. The number of storage devices in the first group of storage devices other than the first portion of storage devices is less than or equal to the first target number.

[0007] In an exemplary embodiment, determining the first target quantity based on the first current value and the maximum allowable transmission bandwidth of each storage device in the first group of storage devices includes: when the maximum allowable transmission bandwidth of each storage device in the first group of storage devices is the same, dividing the first current value by the maximum allowable transmission bandwidth of each storage device to obtain a first target ratio, and rounding the first target ratio down to obtain the first target quantity.

[0008] In an exemplary embodiment, obtaining the first current value of the first maximum transmission bandwidth includes: obtaining the number of transmission channels in normal working condition on the first transmission link to obtain a first channel number; when the first channel number is less than a preset first total number of channels, determining the first current value to be equal to the product of the first maximum value and a first quotient, wherein the first quotient is the value obtained by dividing the first channel number by the first total number of channels, the first total number of channels is the number of transmission channels included on the first transmission link, and the first maximum value is the value of the maximum transmission bandwidth allowed by the first transmission link when all transmission channels included on the first transmission link are in normal working condition.

[0009] In an exemplary embodiment, obtaining the number of transmission channels in normal working condition on the first transmission link to obtain the first channel number includes: detecting whether the interface on the server and the interface on the controller connected to each transmission channel on the first transmission link are in normal working condition; and determining the first channel number as the difference obtained by subtracting the partial number from the total number of the first channels when it is detected that the interface on the server or the interface on the controller connected to a portion of the transmission channels on the first transmission link is not in normal working condition.

[0010] In one exemplary embodiment, prohibiting the server from performing the access operation on a first portion of the storage devices in the first group of storage devices includes: determining the priority of each storage device in the first group of storage devices based on the priority of the data stored in each storage device, wherein a higher priority of the data stored in each storage device in the first group of storage devices results in a higher priority of each storage device in the first group of storage devices; determining the first portion of storage devices from the first group of storage devices based on the priority of each storage device in the first group of storage devices, wherein the priority of each storage device in the first portion of storage devices is lower than the priority of the storage devices in the first group of storage devices other than the first portion of storage devices; or obtaining the amount of data that is not accessed in each storage device when the access operation is performed on each storage device in the first group of storage devices; determining the first portion of storage devices from the first group of storage devices based on the amount of data that is not accessed in each storage device, wherein the amount of data that is not accessed in each storage device in the first portion of storage devices is higher than the amount of data that is not accessed in the storage devices in the first group of storage devices other than the first portion of storage devices.

[0011] In an exemplary embodiment, prohibiting the server from performing the access operation on a first portion of the storage devices in the first group of storage devices includes: controlling the first portion of storage devices to stop working; or setting the first portion of storage devices to a state where the access operation is prohibited; or disconnecting the branch link corresponding to the first portion of storage devices in the group of storage devices when the controller communicates with the i-th storage device in the group of storage devices through the second transmission link and the i-th branch link in the group of branch links, where i is a positive integer.

[0012] In an exemplary embodiment, after obtaining a first current value of a first maximum transmission bandwidth and a second current value of a second maximum transmission bandwidth, the method further includes: when the first current value is greater than the second current value and the second current value is less than a preset second maximum value, determining a second target number based on the second current value and the maximum allowed transmission bandwidth of each storage device in the first group of storage devices, wherein the second target number is the maximum number of storage devices that the server is allowed to execute the access operation in parallel when the first maximum transmission bandwidth is equal to the first current value and the second maximum transmission bandwidth is equal to the second current value; when the number of storage devices included in the first group of storage devices is greater than the second target number, prohibiting the server from executing the access operation on a second portion of the storage devices in the first group of storage devices, wherein the number of storage devices in the first group of storage devices other than the second portion of storage devices is less than or equal to the second target number.

[0013] According to another embodiment of this application, a control device for a storage device is provided, comprising: an acquisition module, configured to acquire a first current value of a first maximum transmission bandwidth and a second current value of a second maximum transmission bandwidth during a process in which a server performs parallel access operations on each storage device in a first group of storage devices through a controller, wherein the first maximum transmission bandwidth is the maximum transmission bandwidth allowed by a first transmission link between the server and the controller, and the second maximum bandwidth is the maximum transmission bandwidth allowed by a second transmission link between the controller and the first group of storage devices; and a determination module, configured to, when the first current value is less than the second current value and the first current value is less than a preset first maximum value, determine the value based on the first current value. The first target number is determined by the current value and the maximum allowed transmission bandwidth of each storage device in the first group of storage devices, wherein the first target number is the maximum number of storage devices that the server is allowed to execute the access operation in parallel when the first maximum transmission bandwidth is the first current value and the second maximum transmission bandwidth is the second current value; the prohibition module is used to prohibit the server from performing the access operation on a first portion of the storage devices in the first group of storage devices when the number of storage devices included in the first group of storage devices is greater than the first target number, wherein the number of storage devices in the first group of storage devices other than the first portion of storage devices is less than or equal to the first target number.

[0014] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.

[0015] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0016] This application addresses a situation where, during the parallel access operations performed by the server on each storage device in the first group of storage devices via the controller, the bandwidth of the first transmission link and / or the second transmission link may decrease. In such cases, by determining a first current value that allows the server to control the number of storage devices that can perform parallel access operations on the storage devices in the first group of storage devices (equivalent to a first target number), the application automatically prohibits a first portion of the storage devices in the first group of storage devices from performing access operations. The number of storage devices in the first group of storage devices excluding the first portion of storage devices is less than or equal to the first target number. In this way, even with reduced bandwidth in the transmission links, the application ensures that the server can perform parallel access operations on the storage devices in the first group of storage devices excluding the first portion of storage devices, and guarantees the concurrent access performance of the storage devices in the first group excluding the first portion of storage devices. Therefore, it solves the problem of low control efficiency of storage devices and achieves the effect of improving the control efficiency of storage devices. Attached Figure Description

[0017] Figure 1 This is a hardware structure block diagram of a server device for a storage device control method according to an embodiment of this application;

[0018] Figure 2 This is a flowchart of a control method for a storage device according to an embodiment of this application;

[0019] Figure 3 This is a schematic diagram illustrating an application scenario of an optional storage device control method according to an embodiment of this application;

[0020] Figure 4 This is a schematic diagram of an optional control method for a storage device according to an embodiment of this application. Figure 1 ;

[0021] Figure 5 This is a schematic diagram of an optional control method for a storage device according to an embodiment of this application. Figure 2 ;

[0022] Figure 6This is a structural block diagram of a control device for a storage device according to an embodiment of this application. Detailed Implementation

[0023] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0025] The methods and embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram of a server device for a storage device control method according to an embodiment of this application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0026] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the control method of the storage device in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to server devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the server device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0028] First, the terms used in the various embodiments of this application are explained as follows:

[0029] PCIe: Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard.

[0030] SAS: Serial Attached SCSI.

[0031] SATA: Serial ATA.

[0032] CPLD: Complex Programmable Logic Device.

[0033] BMC: Baseboard Management Controller.

[0034] This embodiment provides a method for controlling a storage device. Figure 2 This is a flowchart of a control method for a storage device according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:

[0035] Step S202: During the process of the server performing parallel access operations on each storage device in the first group of storage devices through the controller, the first current value of the first maximum transmission bandwidth is obtained, and the second current value of the second maximum transmission bandwidth is obtained. The first maximum transmission bandwidth is the maximum transmission bandwidth allowed by the first transmission link between the server and the controller, and the second maximum transmission bandwidth is the maximum transmission bandwidth allowed by the second transmission link between the controller and the first group of storage devices.

[0036] Step S204: When the first current value is less than the second current value and the first current value is less than a preset first maximum value, determine a first target number based on the first current value and the maximum transmission bandwidth allowed for each storage device in the first group of storage devices. The first target number is the maximum number of storage devices that the server can execute the access operation in parallel when the first maximum transmission bandwidth is the first current value and the second maximum transmission bandwidth is the second current value.

[0037] Step S206: If the number of storage devices included in the first group of storage devices is greater than the first target number, the server is prohibited from performing the access operation on the first part of the storage devices in the first group of storage devices, wherein the number of storage devices in the first group of storage devices other than the first part of the storage devices is less than or equal to the first target number.

[0038] Through the above steps, when the server performs parallel access operations on each storage device in the first group of storage devices through the controller, and the bandwidth of the first transmission link and / or the second transmission link may decrease, in such cases, a first current value is determined to allow the server to perform parallel access operations on the storage devices in the first group of storage devices (equivalent to a first target number). This automatically prohibits the first portion of storage devices in the first group of storage devices from performing access operations. Specifically, the number of storage devices in the first group other than the first portion of storage devices is less than or equal to the first target number. In this way, even when the transmission link experiences bandwidth reduction, the server is guaranteed to perform parallel access operations on the storage devices in the first group other than the first portion of storage devices, and the concurrent access performance of the storage devices in the first group other than the first portion of storage devices is guaranteed. Therefore, the problem of low control efficiency of storage devices can be solved, achieving the effect of improving the control efficiency of storage devices.

[0039] To better understand the application scenarios of the storage device control method in the embodiments of this application, the application scenarios of the storage device control method in the embodiments of this application will be explained and described below with reference to optional schematic diagrams, which may be applicable to, but are not limited to, the embodiments of this application.

[0040] Figure 3 This is a schematic diagram illustrating an application scenario of an optional storage device control method according to an embodiment of this application, such as... Figure 3As shown, taking, but not limited to, a first transmission link including a PCIe link, a second transmission link including a SAS link, and a first group of storage devices including hard disk 1, hard disk 2, ..., hard disk 10 as an example, the storage device control method in this application embodiment can be implemented through, but not limited to, the following steps:

[0041] In step S302, during the parallel access operation of each storage device in the first group of storage devices by the controller in the server (e.g., CPU), a first current value of the first maximum transmission bandwidth is obtained, and a second current value of the second maximum transmission bandwidth is obtained. The first maximum transmission bandwidth is the maximum transmission bandwidth allowed by the first transmission link (e.g., PCIE link) between the server and the controller, and the second maximum transmission bandwidth is the maximum transmission bandwidth allowed by the second transmission link (e.g., SAS link) between the controller and the first group of storage devices.

[0042] Step S304: When the first current value is less than the second current value and the first current value is less than the preset first maximum value, determine the first target number based on the first current value and the maximum transmission bandwidth allowed for each storage device in the first group of storage devices. The first target number is the maximum number of storage devices that the server can perform access operations in parallel when the first maximum transmission bandwidth is the first current value and the second maximum transmission bandwidth is the second current value. For example, the first target number is 7.

[0043] Step S306: If the number of storage devices included in the first group of storage devices (e.g., 10) is greater than the first target number (e.g., the first target number is 7), the server is prohibited from performing access operations on the first part of the storage devices in the first group of storage devices. The number of storage devices in the first group of storage devices other than the first part of the storage devices is less than or equal to the first target number (e.g., the first target number is 7). For example, the server is prohibited from performing access operations on three hard disks among hard disk 1, hard disk 2, ..., hard disk 10.

[0044] In this way, when an anomaly in the storage link is detected, the link bottleneck (equivalent to the smaller of the first and second current values) is first calculated to determine the scope of the impact. If there is no impact, fault tolerance is maintained and a warning is issued, and the machine continues to run. If the impact is severe, an emergency fault tolerance strategy is adopted, prioritizing the concurrent performance of a portion of hard drives (equivalent to the storage devices other than the first part of the storage devices in the first group of storage devices), calculating and retaining the maximum number of hard drives under the bottleneck limit (equivalent to the first target number), and temporarily shielding the remaining hard drives to ensure service operation.

[0045] In the technical solution provided in step S202 above, each storage device in the first group of storage devices may be used, but is not limited to, for storing data corresponding to the services running on the server. The first group of storage devices may include, but is not limited to, various types of hard disks (e.g., HDD, SSD), or memory such as RAM, ROM, etc. During the operation of the services on the server, the server may, but is not limited to, perform read operations and / or write operations in parallel on each storage device in the first group of storage devices through the controller. It can be understood that the server may, but is not limited to, perform read operations in parallel on the data stored in each storage device in the first group of storage devices through the controller, and the server may, but is not limited to, write data in parallel on each storage device in the first group of storage devices through the controller.

[0046] Optionally, in this embodiment, the controller acts as an intermediate link in the storage link (or transmission link), located between the server and the storage device. The controller may include, but is not limited to, PCIe devices or other devices. This application does not impose any restrictions on this. When the server performs parallel read operations on the data stored in each storage device in the first group of storage devices through the controller, the controller may, but is not limited to, transmit the data read from the data stored in each storage device in the first group of storage devices to the corresponding server. When the server writes data to each storage device in the first group of storage devices in parallel through the controller, the controller may, but is not limited to, transmit the data to be written to the corresponding storage device in the first group of storage devices.

[0047] Optionally, in this embodiment, storage performance is generally measured by throughput, i.e., the amount of data transmitted per unit time. For sequential read / write, the bandwidth is Megabytes per second (MB / s), referred to as Bandwidth (BW). The first and second transmission links may, but are not limited to, satisfying the corresponding transmission protocols. For example, the first transmission link may, but is not limited to, satisfying the PCIe protocol (e.g., PCIe 3.0, PCIe 4.0, etc.), and the second transmission link may, but is not limited to, satisfying the SAS protocol, etc. This application does not limit the transmission protocols satisfied by the first and second transmission links.

[0048] Optionally, in this embodiment, the maximum allowed transmission bandwidth of the first transmission link may be determined, but is not limited to, based on the controller's interface type and the theoretical peak bandwidth, and the maximum allowed transmission bandwidth of the second transmission link may be determined, but is not limited to, based on the number of controller channels and the theoretical peak bandwidth. The number of controller channels and the bandwidth corresponding to the communication protocols satisfied by the transmission links are shown in Table 1.

[0049] Table 1

[0050]

[0051] For example, in Table 1, the first transmission link meets the PCIe 4.0 protocol, the second transmission link meets the SAS protocol, and the number of channels of the controller is 16. In this case, the first maximum transmission bandwidth of the first transmission link can be, but is not limited to, a theoretical value (e.g., 31520MB / s) or the actual value corresponding to the theoretical value (e.g., 31520MB / s; it should be noted that the actual value is not the bandwidth of the collected transmission channel, but the value corresponding to the theoretical value). The second maximum transmission bandwidth of the second transmission link is a theoretical value (e.g., 19200MB / s) or the corresponding actual value (e.g., 17200MB / s).

[0052] When the storage links are functioning normally, the bottleneck affecting storage performance lies in the lower bandwidth of the PCIe and SAS links. The PCIe link bottleneck is determined by the controller's PCIe interface type and PCIe speed. For an X8 Gen3 controller, the actual PCIe bottleneck is typically 6800MB / s (see Table 1). The SAS link bottleneck is determined by the controller's number of channels and SAS speed. Similarly, for SAS 3.0 and 8i controllers, the actual SAS bottleneck is typically 8600MB / s. Therefore, the performance bottleneck in this case is the PCIe link. Generally, the sequential read bandwidth of a single SATA HDD is approximately 250MB / s, and the maximum sequential read bandwidth of a single SATA SSD is 550MB / s. Therefore, to ensure concurrent performance across multiple drives, the maximum number of SATA HDDs that can be used is approximately 6800 / 250≈27, and the maximum number of SATA SSDs that can be used is approximately 6800 / 550≈12. In short, under normal circumstances, this storage link can be paired with a maximum of 27 SATA HDDs or a maximum of 12 SATA SSDs; otherwise, it will reach the link bottleneck, resulting in substandard hard drive performance.

[0053] In one exemplary embodiment, the first current value of the first maximum transmission bandwidth can be obtained, but is not limited to, by: obtaining the number of transmission channels in normal working condition on the first transmission link to obtain the first channel number; if the first channel number is less than the preset first total number of channels, determining the first current value as equal to the product of the first maximum value and the first quotient, wherein the first quotient is the value obtained by dividing the first channel number by the first total number of channels, the first total number of channels is the number of transmission channels included on the first transmission link, and the first maximum value is the value of the maximum transmission bandwidth allowed by the first transmission link when all transmission channels included on the first transmission link are in normal working condition.

[0054] Optionally, in this embodiment, the number of transmission channels in normal working condition on the first transmission link may change in real time. That is, the number of transmission channels in normal working condition on the first transmission link is not fixed. The first transmission link may malfunction, and the number of first channels may be less than the preset total number of first channels. It is understood that not all transmission channels in the first transmission link may be in normal working condition. In other words, the first transmission link may experience abnormalities such as bandwidth reduction. The total number of first channels is determined according to the transmission protocol satisfied by the transmission link. For example, if the first transmission link satisfies the PCIe 4.0 protocol and has 16 channels, then the number of first channels is 16.

[0055] Optionally, in this embodiment, when the number of first channels is equal to the preset total number of first channels, the first current value is determined to be equal to the first maximum value, wherein the first maximum value is the value of the maximum transmission bandwidth allowed by the first transmission link when all transmission channels included on the first transmission link are in normal working condition.

[0056] For example, if the first transmission link meets the PCIe 4.0 protocol, has 16 channels, and the first maximum value is 31520MB / s, then the first number of channels is 16. With 8 transmission channels in normal working condition, the first current value of the first maximum transmission bandwidth is 31520 × 8 ÷ 16 = 15760MB / s. In this way, the first current value of the first maximum transmission bandwidth is determined in real time based on the number of transmission channels in normal working condition, thus improving the real-time performance of the first current value of the first maximum transmission bandwidth.

[0057] In one exemplary embodiment, the number of transmission channels in normal working condition on the first transmission link can be obtained, but is not limited to, by the following method: detecting whether the interface on the server and the interface on the controller connected to each transmission channel on the first transmission link are in normal working condition; if it is detected that the interface on the server or the interface on the controller connected to a portion of the transmission channels on the first transmission link are not in normal working condition, the first channel number is determined as the difference between the total number of the first channels and the portion thereof.

[0058] Optionally, in this embodiment, if it is detected that the interfaces on the server and the controller connected to a portion of the transmission channels on the first transmission link are both in normal working condition, the number of the first channels is determined as the total number of the first channels.

[0059] Optionally, in this embodiment, the interfaces on the server and the controller connected to each transmission channel on the first transmission link may not all be in normal working condition. For example, the interfaces on the server may be loose or have poor contact, or the interfaces on the controller may be loose or have poor contact. Alternatively, the interfaces on the server and the controller connected to each transmission channel on the first transmission link may be well connected, but the transmission bandwidth of a number of transmission channels on the first transmission link may be less than or equal to a preset transmission bandwidth threshold. The preset transmission bandwidth threshold is the maximum transmission bandwidth allowed by the transmission channel when the transmission channel is in normal working condition.

[0060] In the technical solution provided in step S204 above, the bottleneck of the first transmission link and the second transmission link may include, but is not limited to, the smaller of the first current value and the second current value. If there is no abnormality in the first transmission link and the second transmission link, the first current value is less than the second current value and the first current value is equal to the preset first maximum value. In this case, the maximum number of storage devices that allow the server to perform access operations in parallel is determined as the first current value divided by the maximum transmission bandwidth allowed for each storage device.

[0061] Optionally, in this embodiment, if there are no abnormalities in the first transmission link and the second transmission link, and the second current value is less than the first current value and equal to the preset second maximum value, then the maximum number of storage devices that the server is allowed to perform access operations in parallel is determined as the second current value divided by the maximum transmission bandwidth allowed for each storage device.

[0062] Optionally, in this embodiment, if the first current value is less than the second current value and the first current value is less than the preset first maximum value, it can be understood that an anomaly has occurred in the transmission link, for example, the transmission link has experienced bandwidth reduction. In such a case, the bottleneck of the transmission link is the first current value. In this case, the first target number can be determined based on, but is not limited to, the first current value and the maximum transmission bandwidth allowed for each storage device in the first group of storage devices. In this way, the maximum number of storage devices that the server is allowed to perform access operations in parallel is determined based on the smaller value between the first current value and the second current value, avoiding the maximum number of storage devices that the server can perform access operations in parallel from exceeding the maximum transmission bandwidth allowed by the transmission link, and increasing the possibility of the server performing access operations in parallel.

[0063] Optionally, in this embodiment, each storage device in the first group of storage devices may, but is not limited to, belong to the same type of storage device, or belong to different types of storage devices. However, the maximum allowed transmission bandwidth of each storage device in the first group of storage devices may, but is not limited to, be the same. For example, the allowed sequential read bandwidth and sequential write bandwidth of each storage device in the first group of storage devices may, but is not limited to, be the same.

[0064] In one exemplary embodiment, the first target quantity can be determined, but is not limited to, by means of a first current value and the maximum allowable transmission bandwidth of each storage device in the first group of storage devices, in the case that the maximum allowable transmission bandwidth of each storage device in the first group of storage devices is the same, dividing the first current value by the maximum allowable transmission bandwidth of each storage device to obtain a first target ratio, and rounding the first target ratio down to obtain the first target quantity.

[0065] Optionally, in this embodiment, the first target ratio may not be a positive integer, that is, the first current value may not be divisible by the maximum transmission bandwidth allowed by each storage device. In such cases, the first target ratio may be rounded down to obtain the first target quantity, but is not limited to this.

[0066] For example, the first transmission link conforms to the PCIe 4.0 protocol with 16 channels and a first maximum bandwidth of 31520 MB / s. The second transmission link conforms to the SAS 3.0 protocol with 16 channels and a second maximum bandwidth of 19200 MB / s. If 8 channels in the first transmission link are in normal working condition, the first current value of the first maximum transmission bandwidth is 31520 × 8 ÷ 16 = 15760 MB / s. Since 16 channels in the second transmission link are in normal working condition, the second current value of the second maximum transmission bandwidth is 19200 MB / s. In this case, the maximum allowed transmission bandwidth per storage device is 300 MB / s, and the first target ratio is 15760 ÷ 300 = 52.5. Therefore, the first target number is set to 52. This method ensures that the server can perform parallel access operations on the first target number of storage devices in the first group, improving the efficiency of parallel access operations on the first target number of storage devices.

[0067] In the technical solution provided in step S206 above, if the number of storage devices included in the first group of storage devices is greater than the first target number, it indicates that the number of storage devices included in the first group of storage devices is greater than the number of storage devices that allow the server to perform access operations in parallel. In this case, the server is prohibited from performing access operations on the first part of the storage devices in the first group of storage devices. It can be understood that the server cannot perform read operations, write operations, or other access operations on the first part of the storage devices.

[0068] Optionally, in this embodiment, if the number of storage devices included in the first group of storage devices is less than or equal to the first target number, it can be indicated that although the transmission link has an anomaly, such as reduced bandwidth, the transmission link can still meet the server's requirement to perform parallel access operations on each storage device in the first group of storage devices. In such a case, a prompt message can be generated through BMC, which is used to indicate that the transmission link has an anomaly.

[0069] In this way, the server can perform parallel access operations on the storage devices in the first group of storage devices, excluding the first part of the storage devices. This ensures the concurrent performance of the storage devices in the first group of storage devices, excluding the first part of the storage devices, avoids data congestion, avoids affecting the operation of the business on the server, and improves the stability of the business operation on the server.

[0070] In one exemplary embodiment, the server may be prevented from performing the access operation on a first portion of the storage devices in the first group of storage devices by one of the following methods:

[0071] Method 1: Determine the priority of each storage device in the first group of storage devices based on the priority of the data stored in each storage device in the first group of storage devices. The higher the priority of the data stored in each storage device in the first group of storage devices, the higher the priority of each storage device in the first group of storage devices. Based on the priority of each storage device in the first group of storage devices, determine the first part of storage devices from the first group of storage devices, wherein the priority of each storage device in the first part of storage devices is lower than the priority of the storage devices in the first group of storage devices other than the first part of storage devices.

[0072] Optionally, in this embodiment, each storage device in the first group of storage devices may be used, but is not limited to, to store data required or generated by the services executed on the server. The services on the server may include, but are not limited to, core services and non-core services. Core services may include, but are not limited to, services with high real-time requirements and that are relatively important. Non-core services may include, but are not limited to, services with low real-time requirements or that are relatively unimportant. The higher the priority of the services executed on the server, the higher the priority of the data stored in the corresponding storage device in the first group of storage devices.

[0073] For example, if business 1 executed on the server is a core business and business 2 is a non-core business, then storage device 1, which stores the data required by business 1 and the data generated during the execution of business 1, has a higher priority than storage device 2, which stores the data required by business 2 and the data generated during the execution of business 2.

[0074] Method 2: Obtain the amount of unaccessed data in each storage device when the access operation is performed on each storage device in the first group of storage devices; determine the first part of storage devices from the first group of storage devices based on the amount of unaccessed data in each storage device, wherein the amount of unaccessed data in each storage device in the first part of storage devices is higher than the amount of unaccessed data in the storage devices other than the first part of storage devices in the first group of storage devices.

[0075] Optionally, in this embodiment, after prohibiting the server from performing access operations on the first portion of storage devices in the first group of storage devices, the method further includes: obtaining the amount of unaccessed data in each storage device in the first group of storage devices when performing access operations on each storage device in the first group of storage devices; determining a third portion of storage devices from the first group of storage devices based on the amount of unaccessed data in each storage device in the first group of storage devices, wherein the amount of unaccessed data in each storage device in the third portion of storage devices is higher than the amount of unaccessed data in the other storage devices in the first group of storage devices; prohibiting the server from performing access operations on the third portion of storage devices in the first group of storage devices, and allowing the server to perform access operations on the other storage devices in the first group of storage devices. In this way, access operations are first performed on storage devices with smaller amounts of unaccessed data in the first group of storage devices, saving time and improving the efficiency of the server performing access operations on storage devices.

[0076] In one exemplary embodiment, the server may be prohibited from performing access operations on a first portion of the storage devices in the first group of storage devices by, but not limited to, controlling the first portion of storage devices to stop working; or setting the first portion of storage devices to a state where the access operations are prohibited; or disconnecting the branch link corresponding to the first portion of storage devices in the group of storage devices when the controller communicates with the i-th storage device in the group of storage devices through the second transmission link and the i-th branch link in the group of branch links, where i is a positive integer.

[0077] Optionally, in this embodiment, the first part of the storage device can be controlled to stop working by powering down the first part of the storage device through a logic device (e.g., CPLD or FPGA (Field Programmable Gate Array) etc.).

[0078] Optionally, in this embodiment, the first part of the storage device may be set to a state where access operations are prohibited. It is understood that the first part of the storage device may still be in operation, but the server is no longer able to perform access operations on the first part of the storage device.

[0079] Optionally, in this embodiment, the second transmission link may be, but is not limited to, shared. The input of a set of branch links is connected to the output of the second transmission link, and the output of a set of branch links is connected to the input of a set of storage devices respectively. The branch link corresponding to the first part of the storage devices in a set of branch links may be disconnected, but is not limited to, disconnecting the connection between the branch link corresponding to the first part of the storage devices in a set of branch links and the first part of the storage devices.

[0080] In an exemplary embodiment, after obtaining a first current value of a first maximum transmission bandwidth and a second current value of a second maximum transmission bandwidth, the method further includes: when the first current value is greater than the second current value and the second current value is less than a preset second maximum value, determining a second target number based on the second current value and the maximum allowed transmission bandwidth of each storage device in the first group of storage devices, wherein the second target number is the maximum number of storage devices that the server is allowed to execute the access operation in parallel when the first maximum transmission bandwidth is equal to the first current value and the second maximum transmission bandwidth is equal to the second current value; when the number of storage devices included in the first group of storage devices is greater than the second target number, prohibiting the server from executing the access operation on a second portion of the storage devices in the first group of storage devices, wherein the number of storage devices in the first group of storage devices other than the second portion of storage devices is less than or equal to the second target number.

[0081] Optionally, in this embodiment, if the first current value is greater than the second current value and the second current value is less than the preset first maximum value, it is understood that an anomaly has occurred in the transmission link, for example, the transmission link has experienced bandwidth reduction. In such a case, the bottleneck of the transmission link is the second current value. In such a case, the second target quantity can be determined based on, but is not limited to, the second current value and the maximum transmission bandwidth allowed for each storage device in the first group of storage devices.

[0082] Optionally, in this embodiment, if the number of storage devices included in the first group of storage devices is greater than the second target number, it indicates that the number of storage devices included in the first group of storage devices is greater than the number of storage devices that allow the server to perform access operations in parallel. In this case, the server is prohibited from performing access operations on the second part of the storage devices in the first group of storage devices. It can be understood that the server cannot perform read operations, write operations, or other access operations on the second part of the storage devices.

[0083] Optionally, in this embodiment, if the number of storage devices included in the first group of storage devices is less than or equal to the second target number, it can be indicated that although the transmission link has an anomaly, such as reduced bandwidth, the transmission link can still meet the server's requirement to perform parallel access operations on each storage device in the first group of storage devices. In such a case, a prompt message can be generated through BMC, which is used to indicate that the transmission link has an anomaly.

[0084] In this way, the server can perform parallel access operations on all storage devices in the first group of storage devices except for the second group of storage devices, ensuring the concurrent performance of the storage devices in the first group of storage devices except for the second group of storage devices, avoiding data congestion, affecting the operation of business on the server, and improving the stability of business operation on the server.

[0085] As an optional example, determining the second target quantity based on the second current value and the maximum allowed transmission bandwidth of each storage device in the first group of storage devices includes: if the maximum allowed transmission bandwidth of each storage device in the first group of storage devices is the same, dividing the second current value by the maximum allowed transmission bandwidth of each storage device to obtain a second target ratio, and rounding the second target ratio down to obtain the second target quantity.

[0086] As an optional example, the second current value of the second maximum transmission bandwidth can be obtained, but is not limited to, by: obtaining the number of transmission channels in normal working condition on the second transmission link to obtain the second channel number; if the second channel number is less than the preset total number of second channels, determining the second current value as equal to the product of the second maximum value and the second quotient, wherein the second quotient is the value obtained by dividing the second channel number by the total number of second channels, the total number of second channels is the number of transmission channels included on the second transmission link, and the second maximum value is the value of the maximum transmission bandwidth allowed by the second transmission link when all transmission channels included on the second transmission link are in normal working condition.

[0087] As an optional example, obtaining the number of transmission channels in normal working condition on the second transmission link to obtain the second channel number includes: detecting whether the interface on the first group of storage devices and the interface on the controller connected to each transmission channel on the second transmission link are in normal working condition; if it is detected that the interface on the first group of storage devices or the interface on the controller connected to a portion of the transmission channels on the second transmission link are not in normal working condition, determining the second channel number as the difference obtained by subtracting a portion of the total number of the second channels.

[0088] As an optional example, prohibiting the server from performing the access operation on the second portion of storage devices in the first group of storage devices includes: determining the priority of each storage device in the first group of storage devices based on the priority of the data stored in each storage device, wherein the higher the priority of the data stored in each storage device in the first group of storage devices, the higher the priority of each storage device in the first group of storage devices; determining the second portion of storage devices from the first group of storage devices based on the priority of each storage device in the first group of storage devices, wherein the priority of each storage device in the second portion of storage devices is lower than the priority of the storage devices in the first group of storage devices other than the second portion of storage devices; or obtaining the amount of data that is not accessed in each storage device when the access operation is performed on each storage device in the first group of storage devices; determining the second portion of storage devices from the first group of storage devices based on the amount of data that is not accessed in each storage device, wherein the amount of data that is not accessed in each storage device in the second portion of storage devices is higher than the amount of data that is not accessed in the storage devices in the first group of storage devices other than the second portion of storage devices.

[0089] As an optional example, prohibiting the server from performing the access operation on the first part of the storage devices in the first group of storage devices includes: controlling the second part of the storage devices to stop working; or setting the second part of the storage devices to a state where the access operation is prohibited; or disconnecting the branch link corresponding to the second part of the storage devices in the group of storage devices when the controller communicates with the j-th storage device in the group of storage devices through the second transmission link and the j-th branch link in the group of branch links, where i is a positive integer.

[0090] To better understand the implementation process of the storage device control method in the embodiments of this application, the control method of the storage device in the embodiments of this application will be explained and described below in conjunction with optional embodiments, which may be applied to, but are not limited to, the embodiments of this application.

[0091] Figure 4 This is a schematic diagram of an optional control method for a storage device according to an embodiment of this application. Figure 1 ,like Figure 4As shown, the fault tolerance strategy needs to consider abnormal situations in the transmission link. For example, when the controller reduces bandwidth from X8 to X4, the PCIe bottleneck becomes 3400MB / s. At this time, a maximum of 3400 / 250≈13 SATA HDDs can be used. If the actual number of hard drives used by the machine is less than or equal to 13, the impact of the controller's bandwidth reduction is limited. The total bandwidth of the hard drive devices does not reach the link bottleneck, and the hard drive performance is not restricted. The BMC can display relevant warnings indicating that bandwidth reduction has occurred, and the machine continues to run. When the number of SATA HDDs used is greater than 13, in order to achieve optimal performance for multiple disk concurrency, the strategy stipulates that the extra disks are disabled. This can be done, but is not limited to, by powering down the extra hard drives in slot order via the CPLD. Starting from slot 0, 13 hard drives are retained, that is, slots 0 to 12 are retained, and the hard drives in slot 13 and beyond are powered down, and an anomaly is alerted through the BMC. This method serves as an emergency measure, ensuring that the total bandwidth of the working hard drives is within the link bottleneck range, while ensuring that the concurrent performance of each hard drive meets the standard, avoiding service interruption caused by congestion.

[0092] Figure 5 This is a schematic diagram of an optional control method for a storage device according to an embodiment of this application. Figure 2 ,like Figure 5 As shown, with the increasing number of high-performance application scenarios, the bandwidth and speed of controllers are also increasing. For example, for the X16 Gen48iSAS3.0 storage controller, the PCIe link bottleneck is 27200MB / s, and the SAS link bottleneck is 8600MB / s. At this time, the bottleneck of the storage link is the SAS link. If the controller reduces its bandwidth, such as from X16 to X8, the PCIe bottleneck becomes 13600MB / s, and the bottleneck of the storage link is still the SAS link. In this case, the reduced bandwidth of the controller will not limit the performance of the hard drive. On the other hand, high-bandwidth controllers need to be used with reduced bandwidth in special scenarios. At this time, it is also important to verify the stable operation of the function after the bandwidth reduction.

[0093] Taking a controller including a 9560-8i RAID card as an example, the first transmission link may include, but is not limited to, a PCIe link between the server's CPU and the 9560-8i RAID card, and the second transmission link may include, but is not limited to, a SAS link between the 9560-8i RAID card and a storage device (e.g., a SATA HDD).

[0094] 1. Simulate abnormal scenarios where the storage controller reduces bandwidth.

[0095] As a PCIe device, the bandwidth of a RAID card is allocated by IIO. The BIOS automatically adjusts the bandwidth allocation of the IIO PCIe ports under the socket through IIO Configuration. Generally, under the Intel x86 architecture, there are four IIO modules: IOU0: a PCIe 3 x 4 PCIe stack, usually connected to the PCH; IOU1, 2, and 3: all PCIe 3 x 16 PCIe stacks. IOU1, 2, and 3 can be split into IIO Root Ports of different bandwidths as needed. Taking the Broadcom 9560-8i RAID card as an example, the card's PCIe bandwidth is normally x8. To simulate a bandwidth reduction scenario, the RAID card's IIO Root port needs to be manually allocated to x4.

[0096] 2. Calculation of the maximum number of hard drives for fault tolerance

[0097] The 9560-8i RAID card has a PCIe bandwidth bottleneck of 12800MB / s and a SAS speed bottleneck of 9600MB / s. The link bottleneck is limited to 9600MB / s by the SAS speed bottleneck. Under the condition of meeting the performance requirements of SATA HDDs, it can be configured with a maximum of 9600 / 250≈38 hard drives. If the machine is actually configured with 38 SATA HDDs, and the RAID card experiences a bandwidth reduction anomaly, the link bottleneck becomes the PCIe bandwidth bottleneck of 6400MB / s. This can only support a maximum of 25 hard drives concurrently, while the remaining 13 hard drives cannot be served. In this case, we want to disable these 13 hard drives to prioritize the performance of the 25 concurrent hard drives, avoiding data congestion and service impact. Specifically, the hard drives in slots 0-24 can be retained according to slot order, while the hard drives in slots 25-37 can be powered down via the CPLD to achieve the desired disabling effect.

[0098] 3. Basic information check and hard disk I / O test

[0099] Check the LSPCI information in the system to see if the RAID card successfully reduced bandwidth as expected. Also, compare the number of hard drives to see if redundant drives are automatically disabled. Then, perform I / O tests on the existing hard drives under the RAID card.

[0100] (1) Performance test: under the condition of reduced bandwidth of RAID card, test whether the concurrent performance of hard disk meets the standard and determine whether the fault tolerance strategy is effective.

[0101] (2) Stress test: under the condition of reduced bandwidth of RAID card, verify whether the storage link is stable and whether there are any other abnormalities.

[0102] Through the embodiments of this application, it is ensured that when the storage controller experiences abnormal speed reduction or bandwidth reduction, the machine can make its own judgment. In particular, when encountering unrecoverable faults, it can perform emergency handling, improve timeliness, avoid service interruptions caused by waiting for manual handling, and realize real-time dynamic monitoring of transmission link bottlenecks. When encountering unrecoverable faults of the storage controller, it automatically handles them according to the strategy, prioritizing the concurrent performance of some storage devices and avoiding blockage.

[0103] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0104] This embodiment also provides a control device for a storage device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0105] Figure 6 This is a structural block diagram of the control device for a storage device according to an embodiment of this application, such as... Figure 6 As shown, the device includes:

[0106] The acquisition module 602 is used to acquire a first current value of a first maximum transmission bandwidth and a second current value of a second maximum transmission bandwidth during the process of the server performing parallel access operations on each storage device in the first group of storage devices through the controller. The first maximum transmission bandwidth is the maximum transmission bandwidth allowed by the first transmission link between the server and the controller, and the second maximum bandwidth is the maximum transmission bandwidth allowed by the second transmission link between the controller and the first group of storage devices.

[0107] The determining module 604 is configured to determine a first target quantity based on the first current value and the maximum allowed transmission bandwidth of each storage device in the first group of storage devices when the first current value is less than the second current value and the first current value is less than a preset first maximum value. The first target quantity is the maximum number of storage devices that the server is allowed to execute the access operation in parallel when the first maximum transmission bandwidth is the first current value and the second maximum transmission bandwidth is the second current value.

[0108] The blocking module 606 is used to block the server from performing the access operation on a first portion of the storage devices in the first group of storage devices when the number of storage devices included in the first group of storage devices is greater than the first target number, wherein the number of storage devices in the first group of storage devices other than the first portion of storage devices is less than or equal to the first target number.

[0109] In this embodiment of the application, when the server performs parallel access operations on each storage device in the first group of storage devices through the controller, and the bandwidth of the first transmission link and / or the second transmission link may decrease, in such cases, a first current value is determined to allow the server to perform parallel access operations on the storage devices in the first group of storage devices (equivalent to a first target number). This automatically prohibits a first portion of the storage devices in the first group of storage devices from performing access operations. The number of storage devices in the first group other than the first portion of storage devices is less than or equal to the first target number. In this way, even when the transmission link experiences bandwidth reduction, the server is guaranteed to perform parallel access operations on the storage devices in the first group other than the first portion of storage devices, and the concurrent access performance of the storage devices in the first group other than the first portion of storage devices is guaranteed. Therefore, the problem of low control efficiency of storage devices can be solved, achieving the effect of improving the control efficiency of storage devices.

[0110] In one exemplary embodiment, the determining module includes:

[0111] The first processing unit is configured to, when the maximum allowed transmission bandwidth of each storage device in the first group of storage devices is the same, divide the first current value by the maximum allowed transmission bandwidth of each storage device to obtain a first target ratio, and round down the first target ratio to obtain the first target quantity.

[0112] In one exemplary embodiment, the acquisition module includes:

[0113] The acquisition unit is used to acquire the number of transmission channels in normal working condition on the first transmission link, and obtain the first number of channels;

[0114] The first determining unit is configured to determine the first current value as equal to the product of the first maximum value and the first quotient when the number of the first channels is less than the preset total number of the first channels. The first quotient is the value obtained by dividing the number of the first channels by the total number of the first channels. The total number of the first channels is the number of transmission channels included on the first transmission link. The first maximum value is the value of the maximum transmission bandwidth allowed by the first transmission link when all the transmission channels included on the first transmission link are in normal working condition.

[0115] In one exemplary embodiment, the acquiring unit is configured to:

[0116] The system checks whether the interfaces on the server and the controller connected to each transmission channel on the first transmission link are in normal working order.

[0117] If it is detected that the interfaces on the server or the controller connected to a portion of the transmission channels on the first transmission link are not in normal working condition, the number of the first channels is determined as the difference between the total number of the first channels and the portion of the number.

[0118] In one exemplary embodiment, the blocking module includes:

[0119] The second processing unit is configured to determine the priority of each storage device in the first group of storage devices based on the priority of the data stored in each storage device in the first group of storage devices, wherein the higher the priority of the data stored in each storage device in the first group of storage devices, the higher the priority of each storage device in the first group of storage devices; and to determine the first portion of storage devices from the first group of storage devices based on the priority of each storage device in the first group of storage devices, wherein the priority of each storage device in the first portion of storage devices is lower than the priority of the storage devices in the first group of storage devices excluding the first portion of storage devices; or

[0120] The third processing unit is configured to obtain the amount of unaccessed data in each storage device when the access operation is performed on each storage device in the first group of storage devices; and to determine the first part of storage devices from the first group of storage devices based on the amount of unaccessed data in each storage device, wherein the amount of unaccessed data in each storage device in the first part of storage devices is higher than the amount of unaccessed data in the storage devices other than the first part of storage devices in the first group of storage devices.

[0121] In one exemplary embodiment, the blocking module includes:

[0122] The control unit is used to control the first part of the storage device to stop working; or

[0123] A setting unit is configured to set the first portion of the storage device to a state where the access operation is prohibited; or

[0124] The disconnection unit is used to disconnect the branch link corresponding to the first part of the storage devices in the group of storage devices when the controller communicates with the i-th storage device in the group of storage devices through the second transmission link and the i-th branch link in the group of branch links, where i is a positive integer.

[0125] In one exemplary embodiment, the device further includes:

[0126] The second determining unit is configured to, after obtaining a first current value of the first maximum transmission bandwidth and a second current value of the second maximum transmission bandwidth, determine a second target quantity based on the second current value and the maximum transmission bandwidth allowed for each storage device in the first group of storage devices, when the first current value is greater than the second current value and the second current value is less than a preset second maximum value. The second target quantity is the maximum number of storage devices that the server is allowed to execute the access operation in parallel when the first maximum transmission bandwidth is the first current value and the second maximum transmission bandwidth is the second current value.

[0127] The blocking unit is used to block the server from performing the access operation on the second part of the storage devices in the first group of storage devices when the number of storage devices included in the first group of storage devices is greater than the second target number, wherein the number of storage devices in the first group of storage devices other than the second part of the storage devices is less than or equal to the second target number.

[0128] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0129] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.

[0130] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), mobile storage device, magnetic disk, or optical disk.

[0131] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0132] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0133] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0134] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0135] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A method for controlling a storage device, characterized in that, include: During the process of the server performing parallel access operations on each storage device in the first group of storage devices through the controller, a first current value of the first maximum transmission bandwidth is obtained, and a second current value of the second maximum transmission bandwidth is obtained, wherein the first maximum transmission bandwidth is the maximum transmission bandwidth allowed by the first transmission link between the server and the controller, and the second maximum transmission bandwidth is the maximum transmission bandwidth allowed by the second transmission link between the controller and the first group of storage devices. When the first current value is less than the second current value and the first current value is less than the preset first maximum value, a first target number is determined based on the first current value and the maximum transmission bandwidth allowed for each storage device in the first group of storage devices. The first target number is the maximum number of storage devices that the server is allowed to execute the access operation in parallel when the first maximum transmission bandwidth is the first current value and the second maximum transmission bandwidth is the second current value. If the number of storage devices included in the first group of storage devices is greater than the first target number, the server is prohibited from performing the access operation on the first part of the storage devices in the first group of storage devices, wherein the number of storage devices in the first group of storage devices other than the first part of the storage devices is less than or equal to the first target number.

2. The method according to claim 1, characterized in that, Determining the first target quantity based on the first current value and the maximum allowed transmission bandwidth of each storage device in the first group of storage devices includes: If the maximum allowed transmission bandwidth of each storage device in the first group of storage devices is the same, the first current value is divided by the maximum allowed transmission bandwidth of each storage device to obtain the first target ratio, and the first target ratio is rounded down to obtain the first target quantity.

3. The method according to claim 1, characterized in that, The process of obtaining the first current value of the first maximum transmission bandwidth includes: Obtain the number of transmission channels that are in normal working condition on the first transmission link to obtain the first channel count; When the number of the first channels is less than the preset total number of the first channels, the first current value is determined to be equal to the product of the first maximum value and the first quotient, wherein the first quotient is the value obtained by dividing the number of the first channels by the total number of the first channels, the total number of the first channels is the number of transmission channels included on the first transmission link, and the first maximum value is the value of the maximum transmission bandwidth allowed by the first transmission link when all the transmission channels included on the first transmission link are in normal working condition.

4. The method according to claim 3, characterized in that, The step of obtaining the number of transmission channels in normal working condition on the first transmission link to obtain the first channel number includes: The system checks whether the interfaces on the server and the controller connected to each transmission channel on the first transmission link are in normal working order. If it is detected that the interfaces on the server or the controller connected to a portion of the transmission channels on the first transmission link are not in normal working condition, the number of the first channels is determined as the difference between the total number of the first channels and the portion of the number.

5. The method according to claim 1, characterized in that, Preventing the server from performing the access operation on the first portion of the storage devices in the first group of storage devices includes: Based on the priority of the data stored in each storage device in the first group of storage devices, the priority of each storage device in the first group of storage devices is determined. The higher the priority of the data stored in each storage device in the first group of storage devices, the higher the priority of each storage device in the first group of storage devices. Based on the priority of each storage device in the first group of storage devices, the first portion of storage devices is determined from the first group of storage devices, wherein the priority of each storage device in the first portion of storage devices is lower than the priority of the storage devices in the first group of storage devices excluding the first portion of storage devices; or Obtain the amount of unaccessed data in each storage device when the access operation is performed on each storage device in the first group of storage devices; determine the first part of storage devices from the first group of storage devices based on the amount of unaccessed data in each storage device, wherein the amount of unaccessed data in each storage device in the first part of storage devices is higher than the amount of unaccessed data in the storage devices other than the first part of storage devices in the first group of storage devices.

6. The method according to claim 1, characterized in that, The prohibition of the server from performing the access operation on the first portion of the storage devices in the first group of storage devices includes: Control the first part of the storage device to stop working; or Set the first portion of the storage device to a state where the access operation is prohibited; or When the controller communicates with the i-th storage device in the group of storage devices through the second transmission link and the i-th branch link in the group of branch links, the branch link corresponding to the first part of the storage devices in the group of branch links is disconnected, where i is a positive integer.

7. The method according to any one of claims 1 to 6, characterized in that, After obtaining the first current value of the first maximum transmission bandwidth and the second current value of the second maximum transmission bandwidth, the method further includes: When the first current value is greater than the second current value and the second current value is less than the preset second maximum value, a second target number is determined based on the second current value and the maximum transmission bandwidth allowed for each storage device in the first group of storage devices. The second target number is the maximum number of storage devices that the server is allowed to execute the access operation in parallel when the first maximum transmission bandwidth is the first current value and the second maximum transmission bandwidth is the second current value. If the number of storage devices included in the first group of storage devices is greater than the second target number, the server is prohibited from performing the access operation on the second part of the storage devices in the first group of storage devices, wherein the number of storage devices in the first group of storage devices other than the second part of the storage devices is less than or equal to the second target number.

8. A control device for a storage device, characterized in that, include: The acquisition module is used to acquire a first current value of a first maximum transmission bandwidth and a second current value of a second maximum transmission bandwidth during the process of the server performing parallel access operations on each storage device in the first group of storage devices through the controller. The first maximum transmission bandwidth is the maximum transmission bandwidth allowed by the first transmission link between the server and the controller, and the second maximum bandwidth is the maximum transmission bandwidth allowed by the second transmission link between the controller and the first group of storage devices. A determining module is configured to determine a first target number based on the first current value and the maximum allowed transmission bandwidth of each storage device in the first group of storage devices when the first current value is less than the second current value and the first current value is less than a preset first maximum value. The first target number is the maximum number of storage devices that the server is allowed to execute the access operation in parallel when the first maximum transmission bandwidth is equal to the first current value and the second maximum transmission bandwidth is equal to the second current value. A prohibiting module is configured to prohibit the server from executing the access operation on a first portion of the storage devices in the first group of storage devices when the number of storage devices included in the first group of storage devices is greater than the first target number. The number of storage devices in the first group of storage devices other than the first portion of storage devices is less than or equal to the first target number.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 7.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data processing method and device

    CN114385534A

  • Non-volatile memory express over fabric (nvme-oftm) solid-state drive (SSD) enclosure performance optimization using SSD controller memory buffer

    US20230161499A1