A buffer management method, device, equipment and medium for server extender

By dynamically managing the buffer of the server extender, adjusting the buffer status according to the hard disk type ratio, solving the performance loss problem of SAS hard disk in the expander, and achieving the maximum utilization of hard disk performance.

CN115951827BActive Publication Date: 2025-08-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211604143.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2025-08-08
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

Existing server extenders have increased performance losses and latency issues when configuring SAS hard drives, especially when using buffers for performance optimization, the performance of SAS hard drives is affected.

Method used

By obtaining the hard disk information under the server array card, dynamically manage the opening and closing of the buffer according to the ratio of the number of SATA hard disk and SAS hard disk, and reasonably allocate for different hard disk configurations to ensure that the hard disk performance is exerted in different application scenarios and reduce the performance loss on the expander side.

Benefits of technology

It effectively reduces the performance loss on the extender side, ensures the overall performance of the mixed configuration of SAS hard disk and SATA hard disk, and meets the needs of different application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115951827B_ABST
    Figure CN115951827B_ABST
Patent Text Reader

Abstract

The present invention relates to a buffer management method, device, equipment, and medium for a server expander. The management method includes: obtaining the total number of uplinks and information about all hard disks under an array card, wherein the information about all hard disks includes the total number of hard disks, the number of SATA hard disks, and the number of SAS hard disks; when the total number of hard disks is greater than the total number of uplinks, the number of SATA hard disks is not less than 2, and the number of SAS hard disks is not less than 1, generating a buffer opening number value based on the ratio of the number of SATA hard disks to the number of SAS hard disks, and using this value to manage the opening and closing of all buffers in all uplinks. The above technical solution can solve the problem of performance loss that occurs when performance optimization is performed through buffers in current server expanders.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servers, and in particular to a buffer management method, device, equipment and medium for a server extender. Background Art

[0002] With the advancement of server technology, customers have higher demands for data storage per unit space, and expander configurations are becoming increasingly popular. However, this also comes with performance issues. In addition to being limited by uplink bandwidth and link bottlenecks, there are also performance issues caused by the expander itself.

[0003] Most existing expander configurations use buffers for performance optimization. In most applications, expanders are used with large-capacity SATA hard drives. The SATA interface can only reach 6Gb / s speeds. To maximize the 12Gb / s speed of the array card and expander configuration, the expander's buffer combines two 6Gb commands into a single 12Gb / s command, effectively improving SATA hard drive performance.

[0004] The performance optimization solution using the buffer significantly improves the performance of 6G SATA hard drives, but for 12G SAS hard drives, this solution only causes performance degradation.

[0005] The use of a buffer introduces an additional path, preventing transparent command transmission, impacting SAS drive performance and increasing latency. Furthermore, during arbitration, the expander must break commands, which can be directly transmitted with a maximum I / O size of 128KB, into data blocks of up to 32KB for arbitration. This increases the number of arbitrations, resulting in reduced overall expander performance and increased latency.

[0006] Therefore, how to improve the existing technology and better and more reasonably bring out the performance of the expander configuration has become an urgent problem to be solved. Summary of the Invention

[0007] In order to solve the above technical problems, the present invention provides a buffer management method, device, equipment and medium for a server extender. The buffer management method for the server extender is used to solve the problem of performance loss when the extender in the current server optimizes performance through the buffer.

[0008] To achieve the above-mentioned object, the present invention provides a buffer management method for a server expander, wherein the expander firmware is used to allocate and manage all buffers in all hard disks and all uplinks under the server array card, where all hard disks include SATA hard disks and SAS hard disks. The management method comprises:

[0009] Obtain the total number of uplinks and all hard disk information under the array card; wherein the all hard disk information includes the total number of hard disks, the number of SATA hard disks, and the number of SAS hard disks;

[0010] When the total number of hard disks is greater than the total number of uplinks, the SATA hard disk quantity value is not less than 2, and the SAS hard disk quantity value is not less than 1, a buffer opening quantity value is generated according to the ratio of the SATA hard disk quantity value to the SAS hard disk quantity value, and is used to perform switch management on all buffers in all uplinks.

[0011] Furthermore, when the total number of hard disks is greater than the total number of uplinks, the number of SATA hard disks is not less than 2, and the number of SAS hard disks is not less than 1, a buffer opening number value is generated according to the ratio of the number of SATA hard disks to the number of SAS hard disks, for performing switch management on all buffers in all uplinks, specifically including:

[0012] When the total number of hard disks is greater than the total number of uplinks and the SATA hard disk quantity value is not less than 2, obtain the ratio of the SATA hard disk quantity value to the SAS hard disk quantity value, round up the ratio to generate a buffer open quantity value, which is used to perform switch management on all buffers in all uplinks; and bind the downlinks connected to the SATA hard disks and the uplinks connected to the open state buffers respectively; wherein, the total number of uplinks ≥ the buffer open quantity value ≥ 2.

[0013] Furthermore, the management method further includes:

[0014] When the total number of hard disks is less than the total number of uplinks, all uplinks and all downlinks are bound one by one, and the buffers in the downlinks connected to the SAS hard disks are closed, and the buffers in the downlinks connected to the SATA hard disks are opened.

[0015] Furthermore, the management method further includes:

[0016] When the total number of hard disks is equal to the number of SATA hard disks, the buffers in all uplinks are opened.

[0017] Furthermore, the management method further includes:

[0018] When the total number of hard disks is equal to the number of SAS hard disks, the buffers in all uplinks are closed.

[0019] Furthermore, the management method further includes:

[0020] When the total number of hard disks is greater than the total number of uplinks and the value of the number of SATA hard disks is equal to 1, the buffers in all uplinks are closed.

[0021] Furthermore, the management method further includes:

[0022] When the total number of hard disks changes, all hard disk update information under the array card is obtained, and dynamic switch management is performed on all buffers in all uplinks based on the updated information of all hard disks; wherein the information of all hard disks includes the updated value of the total number of hard disks, the updated value of the number of SATA hard disks, and the updated value of the number of SAS hard disks.

[0023] The present invention also provides a buffer management device for a server expander, which is used to implement the aforementioned buffer management method for a server expander. The expander firmware is used to allocate and manage all hard disks under the server array card and all buffers in all uplinks. The types of all hard disks include SATA hard disks and SAS hard disks.

[0024] The management device includes:

[0025] A hard disk information acquisition unit, configured to acquire the total number of uplinks and information about all hard disks under the array card; wherein the information about all hard disks includes the total number of hard disks, the number of SATA hard disks, and the number of SAS hard disks;

[0026] The first buffer management unit is configured to generate a buffer opening quantity value according to a ratio of the number of SATA hard disks to the number of SAS hard disks when the total number of hard disks is greater than the total number of uplinks, the number of SATA hard disks is not less than 2, and the number of SAS hard disks is not less than 1, so as to perform on-off management of all buffers in all uplinks.

[0027] The present invention further provides a computer device, comprising a memory, a processor, and a computer program, wherein the computer program is stored in the memory and can be run on the processor, and when the processor executes the computer program, the following steps are implemented:

[0028] Obtain the total number of uplinks and all hard disk information under the array card; wherein the all hard disk information includes the total number of hard disks, the number of SATA hard disks, and the number of SAS hard disks;

[0029] When the total number of hard disks is greater than the total number of uplinks, the SATA hard disk quantity value is not less than 2, and the SAS hard disk quantity value is not less than 1, a buffer opening quantity value is generated according to the ratio of the SATA hard disk quantity value to the SAS hard disk quantity value, and is used to perform switch management on all buffers in all uplinks.

[0030] The present invention further provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the following steps are implemented:

[0031] Obtain the total number of uplinks and all hard disk information under the array card; wherein the all hard disk information includes the total number of hard disks, the number of SATA hard disks, and the number of SAS hard disks;

[0032] When the total number of hard disks is greater than the total number of uplinks, the SATA hard disk quantity value is not less than 2, and the SAS hard disk quantity value is not less than 1, a buffer opening quantity value is generated according to the ratio of the SATA hard disk quantity value to the SAS hard disk quantity value, and is used to perform switch management on all buffers in all uplinks.

[0033] The above technical solution of the present invention has the following technical effects compared with the prior art:

[0034] In the server expander buffer management method of the present invention, the expander firmware can automatically adjust the buffer opening or closing based on the acquired hard drive information. When the expander has a mix of SAS hard drives and SATA hard drives, uplink binding and buffer opening / closing allocation can be performed according to the following principles:

[0035] When the total number of hard disks is greater than the number of uplinks, and the number of SATA hard disks is greater than or equal to 2, the number of open uplink buffers is controlled based on the ratio of the number of SATA hard disks to the number of SAS hard disks. For example, the minimum is 2, and the number of open buffers is rounded up to obtain the value.

[0036] In addition, when the total number of hard disks is less than the number of uplinks, the uplinks correspond to the downlinks one-to-one, the links connected to the SAS hard disks close the buffers, and the links connected to the SATA hard disks open the buffers;

[0037] That is, when using an expander configuration, it can automatically adapt to different buffer strategies for SAS or SATA hard drives; when using SAS hard drives, the expander's buffer function is turned off, and when using SATA hard drives, the buffer function is turned on;

[0038] Therefore, for the configuration of mixed SAS hard drives and SATA hard drives, the corresponding uplink buffer function can be reasonably allocated to open or close to ensure that the performance of the hard drives can be brought into play in different application scenarios and reduce performance loss on the expander end. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0040] Figure 1 1 is a flow chart of a buffer management method for a server extender in a first embodiment of the present invention;

[0041] Figure 2 This is a schematic diagram of the overall process of the buffer management method in an actual embodiment of the present invention;

[0042] Figure 3 is a structural block diagram of a buffer management device of a server extender in a second embodiment of the present invention;

[0043] Figure 4 This is a diagram of the internal structure of a computer device in Embodiment 2 of the present invention. DETAILED DESCRIPTION

[0044] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0045] Example 1:

[0046] like Figure 1 As shown, an embodiment of the present invention provides a buffer management method for a server expander. The expander firmware is used to allocate and manage all hard disks under the server array card and all buffers in all uplinks. The types of all hard disks include SATA hard disks and SAS hard disks. The management method includes:

[0047] S11 obtains the total number of uplinks and all hard disk information under the array card; wherein all hard disk information includes the total number of hard disks, the number of SATA hard disks, and the number of SAS hard disks;

[0048] S12: When the total number of hard disks is greater than the total number of uplinks, the SATA hard disk quantity value is not less than 2, and the SAS hard disk quantity value is not less than 1, a buffer opening quantity value is generated according to the ratio of the SATA hard disk quantity value to the SAS hard disk quantity value, for switching management of all buffers in all uplinks.

[0049] In a specific embodiment, the expander firmware can automatically adjust the buffer opening or closing based on the obtained hard drive information. Specifically, when the expander has a mix of SAS and SATA hard drives, uplink binding and buffer opening / closing allocation can be performed according to the following principles:

[0050] When the total number of hard drives is greater than the number of uplinks, and the number of SATA hard drives is greater than or equal to 2, the number of open uplink buffers is controlled based on the ratio of the number of SATA hard drives to the number of SAS hard drives. For example, the minimum is 2, and the number is rounded up to obtain the number of open buffers. In addition, when the total number of hard drives is less than the number of uplinks, the uplinks and downlinks correspond one-to-one, with the link buffers connected to the SAS hard drives closed and the link buffers connected to the SATA hard drives opened.

[0051] That is, when using an expander configuration, it can automatically adapt to different buffer strategies for SAS or SATA hard drives; when using SAS hard drives, the expander's buffer function is turned off, and when using SATA hard drives, the buffer function is turned on;

[0052] Therefore, for the configuration of mixed SAS hard drives and SATA hard drives, the corresponding uplink buffer function can be reasonably allocated to open or close to ensure that the hard drive performance can be brought into play in different application scenarios and reduce the performance loss on the expander side.

[0053] In practice, RAID stands for Redundant Arrays of Independent Disks, which is a disk array; SAS stands for Serial Attached SCSI, which is a serial small computer system interface; SATA stands for Serial Advanced Technology Attachment, which is a serial ATA hard disk interface specification (where ATA stands for Advanced Technology Attachment specification).

[0054] In actual embodiments, the expander's buffer function is generally enabled by default. However, in actual applications, it has been found that enabling the buffer can cause SAS hard drive performance to degrade. Therefore, in the above-mentioned buffer management method, by dynamically enabling / disabling the buffer in the expander's firmware, performance loss on the expander side can be effectively reduced.

[0055] In a preferred embodiment, in S12, when the total number of hard disks is greater than the total number of uplinks, the number of SATA hard disks is not less than 2, and the number of SAS hard disks is not less than 1, generating a buffer opening number value based on the ratio of the number of SATA hard disks to the number of SAS hard disks for performing on / off management of all buffers in all uplinks, specifically includes:

[0056] When the total number of hard disks is greater than the total number of uplinks, and the number of SATA hard disks is not less than 2, obtain the ratio of the number of SATA hard disks to the number of SAS hard disks, round up the comparison value, and generate the buffer open number value for switching management of all buffers in all uplinks; and bind the downlinks connected to the SATA hard disks and the uplinks connected to the open state buffers respectively; wherein, the total number of uplinks ≥ the buffer open number value ≥ 2.

[0057] In an actual embodiment, when the total number of hard disks is greater than the number of uplinks, and the number of SATA hard disks is greater than or equal to 2, the number of open uplink buffers is controlled based on the ratio of the number of SATA hard disks to the number of SAS hard disks. At this time, the minimum open number is 2 and is rounded up to obtain the buffer open number value. At the same time, the downlinks connected to the SATA hard disks are bound to the uplinks of these open buffers.

[0058] In a preferred embodiment, the management method further comprises:

[0059] S13: When the total number of hard disks is less than the total number of uplinks, all uplinks and all downlinks are bound one by one, and the buffers in the downlinks connected to the SAS hard disks are closed, and the buffers in the downlinks connected to the SATA hard disks are opened.

[0060] In an actual embodiment, when the total number of hard disks is less than the number of uplinks, the uplinks correspond to the downlinks one-to-one, the links connected to the SAS hard disks close the buffers, and the links connected to the SATA hard disks open the buffers.

[0061] Therefore, for the configuration of mixed SAS hard drives and SATA hard drives, the corresponding uplink buffer function can be reasonably allocated to open or close to ensure that the performance of the hard drives can be brought into play in different application scenarios and reduce performance loss on the expander end.

[0062] In a preferred embodiment, the management method further comprises:

[0063] S14: When the total number of hard disks is greater than the total number of uplinks and the value of the number of SATA hard disks is equal to 1, the buffers in all uplinks are closed.

[0064] In an actual embodiment, when a mix of SAS hard drives and SATA hard drives exists under an expander, the principles for performing uplink binding and buffer on / off allocation also include:

[0065] When the total number of hard disks is greater than the number of uplinks, but the number of SATA hard disks is equal to 1, since the buffer is accelerated by merging commands, the buffer effect is not obvious when there is only 1 SATA hard disk, so in this case the buffer function of all uplinks is turned off.

[0066] In a preferred embodiment, the management method further comprises:

[0067] S2: When the total number of hard disks is equal to the number of SATA hard disks, enable the buffers in all upstream links.

[0068] In a preferred embodiment, the management method further comprises:

[0069] S3: When the total number of hard disks equals the number of SAS hard disks, the buffers in all uplinks are closed.

[0070] In an actual embodiment, the firmware of the expander can automatically adjust the opening or closing of the buffer according to the acquired hard disk information, which also includes the following two situations:

[0071] When all the disks under the expander are SATA hard disks, open the buffers of all uplinks, use the buffer acceleration function, and use the merge command to virtualize the 6G SATA hard disk to a 12G rate.

[0072] When all disks under the expander are SAS hard drives, turn off the buffer function of all uplinks to allow commands to be transmitted transparently without passing through the expander's buffer and being subject to the expander's limitation of only being able to transmit a maximum of 32k of data per arbitration, thereby achieving maximum performance.

[0073] In a preferred embodiment, the management method further comprises:

[0074] S4 When the total number of hard disks changes, obtain the updated information of all hard disks under the array card, and dynamically manage the switching of all buffers in all uplinks based on the updated information of all hard disks; wherein, all hard disk information includes the updated value of the total number of hard disks, the updated value of the number of SATA hard disks, and the updated value of the number of SAS hard disks.

[0075] In an actual embodiment, the firmware of the expander can automatically adjust the opening or closing of the buffer according to the acquired hard disk information. After this process, it also includes a periodic information update process and a buffer dynamic management process.

[0076] During normal operation, the expander periodically scans all hard drive information. When a new hard drive is attached to the expander, or a faulty hard drive is marked offline, the expander rescans all hard drives, reports the drive information, and dynamically adjusts the uplink buffer function based on the new drive information, ensuring overall hard drive performance is not affected and minimizing performance loss on the expander.

[0077] like Figure 2 As shown, in an actual embodiment, the specific process of the buffer management method of the server extender is as follows:

[0078] (1) After the machine is powered on normally, the array card is loaded normally. At this time, the Expander mounted under the array card scans the information of all hard disks and reports it to the array card.

[0079] (2) The Expander firmware automatically adjusts the buffer to open or close based on the hard disk information obtained.

[0080] When all the disks under the Expander are SATA hard disks, open the buffer of all uplinks, use the buffer acceleration function, and use the merge command to virtualize the speed of 6G SATA hard disks to 12G.

[0081] When all the disks under the Expander are SAS hard disks, disable the buffer function of all uplinks to allow commands to be transmitted transparently without going through the Expander buffer and being subject to the Expander's limitation of only being able to transmit a maximum of 32KB of data per arbitration, thereby achieving maximum performance.

[0082] When a mix of SAS and SATA hard drives exists under an expander, uplink binding and buffer on / off allocation are performed according to the following principles:

[0083] When the total number of hard disks is less than 8 uplinks, the uplinks and downlinks correspond one to one. The links connected to SAS hard disks have buffers disabled, while the links connected to SATA hard disks have buffers enabled.

[0084] When the total number of hard drives is greater than the number of uplinks (8), and the number of SATA hard drives is greater than or equal to 2, the number of open uplink buffers is controlled based on the ratio of the number of SATA hard drives to the number of SAS hard drives (a minimum of 2, rounded up). The downlinks connected to the SATA hard drives are bound to these uplinks with open buffers.

[0085] When the total number of hard disks is greater than 8 uplinks, but the number of SATA hard disks is equal to 1, the buffer function of all uplinks is disabled in this case because the buffer is accelerated by merging commands.

[0086] (3) When the machine is in normal use, Expander will regularly scan all hard disk information; when a new hard disk is mounted under Expander, or a hard disk failure is marked as offline, Expander will rescan all hard disks, report the hard disk information, and dynamically adjust the uplink buffer function on / off based on the new hard disk information to ensure that the overall performance of the hard disk is not affected and reduce the performance loss on the Expander side.

[0087] In summary, in the above buffer management method, the expander can automatically adjust the opening or closing of the uplink buffer based on the hard disk information obtained; for the configuration of a mix of SAS hard disks and SATA hard disks, the uplink binding and buffer opening / closing operations can be automatically performed according to the allocation principle, thereby ensuring the maximum overall performance and reducing performance loss on the expander side.

[0088] That is, for the expander service performance in different customer application scenarios, the above buffer management method can effectively solve the problem of how to efficiently exert the performance of SAS hard drives and SATA hard drives, thereby reducing performance loss on the expander side; at the same time, the expander can regularly scan hard drive information, and when the expander members change, the buffer can be re-opened / closed for dynamic allocation to ensure that the overall performance of the hard drive is not affected.

[0089] It should be noted that, although the steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0090] Example 2:

[0091] like Figure 3 As shown, an embodiment of the present invention further provides a buffer management device for a server expander, which is used to implement the aforementioned buffer management method for a server expander. The expander firmware is used to allocate and manage all hard disks under the server array card and all buffers in all uplinks. The types of all hard disks include SATA hard disks and SAS hard disks.

[0092] The management device includes:

[0093] A hard disk information acquisition unit is used to obtain the total number of uplinks and all hard disk information under the array card; wherein all hard disk information includes the total number of hard disks, the number of SATA hard disks, and the number of SAS hard disks;

[0094] The first buffer management unit is used to generate a buffer opening quantity value according to the ratio of the number of SATA hard disks to the number of SAS hard disks when the total number of hard disks is greater than the total number of uplinks, the number of SATA hard disks is not less than 2, and the number of SAS hard disks is not less than 1, so as to perform on-off management of all buffers in all uplinks.

[0095] In a preferred embodiment, the first buffer management unit is also used to obtain the ratio of the number of SATA hard disks to the number of SAS hard disks when the total number of hard disks is greater than the total number of uplinks and the number of SATA hard disks is not less than 2, round up the comparison value, and generate a buffer opening number value for switching management of all buffers in all uplinks; and bind the downlinks connected to the SATA hard disks and the uplinks connected to the open state buffers respectively; wherein the total number of uplinks ≥ the buffer opening number value ≥ 2.

[0096] In a preferred embodiment, the management device also includes a second buffer management unit, which is used to bind all uplinks and all downlinks one by one when the total number of hard disks is less than the total number of uplinks, and to close the buffers in the downlinks connected to the SAS hard disks and open the buffers in the downlinks connected to the SATA hard disks.

[0097] In a preferred embodiment, the management device further includes a third buffer management unit, which is configured to open buffers in all uplinks when the total number of hard disks is equal to the number of SATA hard disks.

[0098] In a preferred embodiment, the management device further includes a fourth buffer management unit, which is configured to close the buffers in all uplinks when the total number of hard disks is equal to the number of SAS hard disks.

[0099] In a preferred embodiment, the management device further includes a fifth buffer management unit, which is configured to close the buffers in all uplinks when the total number of hard disks is greater than the total number of uplinks and the number of SATA hard disks is equal to 1.

[0100] In a preferred embodiment, the management device further includes a buffer management update unit, which is used to obtain update information of all hard disks under the array card when the total number of hard disks changes, and dynamically manage the switching of all buffers in all uplinks based on the update information of all hard disks; wherein all hard disk information includes an updated value of the total number of hard disks, an updated value of the number of SATA hard disks, and an updated value of the number of SAS hard disks.

[0101] For the specific definition of the above-mentioned device, please refer to the definition of the method above, which will not be repeated here.

[0102] Each module in the above-mentioned apparatus may be implemented in whole or in part by software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0103] Among them, such as Figure 4 As shown, the above-mentioned computer device can be a terminal, which includes a processor, memory, network interface, display screen and input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. The display screen of the computer device can be a liquid crystal display or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0104] It will be understood that the structure shown in the above figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0105] Example 3:

[0106] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program. The computer program is stored in the memory and can be run on the processor. When the processor executes the computer program, the following steps are implemented:

[0107] S11 obtains the total number of uplinks and all hard disk information under the array card; wherein all hard disk information includes the total number of hard disks, the number of SATA hard disks, and the number of SAS hard disks;

[0108] S12: When the total number of hard disks is greater than the total number of uplinks, the SATA hard disk quantity value is not less than 2, and the SAS hard disk quantity value is not less than 1, a buffer opening quantity value is generated according to the ratio of the SATA hard disk quantity value to the SAS hard disk quantity value, for switching management of all buffers in all uplinks.

[0109] In a preferred embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0110] S12 specifically includes: when the total number of hard disks is greater than the total number of uplinks, and the number of SATA hard disks is not less than 2, obtaining the ratio of the number of SATA hard disks to the number of SAS hard disks, rounding up the comparison value, and generating a buffer opening number value for switching management of all buffers in all uplinks; and binding the downlinks connected to the SATA hard disks and the uplinks connected to the open state buffers respectively; wherein the total number of uplinks ≥ the buffer opening number value ≥ 2.

[0111] In a preferred embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0112] S13: When the total number of hard disks is less than the total number of uplinks, all uplinks and all downlinks are bound one by one, and the buffers in the downlinks connected to the SAS hard disks are closed, and the buffers in the downlinks connected to the SATA hard disks are opened.

[0113] In a preferred embodiment, when the processor executes the computer program, the following steps are further implemented: S2: when the total number of hard disks is equal to the number of SATA hard disks, the buffers in all uplinks are opened.

[0114] In a preferred embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0115] S3: When the total number of hard disks equals the number of SAS hard disks, the buffers in all uplinks are closed.

[0116] In a preferred embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0117] S14: When the total number of hard disks is greater than the total number of uplinks and the value of the number of SATA hard disks is equal to 1, the buffers in all uplinks are closed.

[0118] In a preferred embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0119] S4 When the total number of hard disks changes, obtain the updated information of all hard disks under the array card, and dynamically manage the switching of all buffers in all uplinks based on the updated information of all hard disks; wherein, all hard disk information includes the updated value of the total number of hard disks, the updated value of the number of SATA hard disks, and the updated value of the number of SAS hard disks.

[0120] Example 4:

[0121] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the following steps:

[0122] S11 obtains the total number of uplinks and all hard disk information under the array card; wherein all hard disk information includes the total number of hard disks, the number of SATA hard disks, and the number of SAS hard disks;

[0123] S12: When the total number of hard disks is greater than the total number of uplinks, the SATA hard disk quantity value is not less than 2, and the SAS hard disk quantity value is not less than 1, a buffer opening quantity value is generated according to the ratio of the SATA hard disk quantity value to the SAS hard disk quantity value, for switching management of all buffers in all uplinks.

[0124] In a preferred embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0125] S12 specifically includes: when the total number of hard disks is greater than the total number of uplinks, and the number of SATA hard disks is not less than 2, obtaining the ratio of the number of SATA hard disks to the number of SAS hard disks, rounding up the comparison value, and generating a buffer opening number value for switching management of all buffers in all uplinks; and binding the downlinks connected to the SATA hard disks and the uplinks connected to the open state buffers respectively; wherein the total number of uplinks ≥ the buffer opening number value ≥ 2.

[0126] In a preferred embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0127] S13: When the total number of hard disks is less than the total number of uplinks, all uplinks and all downlinks are bound one by one, and the buffers in the downlinks connected to the SAS hard disks are closed, and the buffers in the downlinks connected to the SATA hard disks are opened.

[0128] In a preferred embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0129] S2: when the total number of hard disks is equal to the number of SATA hard disks, open the buffers in all uplinks. In a preferred embodiment, the computer program further implements the following steps when executed by the processor:

[0130] S3: When the total number of hard disks equals the number of SAS hard disks, the buffers in all uplinks are closed.

[0131] In a preferred embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0132] S14: When the total number of hard disks is greater than the total number of uplinks and the value of the number of SATA hard disks is equal to 1, the buffers in all uplinks are closed.

[0133] In a preferred embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0134] S4 When the total number of hard disks changes, obtain the updated information of all hard disks under the array card, and dynamically manage the switching of all buffers in all uplinks based on the updated information of all hard disks; wherein, all hard disk information includes the updated value of the total number of hard disks, the updated value of the number of SATA hard disks, and the updated value of the number of SAS hard disks.

[0135] It can be understood that the implementation of all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.

[0136] Among them, any reference to memory, storage, database or other media used in the various embodiments provided by the present invention may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0137] It should be noted that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.

Claims

1. A buffer management method for a server extender, characterized in that: The firmware of the expander is used to allocate and manage all hard disks under the server array card and all buffers in all uplinks, and the types of all hard disks include SATA hard disks and SAS hard disks; the management method includes: Obtain the total number of uplinks and all hard disk information under the array card; wherein the all hard disk information includes the total number of hard disks, the number of SATA hard disks, and the number of SAS hard disks; When the total number of hard disks is greater than the total number of uplinks, the SATA hard disk quantity value is not less than 2, and the SAS hard disk quantity value is not less than 1, a buffer opening quantity value is generated according to the ratio of the SATA hard disk quantity value to the SAS hard disk quantity value, and is used to perform switch management on all buffers in all uplinks.

2. The server extender buffer management method according to claim 1, wherein: When the total number of hard disks is greater than the total number of uplinks, the number of SATA hard disks is not less than 2, and the number of SAS hard disks is not less than 1, generating a buffer opening number value according to a ratio of the number of SATA hard disks to the number of SAS hard disks for performing on / off management on all buffers in all uplinks, specifically including: When the total number of hard disks is greater than the total number of uplinks and the SATA hard disk quantity value is not less than 2, obtain the ratio of the SATA hard disk quantity value to the SAS hard disk quantity value, round up the ratio to generate the buffer open quantity value, which is used to perform switch management on all buffers in all uplinks; and bind the downlinks connected to the SATA hard disks and the uplinks connected to the open state buffers respectively; wherein, the total number of uplinks ≥ the buffer open quantity value ≥ 2.

3. The buffer management method of the server extender according to claim 1, wherein: The management method further comprises: When the total number of hard disks is less than the total number of uplinks, all uplinks and all downlinks are bound one by one, and the buffers in the downlinks connected to the SAS hard disks are closed, and the buffers in the downlinks connected to the SATA hard disks are opened.

4. The server extender buffer management method according to claim 1, wherein: The management method further comprises: When the total number of hard disks is equal to the number of SATA hard disks, the buffers in all uplinks are opened.

5. The buffer management method of the server extender according to claim 1, wherein: The management method further comprises: When the total number of hard disks is equal to the number of SAS hard disks, the buffers in all uplinks are closed.

6. The buffer management method of the server extender according to claim 1, wherein: The management method further comprises: When the total number of hard disks is greater than the total number of uplinks and the value of the number of SATA hard disks is equal to 1, the buffers in all uplinks are closed.

7. The server extender buffer management method according to any one of claims 1 to 6, characterized in that: The management method further comprises: When the total number of hard disks changes, all hard disk update information under the array card is obtained, and dynamic switch management is performed on all buffers in all uplinks based on the updated information of all hard disks; wherein the information of all hard disks includes the updated value of the total number of hard disks, the updated value of the number of SATA hard disks, and the updated value of the number of SAS hard disks.

8. A buffer management device for a server extender, characterized in that: A method for implementing the buffer management of a server expander according to any one of claims 1 to 7, wherein the expander firmware is configured to allocate and manage all hard disks under the server array card and all buffers in all uplinks, where the types of all hard disks include SATA hard disks and SAS hard disks; The management device includes: A hard disk information acquisition unit, configured to acquire the total number of uplinks and information about all hard disks under the array card; wherein the information about all hard disks includes the total number of hard disks, the number of SATA hard disks, and the number of SAS hard disks; The first buffer management unit is configured to generate a buffer opening quantity value according to a ratio of the number of SATA hard disks to the number of SAS hard disks when the total number of hard disks is greater than the total number of uplinks, the number of SATA hard disks is not less than 2, and the number of SAS hard disks is not less than 1, so as to perform on-off management of all buffers in all uplinks.

9. A computer device comprising a memory, a processor, and a computer program, wherein the computer program is stored in the memory and can be run on the processor, wherein: When the processor executes the computer program, the steps of the server extender buffer management method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the server extender buffer management method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and system for supporting flexible configuration of a server storage medium sequence

    CN109614035A

  • U.2 interface multi-hard-disk management backboard and method

    CN110377956A