Hard disk speed optimization method, server, electronic equipment and storage medium

By obtaining the current speed of the hard disk in the target server and adjusting the firmware parameters of the NVMe hard disk according to the hard disk configuration information, the problem of the data transmission rate of the NVMe hard disk in the server not meeting the standard is solved, the stable operation of the hard disk at the Gen4 speed is achieved, and the server efficiency is improved. performance and reliability.

CN118550479BActive Publication Date: 2024-10-11INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411028009.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-10-11
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

In the existing technology, the data transmission rate of NVMe hard disks in servers does not meet the standard, which leads to the reduction of server data storage timeliness and data transmission performance, and there is a lack of effective optimization methods. Especially when equipped with hard disks from non-mainstream manufacturers, manual physical adjustment is required. Cable length or type reduces rate optimization efficiency.

Method used

By obtaining the current speed of the hard disk in the target server, determine the firmware parameter adjustment strategy based on the hard disk configuration information and speed optimization count value, perform link training actions to optimize the hard disk speed, and adjust the NVMe hard disk firmware parameters based on PCI link characteristics to ensure that the hard disk is Gen4 And stable operation at 16GT/S rate.

Benefits of technology

It improves the data transfer rate optimization efficiency of NVMe hard disks, ensures that the hard disks operate stably at Gen4 speed, solves the problem of speed reduction caused by signal attenuation, is suitable for a variety of manufacturers and server models, and improves the overall performance and reliability of the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550479B_ABST
    Figure CN118550479B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer technology, and discloses a hard disk rate optimization method, server, electronic device and storage medium, the method comprising: obtaining the current rate of any hard disk in the target server; when the current rate of the hard disk does not reach the preset standard, the hard disk is used as a hard disk to be optimized; according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized, the firmware parameter adjustment strategy of the hard disk to be optimized is determined; according to the firmware parameter adjustment strategy, the link training action is performed on the hard disk to be optimized to optimize the rate of the hard disk to be optimized. The method provided by the above scheme optimizes the data transmission rate of the NVMe hard disk by combining the PCI link characteristics represented by the hard disk configuration information of the target server, and adopts the method of adjusting the NVMe hard disk firmware parameters, thereby improving the rate optimization efficiency of the NVMe hard disk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a hard disk rate optimization method, a server, an electronic device and a storage medium. Background Art

[0002] At present, NVMe hard drives are widely used in the field of data storage due to their obvious advantages in data transmission and no need to worry about data loss after power failure. However, when a server is equipped with an NVMe hard drive from a non-mainstream manufacturer, the data transmission rate of the NVMe hard drive will not meet the standard.

[0003] In the related art, when it is determined that the data transmission rate of a certain NVMe hard disk does not meet the standard, the length or type of the physical cable of the NVMe hard disk is usually adjusted manually, which reduces the rate optimization efficiency of the NVMe hard disk. Summary of the invention

[0004] The present application provides a hard disk rate optimization method, a server, an electronic device, and a storage medium to solve the defects of related technologies that reduce the rate optimization efficiency of NVMe hard disks.

[0005] The first aspect of the present application provides a hard disk speed optimization method, comprising:

[0006] Get the current speed of any hard disk in the target server;

[0007] When the current speed of the hard disk does not reach the preset standard, the hard disk is regarded as a hard disk to be optimized;

[0008] Determining a firmware parameter adjustment strategy for the hard disk to be optimized according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized;

[0009] According to the firmware parameter adjustment strategy, a link training action is performed on the hard disk to be optimized to optimize the rate of the hard disk to be optimized.

[0010] In an optional implementation, after performing a link training operation on the hard disk to be optimized according to the firmware parameter adjustment strategy, the method further includes:

[0011] Re-obtaining the current speed of the hard disk to be optimized;

[0012] Determine whether the current speed of the hard disk to be optimized reaches a preset standard;

[0013] When it is determined that the current speed of the hard disk to be optimized still does not reach the preset standard, the speed optimization count value of the hard disk to be optimized is determined to be increased by 1, and the process returns to the step of determining the firmware parameter adjustment strategy of the hard disk to be optimized based on the hard disk configuration information of the target server and the speed optimization count value of the hard disk to be optimized, so as to optimize the speed of the hard disk to be optimized again.

[0014] In an optional embodiment, the method further includes:

[0015] In the case where it is determined that the current speed of the hard disk to be optimized reaches the preset standard, determining the hard disk to be optimized as a target hard disk;

[0016] Obtain the current rate of the next hard disk in the target server to optimize the rate of the next hard disk.

[0017] In an optional embodiment, the method further includes:

[0018] When it is determined that the current speed of the hard disk to be optimized still does not reach the preset standard, the host control authority signal requesting the hard disk to be optimized is set to 1 based on the basic input and output system to make the hard disk to be optimized repeatedly perform the link training action.

[0019] In an optional embodiment, the method further includes:

[0020] When it is determined that the hard disk to be optimized has completed the execution of the link training action, a host control right request signal of the hard disk to be optimized is set to 0 based on the basic input and output system.

[0021] In an optional embodiment, the method further includes:

[0022] When the current rate of any of the hard disks is obtained, determining that the hard disk has completed the first execution of the link training action;

[0023] If it is determined that the current rate of the hard disk that has completed the first execution of the link training action does not reach the preset standard, then based on the basic input and output system, a host control right request signal of the hard disk is set to 1, and a rate optimization count value of the hard disk is set to 1;

[0024] The rate optimization count value of the hard disk represents the number of times the host control authority request signal is set to 1.

[0025] In an optional implementation, determining the firmware parameter adjustment strategy of the hard disk to be optimized according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized includes:

[0026] When the rate optimization count value is 1, determining a target value of the link balance value of the hard disk to be optimized according to the hard disk configuration information of the target server, so as to determine a target link balance value;

[0027] The firmware parameter adjustment strategy of the hard disk to be optimized includes the target link balance value, and the link balance value is used to adjust the signal quality between the link output end and the link input end.

[0028] In an optional implementation, determining the firmware parameter adjustment strategy of the hard disk to be optimized according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized includes:

[0029] When the rate optimization count value is 2, first target values ​​of the premonitory parameters and postmonitory parameters of the hard disk to be optimized are determined according to the hard disk configuration information of the target server to determine a first target premonitory parameter and a first target postmonitory parameter;

[0030] Among them, the firmware parameter adjustment strategy of the hard disk to be optimized includes the first target precursor parameter and the first target post-premonitory parameter, the precursor parameter is used to adjust the rising speed and falling speed of the transmission signal of the hard disk to be optimized, and the post-premonitory parameter is used to adjust the attenuation speed of the transmission signal of the hard disk to be optimized.

[0031] In an optional implementation, determining the firmware parameter adjustment strategy of the hard disk to be optimized according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized includes:

[0032] When the rate optimization count value is 3, second target values ​​of the premonitory parameters and postmonitory parameters of the hard disk to be optimized are determined according to the hard disk configuration information of the target server to determine a second target premonitory parameter and a second target postmonitory parameter;

[0033] Among them, the firmware parameter adjustment strategy of the hard disk to be optimized includes the second target precursor parameter and the second target post-premonitory parameter, the precursor parameter is used to adjust the rising speed and falling speed of the transmission signal of the hard disk to be optimized, and the post-premonitory parameter is used to adjust the attenuation speed of the transmission signal of the hard disk to be optimized.

[0034] In an optional implementation, determining the firmware parameter adjustment strategy of the hard disk to be optimized according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized includes:

[0035] When the rate optimization count value is greater than 4, the current firmware parameters of the hard disk to be optimized are kept unchanged as the firmware parameter adjustment strategy for this round of optimization, so that the hard disk to be optimized repeatedly executes the link training action.

[0036] In an optional embodiment, the method further includes:

[0037] For any of the hard disks to be optimized, when the rate optimization count value of the hard disk to be optimized reaches a preset threshold, the hard disk to be optimized is determined as a target hard disk, so as to perform rate optimization processing on the next hard disk.

[0038] A second aspect of the present application provides a hard disk speed optimization device, comprising:

[0039] An acquisition module is used to obtain the current speed of any hard disk in the target server;

[0040] A judgment module, used for determining the hard disk as a hard disk to be optimized if the current speed of the hard disk does not reach a preset standard;

[0041] A determination module, configured to determine a firmware parameter adjustment strategy for the hard disk to be optimized according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized;

[0042] The optimization module is used to perform link training on the hard disk to be optimized according to the firmware parameter adjustment strategy to optimize the speed of the hard disk to be optimized.

[0043] A third aspect of the present application provides a server, comprising: a plurality of hard disks and a hard disk rate optimization device;

[0044] The hard disk rate optimization device performs rate optimization processing on the multiple hard disks based on the method described in the first aspect and various possible designs of the first aspect.

[0045] A fourth aspect of the present application provides an electronic device, comprising: at least one processor and a memory;

[0046] The memory stores computer-executable instructions;

[0047] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method described in the first aspect and various possible designs of the first aspect.

[0048] A fifth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in the first aspect and various possible designs of the first aspect are implemented.

[0049] The sixth aspect of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the method described in the first aspect and various possible designs of the first aspect.

[0050] The technical solution of this application has the following advantages:

[0051] The present application provides a hard disk speed optimization method, server, electronic device and storage medium, the method comprising: obtaining the current speed of any hard disk in the target server; when the current speed of the hard disk does not reach the preset standard, the hard disk is used as the hard disk to be optimized; according to the hard disk configuration information of the target server and the speed optimization count value of the hard disk to be optimized, the firmware parameter adjustment strategy of the hard disk to be optimized is determined; according to the firmware parameter adjustment strategy, the link training action is performed on the hard disk to be optimized to optimize the speed of the hard disk to be optimized. The method provided by the above scheme optimizes the data transmission rate of the NVMe hard disk by combining the PCI link characteristics represented by the hard disk configuration information of the target server, and adopts the method of adjusting the NVMe hard disk firmware parameters, thereby improving the speed optimization efficiency of the NVMe hard disk. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.

[0053] Figure 1 This is a schematic diagram of the physical connection structure of an NVMe hard disk;

[0054] Figure 2 A flowchart of a hard disk speed optimization method provided in an embodiment of the present application;

[0055] Figure 3 A schematic diagram of the overall process of the hard disk speed optimization method provided in an embodiment of the present application;

[0056] Figure 4 A swim lane diagram of the hard disk speed optimization method provided in an embodiment of the present application;

[0057] Figure 5 A schematic diagram of the structure of a hard disk speed optimization device provided in an embodiment of the present application;

[0058] Figure 6 A schematic diagram of the structure of a server provided in an embodiment of the present application;

[0059] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0060] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0062] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0063] In related technologies, with the development of the Internet, data is becoming more and more important. Both the development of artificial intelligence and Internet shopping cannot be separated from data. The core of data is data storage. If the cloud is used for storage and backup, once the cloud hardware server is restarted or the cloud application fails, the generated data will be completely lost and cannot be recovered, causing fatal economic losses to customers and manufacturers using cloud services. In serious cases, they will face huge economic compensation. In summary, data storage and local storage will be essential functions of the server. However, because traditional mechanical hard drives do not understand the capacity and transmission effect of data, customers prefer to use NVME hard drives for storage. Because the data transmission effect of NVME hard drives is obviously advantageous and there is no need to worry about data loss after power failure, there is an obvious disadvantage, that is, the price is relatively high. Therefore, various manufacturers actively introduce some non-mainstream NVME hard disk manufacturers for server matching. However, due to the lack of R&D experience, lack of large-scale batch testing, and even the design differences of the server itself, non-mainstream NVME hard disks will cause various technical problems in the servers of various manufacturers. Some serious problems include: downtime when the server starts, probabilistic loss of the hard disk when the server restarts, failure to check the existence of the hard disk when the server starts, hard disk FW (firmware) version and system driver compatibility issues, low or substandard performance test of reading and writing NVME hard disk data under the system, etc. All kinds of strange technical problems will occur. When encountering the above problems, server manufacturers need to analyze the problems in depth and communicate with NVME manufacturers to promote the resolution of the above problems. The above problems can generally be solved, but there is a problem with the PCI link supporting Gen4. When the server starts, for some reason, the link rate of the NVME hard disk should be 16GT / S after entering the system, but it is reduced to 8GT / s of Gen3. The rate is reduced by half, which greatly reduces the timeliness of the server's storage data and data transmission performance, seriously affecting the overall performance of the server. At the same time, when a purchasing manufacturer introduces multiple hard disks, this problem occurs and the solutions are inconsistent. In order to manage the server firmware BIOS version, the manufacturer does not recommend special treatment for each NVME hard disk manufacturer.

[0064] Among them, Figure 1As shown, it is a schematic diagram of the physical connection structure of the NVMe hard disk. The PCI link goes straight out of the CPU port, passes through the PCI link high-speed signal routing of the motherboard, and provides the external interface of the motherboard. The external interface is connected to the backplane of the NVME hard disk through a slimline cable or a GenZ cable. The NVME hard disk backplane is physically connected to the NVME hard disk actually used. When the NVME hard disk slows down, the above components may have problems. In the related art, generally when it is determined that the data transmission rate of a certain NVMe hard disk is not up to standard, the length or type of the physical cable of the NVMe hard disk is manually adjusted, which reduces the rate optimization efficiency of the NVMe hard disk. The embodiment of the present application takes into account that no matter which of the above components has problems, the core is the root cause of the problem of signal attenuation. How to solve the problem of NVME hard disk maintaining the rate of Gen4 and 16GT / S while keeping the hardware link unchanged is the core key point.

[0065] In response to the above problems, the embodiments of the present application provide a hard disk rate optimization method, server, electronic device and storage medium, the method comprising: obtaining the current rate of any hard disk in the target server; when the current rate of the hard disk does not reach the preset standard, the hard disk is used as the hard disk to be optimized; according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized, the firmware parameter adjustment strategy of the hard disk to be optimized is determined; according to the firmware parameter adjustment strategy, the link training action is performed on the hard disk to be optimized to optimize the rate of the hard disk to be optimized. The method provided by the above scheme optimizes the data transmission rate of the NVMe hard disk by combining the PCI link characteristics represented by the hard disk configuration information of the target server, and adopts the method of adjusting the NVMe hard disk firmware parameters, thereby improving the rate optimization efficiency of the NVMe hard disk.

[0066] Among them, in the phase 1 stage, the server side failed to successfully receive the TS1 sequence sent by the NVME disk side Tx (PCI link signal sender), and the signal quality of the NVME disk side Tx and the server side Rx (PCI link signal receiver) was relatively poor. At the same time, the overall wiring link of the slot backplane is relatively long, but the design meets the SI insertion loss requirements, and there have been no problems when adapting to hard disks from other manufacturers. When adapting this model of NVME hard disk, there are compatibility issues, which causes the current long link signal to attenuate and weaken the signal quality. In the phase 0 / 1 stage, the server side requested the NVME disk side preset link, which did not fully meet the negotiation standard, resulting in the probability that the server host and NVME hard disk PCI link establishment timeout will result in negotiation to gen3, that is, 8GT / S rate. Because the use of NVME hard drives involves multiple manufacturers or multiple server models, the Gen4 rate can be met without modifying the Preset value due to cable length issues on some manufacturers or server models. However, due to cable length issues on some manufacturers or server models, the Preset value needs to be set. In order to consider the universal applicability of NVME hard drives, the embodiment of the present application adjusts the Preset value and related parameter settings of the PCI link by modifying the FW method of the NVME hard drive to achieve the function of the NVME hard drive adapting to different PCI links.

[0067] The application of NVME hard disk includes the following four stages:

[0068] Phase 1: In order to fully optimize the link so that training sequences can be exchanged and the remaining link equalization phase for fine-tuning purposes can be completed, the same training sequence will be sent repeatedly to ensure that the downstream port receives the correct preset value despite the possibility of poor link quality.

[0069] Phase 2: After the link bit error rate achieves BER ≤ 10e-4 in phase 1, it enters Phase 2 and further optimizes the preset value of the upstream port until the optimal setting is obtained. The link bit error rate should meet BER ≤ 1E-12.

[0070] Phase 3: Perform the same negotiation on the downstream port in phase 3. The upstream port sends an equalization request through a training sequence to adjust the preset value of the downstream port until the optimal setting is obtained. The bit error rate of the link should meet BER ≤ 1E-12.

[0071] Retrain: This state is entered when the link needs to be retrained. This could be due to an error in L0, or recovery from L1 to L0, or recovery from L0s (if the link was not trained correctly using the FTS sequence).

[0072] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0073] The embodiment of the present application provides a hard disk rate optimization method for optimizing the data transmission rate of an NVMe hard disk in a server or other device. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer, and other electronic devices that can be used to optimize the data transmission rate of an NVMe hard disk.

[0074] like Figure 2 FIG. 1 is a flow chart of a hard disk speed optimization method provided in an embodiment of the present application, the method comprising:

[0075] Step 201, obtaining the current speed of any hard disk in the target server.

[0076] Specifically, when the target server starts, the BIOS will scan the PCI bus in the target server during the PCI enumeration phase to detect various devices connected to the bus, such as NVMe hard drives. The BIOS communicates with PCI devices (NVMe hard drives) by sending specific signals and instructions to obtain their information to obtain the current speed of any hard drive in the target server.

[0077] When the BIOS obtains the current speed of any hard disk, it indicates that the hard disk has performed a PCI training action (link training action) with the PCI link, and the Training action is completed.

[0078] Step 202: When the current speed of the hard disk does not reach a preset standard, the hard disk is used as a hard disk to be optimized.

[0079] Specifically, after obtaining the current rate of any hard disk, determine whether the actual link rate (current rate) of the hard disk is consistent with the maximum supported rate. If it is inconsistent and lower than the maximum supported rate, it is determined that the current rate of the hard disk does not meet the preset standard, and therefore the hard disk is treated as a hard disk to be optimized.

[0080] Step 203: Determine a firmware parameter adjustment strategy for the hard disk to be optimized based on the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized.

[0081] The rate optimization count value of the hard disk to be optimized is used to characterize the rate optimization round of the hard disk to be optimized.

[0082] Specifically, the firmware parameter adjustment strategy of the hard disk to be optimized can be determined based on the PCI link characteristics such as the Train characteristics represented by the hard disk configuration information of the target server and the attenuation characteristics of the link signal, and combined with the current rate optimization round of the hard disk to be optimized.

[0083] Specifically, in one embodiment, when the current speed of any hard disk is obtained, it is determined that the hard disk has completed the first execution of the link training action; if it is determined that the current speed of the hard disk that has completed the first execution of the link training action does not meet the preset standard, the hard disk's request host control authority signal is set to 1 based on the basic input and output system, and the speed optimization count value of the hard disk is set to 1.

[0084] The rate optimization count value of the hard disk actually represents the number of times the host control authority signal is set to 1.

[0085] It should be noted that the PCI link host control request signal SBR (System Bus Request) bit is a signal bit on the PCI bus, which is used to indicate that a device requests to use the system bus controller of the PCI bus. When a device (NVMe hard drive) needs to access the PCI bus, it will set the SBR bit to 1, indicating a request to use the bus. The system bus controller will decide whether to grant the device access to the PCI bus based on the state of the SBR bit. This can effectively coordinate the access of multiple devices to the PCI bus, avoid conflicts and competition, and improve the efficiency and performance of the system bus.

[0086] Step 204: Perform link training on the hard disk to be optimized according to the firmware parameter adjustment strategy to optimize the speed of the hard disk to be optimized.

[0087] Specifically, the firmware parameters of the hard disk to be optimized can be modified according to the firmware parameter adjustment strategy, and the link training action can be re-performed with the new firmware parameters to optimize the rate of the hard disk to be optimized. The embodiment of the present application takes into account the universal adaptability of the hard disk FW, the decoupling of the solution, the universal applicability of the solution and other considerations. The preset value of the hard disk FW for the TX and RX signals of the receiving end can be adaptively set by the NVME end FW, so that the NVMe hard disk can improve its rate after performing the link training action according to the reset parameters.

[0088] On the basis of the above embodiment, in order to ensure that the hard disk rate after the final optimization can reach the preset standard, as an implementable manner, on the basis of the above embodiment, after performing the link training action on the hard disk to be optimized according to the firmware parameter adjustment strategy, the method further includes:

[0089] Step 301, reacquire the current speed of the hard disk to be optimized;

[0090] Step 302, determining whether the current speed of the hard disk to be optimized reaches a preset standard;

[0091] Step 303, when it is determined that the current speed of the hard disk to be optimized still does not reach the preset standard, the speed optimization count value of the hard disk to be optimized is determined to be increased by 1, and the process returns to the step of determining the firmware parameter adjustment strategy of the hard disk to be optimized based on the hard disk configuration information of the target server and the speed optimization count value of the hard disk to be optimized, so as to optimize the speed of the hard disk to be optimized again.

[0092] Accordingly, in one embodiment, when it is determined that the current rate of the hard disk to be optimized reaches a preset standard, the hard disk to be optimized is determined as the target hard disk; the current rate of the next hard disk in the target server is obtained to perform rate optimization processing on the next hard disk.

[0093] Specifically, each time a round of rate optimization of the hard disk to be optimized is completed, the current rate of the hard disk to be optimized is obtained again, and it is determined whether the optimized rate (current rate) of the hard disk to be optimized reaches the preset standard. If not, the next round of rate optimization is performed. If it reaches, the rate optimization of the hard disk to be optimized is stopped, and the hard disk to be optimized is determined as the target hard disk. Then, the current rate of the next hard disk in the target server is obtained to determine whether the next hard disk needs to be rate optimized. If necessary, the next hard disk is rate optimized, and so on, until the rate optimization judgment and rate optimization processing of all NVMe hard disks in the target server are completed, so that all NVMe hard disks in the target server can reach the preset standard as much as possible.

[0094] Specifically, in one embodiment, when it is determined that the current speed of the hard disk to be optimized still does not reach the preset standard, the host control authority signal requesting the hard disk to be optimized is set to 1 based on the basic input and output system to repeat the link training action for the hard disk to be optimized.

[0095] Furthermore, in one embodiment, when it is determined that the hard disk to be optimized has completed the execution of the link training action, the host control authority request signal of the hard disk to be optimized is set to 0 based on the basic input and output system.

[0096] It should be noted that the host control request signal is the SBR signal, which is a signal for the PCI device (NVMe hard disk) to request bus control from the host, and is used to initiate bus access and data transmission. When the PCI retrain sbr bit is set to 1 (the host control request signal is set to 1), it means that the PCI device will send an SBR signal to request host control during retraining. This ensures that the PCI device can communicate with the host and transfer data normally after retraining. The function of the PCIretrain sbr bit is to ensure normal communication when the PCI device is retrained to avoid communication errors or data loss. By controlling the value of the PCI retrain sbr bit, the behavior of the PCI device during retraining can be flexibly configured to improve the reliability and performance of the system.

[0097] On the basis of the above embodiments, since various firmware parameters of the NVMe hard disk will affect its data transmission rate, in order to further improve the rate optimization efficiency of the NVMe hard disk, as shown in FIG. Figure 3 As shown, it is a schematic diagram of the overall process of the hard disk rate optimization method provided in the embodiment of the present application. As an implementable method, based on the above embodiment, according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized, the firmware parameter adjustment strategy of the hard disk to be optimized is determined, including:

[0098] Step 2031, when the rate optimization count value is 1, determine the target value of the link balance value of the hard disk to be optimized according to the hard disk configuration information of the target server to determine the target link balance value.

[0099] The firmware parameter adjustment strategy of the hard disk to be optimized includes a target link balance value, and the link balance value is used to adjust the signal quality between the link output end and the link input end.

[0100] It should be noted that the link balance value specifically refers to the preset value of the NVMe hard drive. The link balance value is also called the link balance setting value, which aims to establish a stable connection between devices. By adjusting the settings of Tx (transmitter) and Rx (receiver), the signal quality is improved, so that the PCIe link can be transmitted at the most stable and faster rate.

[0101] Exemplarily, when the rate optimization count value is 1, the NVME hard disk and the CPU's PCI link perform the second Training action and the NVME hard disk FW actively sets the Preset parameter to 7 before performing the Training action with the PCI link. When the Training action is completed, the BIOS sets the SBR bit to 0, and then determines whether the actual link rate of the NVME hard disk is consistent with the maximum supported rate. If they are consistent, the next NVME hard disk is polled and PCI training continues.

[0102] Further, in one embodiment, when the rate optimization count value is 2, the first target values ​​of the precursor parameters and post-predictive parameters of the hard disk to be optimized are determined according to the hard disk configuration information of the target server to determine the first target precursor parameters and the first target post-predictive parameters.

[0103] Among them, the firmware parameter adjustment strategy of the hard disk to be optimized includes a first target precursor parameter and a first target post-premonitory parameter. The precursor parameter is used to adjust the rising speed and falling speed of the transmission signal of the hard disk to be optimized, and the post-premonitory parameter is used to adjust the attenuation speed of the transmission signal of the hard disk to be optimized.

[0104] It should be noted that the TX Precursor and RX Postcursor parameters of PH3 of the PCI link refer to the precursor parameters and postcursor parameters. These parameters are mainly used to adjust the shape of the transmission signal to optimize data transmission performance and reduce signal distortion. TX Precursor is a parameter that adjusts the leading edge of the transmission signal. It can adjust the speed of signal rise and fall to optimize the shape of the signal and reduce signal distortion. RX Postcursor is a parameter that adjusts the trailing edge of the transmission signal. It can adjust the attenuation speed of the signal to optimize the shape of the signal and reduce signal distortion. The specific settings of these two parameters depend on the physical characteristics of the link, including the length of the link, the characteristics of the cable, the characteristics of the receiving end, etc. Usually these parameters need to be determined through experiments or simulations to achieve optimal data transmission performance.

[0105] For example, when the rate optimization count value is 2, the NVME hard disk and the CPU's PCI link perform the third Training action and the NVME hard disk FW actively sets the TX Precursor and RX Postcursor parameters of the hard disk's PH3 to 0,13 respectively, and then performs the Training action with the PCI link. When the Training action is completed, the BIOS sets the SBR bit to 0 to determine whether the actual link rate of the NVME hard disk is consistent with the maximum supported rate. If they are consistent, the next NVME hard disk is polled and PCI training continues.

[0106] Further, in one embodiment, when the rate optimization count value is 3, second target values ​​of the precursor parameters and post-predictive parameters of the hard disk to be optimized are determined according to the hard disk configuration information of the target server to determine the second target precursor parameters and second target post-predictive parameters.

[0107] Among them, the firmware parameter adjustment strategy of the hard disk to be optimized includes a second target precursor parameter and a second target post-premonitory parameter. The precursor parameter is used to adjust the rising speed and falling speed of the transmission signal of the hard disk to be optimized, and the post-premonitory parameter is used to adjust the attenuation speed of the transmission signal of the hard disk to be optimized.

[0108] Specifically, after adjusting the link balance value, the premonitory parameter and the postmonitory parameter of the hard disk to be optimized, if the data transmission rate of the hard disk to be optimized still does not reach the preset standard, the premonitory parameter and the postmonitory parameter can be adjusted again to determine the second target premonitory parameter and the second target postmonitory parameter. The second target premonitory parameter is not equal to the first target premonitory parameter, and the second target postmonitory parameter is not equal to the first target postmonitory parameter.

[0109] Exemplarily, when the rate optimization count value is 3, the NVME hard disk and the CPU's PCI link perform the fourth Training action and the NVME hard disk FW actively sets the TX Precursor and Postcursor parameters of the hard disk's PH3 to other values ​​before performing the Training action with the PCI link. When the Training action is completed, the BIOS sets the SBR bit to 0 to determine whether the actual link rate of the NVME hard disk is consistent with the maximum supported rate. If they are consistent, the next NVME hard disk is polled and PCI training continues.

[0110] Furthermore, in one embodiment, when the rate optimization count value is greater than 4, the current firmware parameters of the hard disk to be optimized are kept unchanged as the firmware parameter adjustment strategy for this round of optimization, so that the hard disk to be optimized repeats the link training action.

[0111] Specifically, when the rate optimization count reaches 4, the PCI link between the NVME hard disk and the CPU performs the fifth training action. Regardless of whether the training result is Gen4 or Gen3, it will run at the actual rate this time and continue to poll the next NVME hard disk and continue PCI training. That is, the firmware parameters are not adjusted in this round of rate optimization.

[0112] Accordingly, in one embodiment, in order to further effectively improve the data transmission efficiency of the NVMe hard disk, the target value of the link balance value of the hard disk to be optimized can be re-determined when the rate optimization count value is 4. If its rate still does not reach the preset standard after executing the link training action, that is, when the rate optimization count value is 5, the first target precursor parameter and the first target post-premonition parameter are re-determined. When the rate optimization count value is 6, the second target precursor parameter and the second target post-premonition parameter are re-determined, and so on, until the data transmission rate of the hard disk to be optimized reaches the preset standard or the rate optimization count value of the hard disk to be optimized reaches the preset threshold.

[0113] Specifically, in one embodiment, for any hard disk to be optimized, when the rate optimization count value of the hard disk to be optimized reaches a preset threshold, the hard disk to be optimized is determined as a target hard disk to perform rate optimization processing on the next hard disk.

[0114] It should be noted that the embodiment of the present application uses the BIOS to confirm whether to set the SBR bit based on the Train function result (current rate) of the PCI link where the NVME hard disk is located. At the same time, the NVME hard disk FW automatically adjusts the Preset parameters of the FW parameters on the hard disk side, the TX Precursor and Postcursor parameters of PH3 and other parameter setting values ​​according to the Training result of the PCI link on the BIOS side to achieve consistency between the physical connection rate and the actual maximum rate supported. At the same time, because the Training process is relatively time-consuming to start, the number of times is counted by setting a counting variable. When the number of Training processes of the PCI link reaches the preset threshold, it runs according to the last actual Training rate, ends the PCI link Training action of the current NVME hard disk and continues to poll the next NVME hard disk until all NVME hard disk PCI training is completed. The method provided in the embodiment of the present application is not affected by the CPU architecture and can be applied to PCI link servers with any architecture that supports NVME hard disks.

[0115] For example, to reflect the role of BIOS in the embodiment of the present application, Figure 4 As shown, it is a swim lane diagram of the hard disk rate optimization method provided in the embodiment of the present application, the server includes a CPU, BIOS and NVMe hard disk, Figure 4 The server in the above specifically refers to the CPU deployed in the server. Figure 4 The method shown is as follows Figure 3 The method shown is an exemplary implementation, and the implementation principles of the two are the same and will not be described in detail.

[0116] Specifically, when the rate optimization count value of the hard disk to be optimized reaches the preset threshold, it means that the hard disk to be optimized still fails to reach the preset standard after multiple rounds of rate optimization. Because the Training process consumes more startup time, in order to avoid wasting hard disk rate optimization resources, when the rate optimization count value of the hard disk to be optimized reaches the preset threshold, it can be operated according to the last actual Training rate, that is, the hard disk to be optimized is determined as the target hard disk to start the rate optimization processing operation for the next hard disk.

[0117] Among them, the preset threshold and the target link balance value, the first target precursor parameter, the first target post-predictive parameter, the second target precursor parameter and the second target post-predictive parameter used in each round of rate optimization can all be determined based on the PCI link characteristics represented by the hard disk configuration information of the target server, or based on experimental data.

[0118] The embodiment of the present application provides a hard disk rate optimization method, by obtaining the current rate of any hard disk in the target server; when the current rate of the hard disk does not reach the preset standard, the hard disk is used as the hard disk to be optimized; according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized, the firmware parameter adjustment strategy of the hard disk to be optimized is determined; according to the firmware parameter adjustment strategy, the hard disk to be optimized is subjected to link training action to optimize the rate of the hard disk to be optimized. The method provided by the above scheme optimizes the data transmission rate of the NVMe hard disk by adjusting the NVMe hard disk firmware parameters in combination with the PCI link characteristics characterized by the hard disk configuration information of the target server, thereby improving the rate optimization efficiency of the NVMe hard disk. In addition, multiple PCI Training actions are implemented to ensure that the current NVME hard disk can stably maintain the functional characteristics of the maximum rate consistent with the physical connection and the actual support. In addition, the method of adaptively adjusting the firmware parameters of the NVMe hard disk has extremely high applicability, scalability, reliability, etc., which improves the reliability of the server. The method provided by the embodiment of the present application can be applied to the server with one or more NVME hard disks mixed or single plug-in, which is extremely flexible and greatly improves the flexibility of the server. For server operators, it can effectively reduce the procurement cost of servers and increase the revenue of servers with the same configuration. At the same time, it can ensure that the beneficial effects of NVME hard drives are prominent and the technical advantages are obvious. The method provided in the embodiment of the present application can be extended to various types of PCI devices, such as PCI network cards, PCI RAID cards and other PCI devices.

[0119] An embodiment of the present application provides a hard disk speed optimization device for executing the hard disk speed optimization method provided in the above embodiment.

[0120] like Figure 5, which is a schematic diagram of the structure of a hard disk speed optimization device provided in an embodiment of the present application. The hard disk speed optimization device 50 comprises: an acquisition module 501 , a judgment module 502 , a determination module 503 and an optimization module 504 .

[0121] Among them, the acquisition module is used to obtain the current speed of any hard disk in the target server; the judgment module is used to use the hard disk as a hard disk to be optimized when the current speed of the hard disk does not reach the preset standard; the determination module is used to determine the firmware parameter adjustment strategy of the hard disk to be optimized based on the hard disk configuration information of the target server and the speed optimization count value of the hard disk to be optimized; the optimization module is used to perform link training actions on the hard disk to be optimized according to the firmware parameter adjustment strategy to optimize the speed of the hard disk to be optimized.

[0122] Regarding the hard disk speed optimization device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0123] The hard disk speed optimization device provided in the embodiment of the present application is used to execute the hard disk speed optimization method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.

[0124] An embodiment of the present application provides a server for executing the hard disk rate optimization method provided in the above embodiment.

[0125] like Figure 6 FIG. 1 is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server includes multiple hard disks and a hard disk rate optimization device.

[0126] The hard disk rate optimization device performs rate optimization processing on multiple hard disks based on the hard disk rate optimization method provided in the above embodiment. The hard disk rate optimization device can be a device such as a CPU.

[0127] Regarding the server in this embodiment, its specific implementation has been described in detail in the embodiment of the method, and will not be elaborated here.

[0128] The server provided in the embodiment of the present application is used to execute the hard disk speed optimization method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.

[0129] An embodiment of the present application provides an electronic device for executing the hard disk rate optimization method provided in the above embodiment.

[0130] like Figure 7 FIG. 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 70 includes: at least one processor 71 and a memory 72 .

[0131] The memory stores computer-executable instructions; at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the hard disk rate optimization method provided in the above embodiment.

[0132] The electronic device provided in the embodiment of the present application is used to execute the hard disk speed optimization method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.

[0133] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, a hard disk rate optimization method provided in any of the above embodiments is implemented.

[0134] The storage medium containing computer executable instructions provided in the embodiment of the present application can be used to store computer executable instructions of the hard disk speed optimization method provided in the aforementioned embodiment. Its implementation method and principle are the same and will not be repeated here.

[0135] An embodiment of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the hard disk rate optimization method provided in the aforementioned embodiment.

[0136] The embodiment of the present application provides a computer program product that can be used to execute computer instructions of the hard disk speed optimization method provided in the aforementioned embodiment. Its implementation method and principle are the same and will not be repeated here.

[0137] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, 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.

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

[0139] 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0140] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0141] A part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0142] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A hard disk speed optimization method, characterized in that: include: Get the current speed of any hard disk in the target server; When the current speed of the hard disk does not reach the preset standard, the hard disk is regarded as a hard disk to be optimized; Determining a firmware parameter adjustment strategy for the hard disk to be optimized according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized; According to the firmware parameter adjustment strategy, a link training action is performed on the hard disk to be optimized to optimize the rate of the hard disk to be optimized; The rate optimization count value of the hard disk to be optimized is used to characterize the rate optimization round of the hard disk to be optimized; The step of determining the firmware parameter adjustment strategy of the hard disk to be optimized according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized includes: When the rate optimization count value is 1, determining a target value of the link balance value of the hard disk to be optimized according to the hard disk configuration information of the target server, so as to determine a target link balance value; The firmware parameter adjustment strategy of the hard disk to be optimized includes the target link balance value, and the link balance value is used to adjust the signal quality between the link output end and the link input end.

2. The method according to claim 1, characterized in that After performing a link training operation on the hard disk to be optimized according to the firmware parameter adjustment strategy, the method further includes: Re-obtaining the current speed of the hard disk to be optimized; Determine whether the current speed of the hard disk to be optimized reaches a preset standard; When it is determined that the current speed of the hard disk to be optimized still does not reach the preset standard, the speed optimization count value of the hard disk to be optimized is determined to be increased by 1, and the process returns to the step of determining the firmware parameter adjustment strategy of the hard disk to be optimized based on the hard disk configuration information of the target server and the speed optimization count value of the hard disk to be optimized, so as to optimize the speed of the hard disk to be optimized again.

3. The method according to claim 2, characterized in that The method further comprises: In the case where it is determined that the current speed of the hard disk to be optimized reaches the preset standard, determining the hard disk to be optimized as a target hard disk; Obtain the current rate of the next hard disk in the target server to optimize the rate of the next hard disk.

4. The method according to claim 2, characterized in that: The method further comprises: When it is determined that the current speed of the hard disk to be optimized still does not reach the preset standard, the host control authority signal requesting the hard disk to be optimized is set to 1 based on the basic input and output system to make the hard disk to be optimized repeatedly perform the link training action.

5. The method according to claim 4, characterized in that The method further comprises: When it is determined that the hard disk to be optimized has completed the execution of the link training action, a host control right request signal of the hard disk to be optimized is set to 0 based on the basic input and output system.

6. The method according to claim 1, characterized in that The method further comprises: When the current rate of any of the hard disks is obtained, determining that the hard disk has completed the first execution of the link training action; If it is determined that the current rate of the hard disk that has completed the first execution of the link training action does not reach the preset standard, then based on the basic input and output system, a host control right request signal of the hard disk is set to 1, and a rate optimization count value of the hard disk is set to 1; The rate optimization count value of the hard disk represents the number of times the host control authority request signal is set to 1.

7. The method according to claim 1, characterized in that The step of determining the firmware parameter adjustment strategy of the hard disk to be optimized according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized includes: When the rate optimization count value is 2, first target values ​​of the premonitory parameters and postmonitory parameters of the hard disk to be optimized are determined according to the hard disk configuration information of the target server to determine a first target premonitory parameter and a first target postmonitory parameter; Among them, the firmware parameter adjustment strategy of the hard disk to be optimized includes the first target precursor parameter and the first target post-premonitory parameter, the precursor parameter is used to adjust the rising speed and falling speed of the transmission signal of the hard disk to be optimized, and the post-premonitory parameter is used to adjust the attenuation speed of the transmission signal of the hard disk to be optimized.

8. The method according to claim 1, characterized in that The step of determining the firmware parameter adjustment strategy of the hard disk to be optimized according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized includes: When the rate optimization count value is 3, second target values ​​of the premonitory parameters and postmonitory parameters of the hard disk to be optimized are determined according to the hard disk configuration information of the target server to determine a second target premonitory parameter and a second target postmonitory parameter; Among them, the firmware parameter adjustment strategy of the hard disk to be optimized includes the second target precursor parameter and the second target post-premonitory parameter, the precursor parameter is used to adjust the rising speed and falling speed of the transmission signal of the hard disk to be optimized, and the post-premonitory parameter is used to adjust the attenuation speed of the transmission signal of the hard disk to be optimized.

9. The method according to claim 1, characterized in that: The step of determining the firmware parameter adjustment strategy of the hard disk to be optimized according to the hard disk configuration information of the target server and the rate optimization count value of the hard disk to be optimized includes: When the rate optimization count value is greater than 4, the current firmware parameters of the hard disk to be optimized are kept unchanged as the firmware parameter adjustment strategy for this round of optimization, so that the hard disk to be optimized repeatedly executes the link training action.

10. The method according to claim 1, characterized in that The method further comprises: For any of the hard disks to be optimized, when the rate optimization count value of the hard disk to be optimized reaches a preset threshold, the hard disk to be optimized is determined as a target hard disk, so as to perform rate optimization processing on the next hard disk.

11. A server, characterized in that: include: Multiple hard disks and hard disk speed optimization devices; The hard disk rate optimization device performs rate optimization processing on the multiple hard disks based on the method described in any one of claims 1 to 10.

12. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 10 is implemented.

14. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • PCIe link detection and analysis device and method

    CN112653590A

  • Hard disk test method and system based on PCIE link configuration, terminal and storage medium

    CN114116337A

  • PCIE link training state monitoring device and server

    CN114281618A

  • NVMe hard disk performance optimization method, system and device based on AMD platform and medium

    CN115509844A

  • Method, system and device for processing NVMe disk link fault and storage medium

    CN116775376A