Node number adjusting method, device and equipment and readable storage medium
By obtaining the performance requirements information and current performance parameters of the distributed storage cluster, determining the storage mode and master control method, and using soft switches to switch the master control method, the problem of the inability to adjust the number of nodes in the distributed storage system is solved, and the system is improved Reliability and performance.
Patent Information
- Application Number
- CN202411375269.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-06
AI Technical Summary
The existing distributed storage system cannot intelligently adjust the number of central processing unit nodes according to needs, resulting in a decrease in overall reliability.
By obtaining the performance requirements information of the distributed storage cluster, determining the storage mode and main control method based on the current performance parameters and demand information, using soft switches to switch the main control method, adjusting the interconnection signal of the central processing unit, and dynamic adjustment of the number of nodes.
Improves the reliability of the server, meets the cluster performance requirements, and ensures flexible changes in the number of nodes.
Smart Images

Figure CN119088319A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of storage services, and in particular to a method, device, equipment and readable storage medium for adjusting the number of nodes. Background Art
[0002] The hardware implementation of distributed storage is basically based on general servers, and the performance is improved by controlling the number of central processing unit (CPU) nodes. Usually, the data bridge between the CPU and the HDD is realized through the Raid card, and one or two network cards are mounted under each CPU node for data exchange and information transmission. The number of central processing unit nodes cannot be adjusted according to demand, which reduces the overall reliability.
[0003] It can be seen that how to adjust the number of central processing unit nodes and improve the reliability of the server is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a method, device, equipment and readable storage medium for adjusting the number of nodes, which can solve the technical problem that the number of nodes cannot be intelligently adjusted.
[0005] To solve the above technical problem, an embodiment of the present invention provides a method for adjusting the number of nodes, which may include:
[0006] Acquire performance requirement information of a distributed storage cluster, and determine the storage mode according to current performance parameters of the current distributed storage cluster and the performance requirement information; wherein the performance requirement information is an indicator for measuring the performance of the storage system, and the storage mode is a replica or an erasure code;
[0007] Analyze the performance requirement information and the storage mode to determine the target master control mode; wherein the master control mode is single-channel dual-control or dual-channel single-control, the single-channel dual-control means that a storage system includes two controllers, each controller controls only one central processing unit, and the dual-channel single-control means that a storage system uses one controller to manage the two central processing units;
[0008] When the target master control mode is inconsistent with the historical master control mode, the master control mode switching instruction is synchronized to the soft switch controlling the interconnection signal of the central processing unit;
[0009] The soft switch is used to control the interconnection signal of the central processing unit according to the master control mode switching instruction, and the relationship between the serial communication interface and the central processing unit is adjusted; wherein the interconnection signal is connected or disconnected.
[0010] On the one hand, the performance requirement information includes the number of input / output operations per second, bandwidth, latency, available capacity, as well as network card bandwidth, CPU specifications, hard disk capacity and quantity, and cache disk capacity and quantity of the cluster.
[0011] On the one hand, before obtaining the performance requirement information of the distributed storage cluster, the method further includes:
[0012] Determine whether the storage server in use supports the switching of the master control mode;
[0013] When supported, determine the steps for performing the steps of obtaining the performance requirement information of the distributed storage cluster.
[0014] On the one hand, the use of the soft switch to control the interconnection signal of the central processing unit according to the master control mode switching instruction and adjust the relationship between the serial communication interface and the central processing unit includes:
[0015] When it is determined that the single-channel dual-control mode is switched to the dual-channel single-control mode, the soft switch is used to control the interconnection signal connection of the central processing unit according to the master control mode switching instruction to realize the interconnection of the dual-channel central processing units;
[0016] Cut off any central processing unit from the serial communication interface, and synchronize the master control mode switching instruction to the complex programmable logic device, and use the complex programmable logic device to simultaneously control the power-on timing of the two central processing units and their peripherals, and determine that the central processing unit and various external devices are powered on as a whole motherboard. After the setting is completed, control the entire machine to restart, and realize the conversion from single-channel dual-control to dual-channel single-control;
[0017] Alternatively, when it is determined that the dual-channel single-control is switched to the single-channel dual-control, the interconnection signal of the central processing unit is disconnected by using the soft switch according to the master control mode switching instruction;
[0018] Connect any central processing unit to the serial communication interface through a channel, and synchronize the master control mode switching instruction to the complex programmable logic device, and use the complex programmable logic device to control the power-on timing of the two central processing units and their peripherals respectively, to ensure that the two central processing units and their corresponding external devices are powered on as two independent integral devices. After the setting is completed, control the machine to restart and realize the switching from dual-channel single control to single-channel dual control.
[0019] On the one hand, after using the soft switch to control the interconnection signal of the central processing unit according to the master control mode switching instruction and adjusting the relationship between the serial communication interface and the central processing unit, it also includes:
[0020] Test the adjusted cluster to determine whether the latest master control method meets the cluster performance requirements;
[0021] When the cluster performance requirements are met, the process is terminated.
[0022] When it is uncertain whether the cluster performance requirement is met, it is determined to adjust the cluster performance parameters, and the master control mode is controlled based on the adjusted cluster performance parameters.
[0023] On the one hand, the detection of the adjusted cluster to determine whether the latest master control mode meets the cluster performance requirements includes:
[0024] The adjusted cluster is tested to determine whether the current latest master control method meets the cluster performance requirements and effective capacity; wherein the effective capacity of the cluster refers to the maximum amount of tasks or data that all nodes in the cluster can jointly process within a specific time.
[0025] On the one hand, the node quantity adjustment method further includes:
[0026] When it is determined that a single central processing unit fails, determining to adjust the master control mode to single-channel dual control;
[0027] The data corresponding to the faulty central processing unit is determined, and the data is migrated to a normal central processing unit.
[0028] The embodiment of the present invention further provides a node quantity adjustment device, comprising:
[0029] A storage mode determination module, used to obtain performance requirement information of a distributed storage cluster, and determine the storage mode according to current performance parameters of the current distributed storage cluster and the performance requirement information; wherein the performance requirement information is an indicator for measuring the performance of the storage system, and the storage mode is a replica or an erasure code;
[0030] a target master control mode determination module, configured to determine a target master control mode by analyzing the performance requirement information and the storage mode; wherein the master control mode is single-channel dual-control or dual-channel single-control, wherein the single-channel dual-control means that a storage system includes two controllers, each controller controls only one central processing unit, and the dual-channel single-control means that a storage system uses one controller to manage the two central processing units;
[0031] A switching module, used for synchronizing the master control mode switching instruction to the soft switch controlling the interconnection signal of the central processing unit when the target master control mode is inconsistent with the historical master control mode;
[0032] The interconnection signal adjustment module is used to control the interconnection signal of the central processing unit according to the master control mode switching instruction using the soft switch, and adjust the relationship between the serial communication interface and the central processing unit; wherein the interconnection signal is connected or disconnected.
[0033] An embodiment of the present invention further provides a node quantity adjustment device, including:
[0034] Memory for storing computer programs;
[0035] A processor is used to execute the computer program to implement the steps of the above-mentioned node quantity adjustment method.
[0036] The present invention also provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for adjusting the number of nodes are implemented.
[0037] The present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned node quantity adjustment method when executed by a processor.
[0038] To solve the above technical problems, an embodiment of the present invention provides a method for adjusting the number of nodes, which may include: obtaining performance requirement information of a distributed storage cluster, and determining a storage mode according to current performance parameters of the current distributed storage cluster and the performance requirement information; wherein the performance requirement information is an indicator for measuring the performance of the storage system, and the storage mode is a replica or an erasure code; analyzing according to the performance requirement information and the storage mode, determining a target master control mode; wherein the master control mode is single-channel dual control or dual-channel single control, single-channel dual control means that a storage system includes two controllers, each controller controls only one central processing unit, and dual-channel single control means that a storage system uses one controller to manage the two central processing units; when the target master control mode is inconsistent with the historical master control mode, synchronizing the master control mode switching instruction to the soft switch that controls the interconnection signal of the central processing unit; using the soft switch to control the interconnection signal of the central processing unit according to the master control mode switching instruction, and adjusting the relationship between the serial communication interface and the central processing unit; wherein the interconnection signal is connected or disconnected.
[0039] It can be seen from the above technical scheme that the beneficial effect of the present invention is that compared with the current inability to adjust the number of nodes, when the target master control mode and the historical master control mode are inconsistent, the present invention synchronizes the master control mode switching instruction to the soft switch that controls the central processing unit interconnection signal. Since the central processing units in different master control modes are different (two when the CPU is connected and one when disconnected), the number of nodes can be changed according to the performance requirement information, thereby improving the reliability of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in 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 creative work.
[0041] Figure 1 A flowchart of a method for adjusting the number of nodes provided by an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of a hardware architecture based on a storage server supporting single and dual control switching provided by an embodiment of the present invention;
[0043] Figure 3 An example flow chart of a method for adjusting the number of nodes provided in an embodiment of the present invention;
[0044] Figure 4 A schematic diagram of the structure of a node quantity adjustment device provided by an embodiment of the present invention;
[0045] Figure 5 A schematic diagram of the structure of a node quantity adjustment device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in 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 creative work are within the scope of protection of the present invention.
[0047] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0048] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0049] Next, a flowchart of a method for adjusting the number of nodes provided by an embodiment of the present invention is described in detail. Figure 1 A method for adjusting the number of nodes provided in an embodiment of the present invention may include:
[0050] S101, obtaining performance requirement information of a distributed storage cluster, and determining a storage mode according to current performance parameters and performance requirement information of the current distributed storage cluster; wherein the performance requirement information is an indicator for measuring the performance of the storage system, and the storage mode is a replica or an erasure code.
[0051] The distributed storage cluster in this embodiment is a system architecture that uses multiple independent devices to connect through a network to jointly provide data storage services. The performance requirement information in this embodiment is information set according to user needs, and the current performance parameters in this embodiment are parameters of resources used in the current cluster. This embodiment does not limit specific performance requirement information. For example, the performance requirement information in this embodiment can be at least one of IOPS (input / output operations per second), bandwidth, and effective capacity of the distributed cluster; or the performance requirement information in this embodiment can also be at least one of network card bandwidth, CPU (central processing unit) specifications, hard disk capacity and quantity, and cache disk capacity and quantity. It can be understood that the copy mode saves multiple copies of data on multiple nodes. It is suitable for scenarios with high data reliability requirements, but it will reduce storage efficiency. Erasure code mode: Use an algorithm to divide data into multiple data blocks and check blocks and store them on different nodes. It can improve storage efficiency while ensuring data reliability, but the computational complexity is high. Taking the realization of effective capacity as an example, since the number of storage servers that ultimately realize the distributed storage cluster is certain, the corresponding hard disk specifications and quantity are also determined accordingly. When the overall capacity of the underlying hard disk is fixed, the effective capacity of the hard disk is determined according to the implementation method of distributed storage. For example, if three copies are used, the effective capacity is only 1 / 3 of the actual capacity. When two copies are used, the effective capacity is only 1 / 2 of the actual usage. If the erasure method is used, the effective capacity changes with the erasure ratio. This embodiment selects the method of using erasure codes when it is determined that the current performance needs to be improved based on the current performance parameters and performance requirement information. When the current performance parameters are greater than the set performance requirement information and greater than the set value, the storage mode of using copies can be determined.
[0052] It should be further explained that, in order to improve the comprehensiveness of the performance requirement information, the above performance requirement information includes the number of input / output operations per second, bandwidth, latency, available capacity, and network card bandwidth, CPU specifications, hard disk capacity and quantity, cache disk capacity and quantity of the cluster. This embodiment improves the comprehensiveness of the performance requirement information by providing a variety of information.
[0053] It should be further explained that before obtaining the performance requirement information of the distributed storage cluster, the following may also be included: determining whether the storage server in use supports the switching of the master control mode; and when supported, determining to execute the step of obtaining the performance requirement information of the distributed storage cluster. This embodiment determines whether the storage server in use supports the switching of single and dual control by capturing the hardware settings, which may refer to whether the specifications of the storage server support the switching of single and dual control.
[0054] S102, analyzing the performance requirement information and the storage mode to determine the target master control mode; wherein the master control mode is single-channel dual-control or dual-channel single-control, single-channel dual-control means that a storage system includes two controllers, each controller controls only one central processing unit, and dual-channel single-control means that a storage system uses one controller to manage the two central processing units.
[0055] This embodiment analyzes according to the performance requirement information and the storage mode, and determines the target master control mode, which means that detection can be performed according to the current storage mode and application scenario, and the mode that can meet the application scenario is determined as the target master control mode. This embodiment can be controlled in a set master control mode before detection. For example, the default master control mode is set to single-channel dual control, or the default master control mode is set to dual-channel single control. The central processing unit in this embodiment can be understood as a control node.
[0056] S103, when the target master control mode is inconsistent with the historical master control mode, the master control mode switching instruction is synchronized to the soft switch that controls the interconnection signal of the central processing unit.
[0057] The SW (soft switch) in this embodiment is the CPU interconnect SW of the storage server.
[0058] S104, using a soft switch to control the interconnection signal of the central processing unit according to the master control mode switching instruction, and adjusting the relationship between the serial communication interface and the central processing unit; wherein the interconnection signal is connected or disconnected.
[0059] It should be further explained that the above-mentioned use of the soft switch to control the interconnection signal of the central processing unit according to the master control mode switching instruction and adjust the relationship between the serial communication interface and the central processing unit may include:
[0060] S1041, when it is determined that the single-channel dual-control is switched to the dual-channel single-control, the interconnection signal connection of the central processing unit is controlled by the soft switch according to the master control mode switching instruction, so as to realize the interconnection of the dual-channel central processing units;
[0061] S1042, disconnect any central processing unit from the serial communication interface, and synchronize the master control mode switching instruction to the complex programmable logic device, and use the complex programmable logic device to simultaneously control the power-on timing of the two central processing units and their peripherals, and determine that the central processing unit and various external devices are powered on as a whole motherboard. After the setting is completed, control the entire motherboard to restart, and realize the conversion from single-channel dual-control to dual-channel single-control;
[0062] S1043, or, when it is determined that the dual-channel single control is switched to the single-channel dual control, the interconnection signal of the central processing unit is disconnected by using a soft switch according to the master control mode switching instruction;
[0063] S1044, connect any central processing unit to the serial communication interface through a channel, and synchronize the master control mode switching instruction to the complex programmable logic device, and use the complex programmable logic device to control the power-on timing of the two central processing units and their peripherals respectively, to ensure that the two central processing units and their corresponding external devices are powered on as two independent integral devices. After the setting is completed, control the machine to restart and realize the switching from dual-channel single control to single-channel dual control.
[0064] In this embodiment, when the hardware architecture needs to be set from a single-channel dual-control to a dual-channel single-control, the IPMI (Intelligent Platform Management Interface) tool can be used to synchronize the setting instruction to the SW that controls the CPU interconnection signal. The SW controls the interconnection signal of the CPU according to the setting instruction to realize the interconnection of the dual-channel CPUs. The BMC (Baseboard Management Controller) simultaneously controls the SPI (Serial Peripheral Interface) of CPU1 to obtain BootBIOS (Boot BIOS refers to the process of hardware initialization and operating system booting through BIOS (Basic Input Output System) during computer startup) to cut off, so as to prevent CPU1 from conflicting with CPU0 in obtaining BIOS through SPI. Then, the BMC synchronizes the setting instruction to the CPLD (Complex Programmable Logic Controller) Device, complex programmable logic device), notifies CPLD to control the power-on sequence of two CPUs and their peripherals at the same time, ensuring that the CPU and each peripheral are powered on as a whole motherboard. After the setting is completed, the whole machine is controlled to restart. During the restart process, the conversion from dual-control single-channel to single-control dual-control is realized; when the hardware architecture needs to be set from dual-channel single control to single-channel dual control, the system synchronizes the setting instruction to the SW that controls the CPU interconnection signal through the IPMI tool. The SW controls the CPU interconnection signal to disconnect according to the setting instruction to prevent the CPU interconnection from being realized. The BMC also controls the SPI channel for CPU1 to obtain the Boot BIOS to open, allowing CPU1 to obtain the BIOS through SPI and initialize independently with CPU0. After that, the BMC synchronizes the setting instruction to the CPLD, notifying the CPLD to control the power-on sequence of the two CPUs and their peripherals respectively, ensuring that the two CPUs and their corresponding peripherals are powered on as two independent whole devices. After the setting is completed, the whole machine is controlled to restart. During the restart process, the conversion from single-control dual-channel to dual-control single-channel is realized. This embodiment provides various switching situations, so that accurate switching of the master control mode can be realized.
[0065] It should be further explained that, after using the soft switch to control the interconnection signal of the central processing unit according to the master control mode switching instruction and adjusting the relationship between the serial communication interface and the central processing unit, it can also include: detecting the adjusted cluster to determine whether the cluster performance requirements are met based on the current latest master control mode; when the cluster performance requirements are met, determining to end the process; when it is not certain that the cluster performance requirements are met, determining to adjust the cluster performance parameters, and controlling the master control mode based on the adjusted cluster performance parameters. The adjusted cluster in this embodiment refers to the cluster in which the master control mode is adjusted. Detecting the adjusted cluster. After adjusting the cluster in this embodiment, a series of performance tests are first required. These tests include but are not limited to key indicators such as response time, throughput, and resource utilization (such as CPU, memory, and disk I / O). Through these tests, the actual performance of the cluster under the current configuration can be fully evaluated. In order to more realistically reflect the performance of the cluster, tools can be used to simulate various load conditions in the actual production environment. This includes scenarios such as high concurrent requests, large data volume processing, and long-term operation to ensure that the test results have reference value. Determine whether the cluster performance requirements are met based on the current latest master control mode, and compare the current test results with the previously set performance benchmark. If the cluster performance under the current master control mode is significantly better than or at least meets the baseline requirements, it can be preliminarily judged that it meets the performance requirements. In addition to directly comparing performance indicators, other factors need to be considered comprehensively, such as system stability, scalability, security, etc. If these aspects also meet expectations, the effectiveness of the current master control mode can be further confirmed. When the cluster performance requirements are met, determine to end the process. Record the entire adjustment process, test results, and final conclusions in detail. This will help with future reviews and audits, and also provide a reference for similar projects. Although the adjustment has been completed, it is still necessary to continuously monitor the system operation status to ensure stable performance. At the same time, continuously optimize and maintain the system based on actual operation conditions.
[0066] It should be further explained that, in order to improve the accuracy of detection, the above detection of the adjusted cluster to determine whether the cluster performance requirements are met based on the current latest master control method may include: whether the cluster performance requirements, stability and security are met based on the current latest master control method; wherein, the stability of the cluster is determined based on the stable operation time, and when the stable operation time is greater than the set time threshold, it is determined to be stable. The security of the cluster in this embodiment uses a performance monitoring tool to monitor the CPU usage and temperature indicators in real time, so as to promptly detect abnormal behavior or potential security threats. Through the above steps and methods, it is possible to comprehensively evaluate whether the adjusted cluster meets the performance requirements, stability and security requirements. This helps to ensure the efficient and stable operation of the cluster and provide strong support for business development.
[0067] It should be further explained that the above detection of the adjusted cluster to determine whether the cluster performance requirements are met based on the current latest master control mode may include: detecting the adjusted cluster to determine whether the cluster performance requirements and effective capacity are met based on the current latest master control mode; wherein the effective capacity of the cluster refers to the maximum amount of tasks or data that all nodes in the cluster can jointly process within a specific time. The effective capacity evaluation in this embodiment may include task volume testing and data volume testing Task volume testing: design a series of tasks of different scales and complexities and submit them to the cluster for processing. Record the processing time and completion quality of each task to evaluate the maximum amount of tasks that the cluster can handle within a specific time. Data volume testing: inject data sets of different sizes into the cluster to observe the performance of the cluster when processing large amounts of data. Pay special attention to aspects such as data processing speed, storage capacity utilization, and data consistency. This embodiment has many benefits by detecting the adjusted cluster and determining its performance requirements and effective capacity. This not only helps to ensure that the performance of the cluster meets the standards, optimize resource utilization, and improve system stability and security.
[0068] It should be further explained that the above-mentioned method for adjusting the number of nodes may also include: when it is determined that there is a single central processing unit failure, determining to adjust the main control mode to single-channel dual control; determining the data corresponding to the failed central processing unit, and migrating the data to the normal central processing unit. When this embodiment determines that a single central processing unit fails, the main control mode can be switched in time to prevent a single CPU failure, any memory failure, and PCIe device failure, which will cause the machine to crash and reduce the overall reliability. When a single central processing unit fails, this embodiment can switch the main control mode, thereby improving the reliability of the cluster.
[0069] A method for adjusting the number of nodes provided by an embodiment of the present invention may include: S101, obtaining performance requirement information of a distributed storage cluster, and determining a storage mode according to current performance parameters and performance requirement information of the current distributed storage cluster; wherein the performance requirement information is an indicator for measuring the performance of the storage system, and the storage mode is a replica or an erasure code. S102, analyzing according to the performance requirement information and the storage mode, determining a target master control mode; wherein the master control mode is single-channel dual-control or dual-channel single-control, single-channel dual-control means that a storage system includes two controllers, each controller controls only one central processing unit, and dual-channel single-control means that a storage system uses one controller to manage the two central processing units; S103, when the target master control mode is inconsistent with the historical master control mode, synchronizing the master control mode switching instruction to the soft switch that controls the interconnection signal of the central processing unit; S104, using the soft switch to control the interconnection signal of the central processing unit according to the master control mode switching instruction, and adjusting the relationship between the serial communication interface and the central processing unit; wherein the interconnection signal is connected or disconnected. Compared with the current inability to adjust the number of nodes, the present invention synchronizes the master control mode switching instruction to the soft switch that controls the central processing unit interconnection signal when the target master control mode and the historical master control mode are inconsistent. Since the central processing units in different master control modes are different (the controller can use 1 CPU in single-channel dual-control, and 2 CPUs in dual-channel single-control), the number of nodes can be changed according to performance requirements, thereby improving the reliability of the server.
[0070] The present invention proposes a distributed storage system design based on a storage server that supports single- and dual-control switching. The storage server that supports single- and dual-control switching is a new type of hardware platform evolution of a general dual-channel server. The main feature of the hardware platform is that it can realize the conversion of single-channel dual-control or dual-channel single-control according to the settings, that is, it is different from the traditional general-purpose server and the centralized storage server that realizes the interconnection through a non-transparent bridge. Instead, it controls the switching of single and dual controls by controlling the on and off of the interconnection signal between the CPUs. The system design of the server is realized according to the framework of a single channel, that is, each CPU has a separate startup BIOS, power-on and power-off control module, and startup OS. An implementation scheme for the number of distributed system nodes is provided in the hardware architecture. The change of the master control mode can be realized through the out-of-band control mode of the BMC. When the distributed system needs to judge the single and dual control switching through the set value, it will be set according to the issued instructions.
[0071] For easier understanding, please refer to Figure 2 , Figure 2A schematic diagram of a hardware architecture based on a server supporting single- and dual-control switching storage is provided for an embodiment of the present invention. As can be seen from the figure, the architecture includes UPI (high-speed parallel bus), CPU (central processing unit), SPI (serial external interface), PCIE (high-speed parallel bus), Boot SPI (serial external interface), Raid (independent disk redundant array), NIC (network interface controller), HDD (mechanical hard disk), OS (system disk), I2C (Inter-Integrated Circuit, serial communication protocol), and 0, 1, and 2 in the CPU represent the identification of the core processor. Based on the above hardware implementation, the present invention proposes a distributed storage system design scheme based on a server supporting single- and dual-control switching storage. In the actual application of distributed storage clusters, by setting the expected IOPS, bandwidth, effective capacity, erasure algorithm and replication algorithm requirements of the distributed cluster, the implementation settings of the hardware architecture are calculated, and the setting parameters are transmitted to the BMC on the host through the IPMI out-of-band method. The BMC sequentially sets the hardware CPU interconnection switch, starts the BIOS switch and the power-on timing control in an out-of-band manner, thereby realizing the adjustment of the number of master controllers in the cluster and the corresponding management scheme of each master controller for the back-end hard disk, and then completes the deployment of the distributed storage cluster and performs the acceptance of the expected parameter requirements.
[0072] In order to make the present invention easier to understand, please refer to Figure 3 , Figure 3 A flowchart of a method for adjusting the number of nodes provided in an embodiment of the present invention may specifically include:
[0073] 1. Use the default settings (dual-path single controller) to build a distributed storage cluster and set the performance requirements of the distributed storage cluster, including but not limited to the cluster's IOPS, bandwidth, latency, available capacity, etc. Capture hardware information in-band, such as network card bandwidth, CPU specifications, hard disk capacity and quantity, cache disk capacity and quantity, analyze, and formulate a storage mode for distributed storage. Determine whether to use replication or erasure, the number of replicas, such as two or three replicas, and whether the erasure ratio is 4:2, 6:2, or 8:2. Determine the single and dual controller (single-path dual controller, dual-path single controller) implementation method in the cluster based on the distributed storage implementation method and the performance and capacity requirements for distributed storage.
[0074] 2. Taking the realization of effective capacity as an example, since the number of storage servers that ultimately realize the distributed storage cluster is certain, the corresponding hard disk specifications and quantity are also determined accordingly. When the overall capacity of the underlying hard disk is fixed, the effective capacity of the hard disk is determined according to the implementation method of distributed storage. For example, if three copies are used, the effective capacity is only 1 / 3 of the actual capacity. When two copies are used, the effective capacity is only 1 / 2 of the actual usage. If the correction and deletion method is used, the effective capacity changes with the correction and deletion ratio. Changes in effective capacity will inevitably bring about changes in the overall hardware implementation plan, the number of master controllers, and the reliability of distributed storage. This requires adjusting the number of single and dual controllers in the distributed storage cluster according to actual conditions.
[0075] 3. Determine whether the storage server in use supports single-control and dual-control switching by capturing the hardware settings. If not, end the process directly. If the storage server supports single-control and dual-control switching, then according to the performance requirements of the distributed storage cluster, use steps 1 and 2 to determine the number of single-control dual-channel and dual-control single-channel distributed storage clusters that need to be modified.
[0076] 4. Based on step 3, OS sends a setting command through IPMI. After receiving the corresponding setting command, BMC sets the CPU interconnection SW of the storage server, the channel for starting BIOS, the power-on sequence of CPLD, etc., to ensure that the target server in the distributed storage cluster is set to single-channel dual-control or dual-channel single-control. After the setting is completed, BMC returns a setting completion flag to OS through IPMI.
[0077] 5. Based on the setting instructions returned by the BMC, the distributed cluster controls the storage server whose settings need to be modified to restart, initialize again, and complete the single-control and dual-control switching. After completion, the cluster is rearranged to verify the performance and effective capacity. If it meets the requirements, the process ends. If the parameters of the distributed storage cluster need to be further adjusted, return to step 3 and make adjustments again.
[0078] The embodiment of the present invention proposes a hardware architecture based on a storage server supporting single-control and dual-control switching, so as to realize the optimization adjustment of the performance, capacity and reliability of the distributed storage cluster according to the actual application business. Under the inherent storage server hardware conditions, the number of master control nodes can be increased by switching between single and dual control. Combined with the characteristics of the distributed storage cluster copy or erasure algorithm, the requirements of the business application on the reliability of the entire system, the IOPS of the whole machine, the bandwidth and reliability can be met to the greatest extent. Through multiple adjustments and verifications of the deployment of the distributed storage cluster, the performance and effective capacity are accepted, so as to realize the optimal distributed storage cluster implementation scheme with limited storage servers.
[0079] The following is an introduction to a node quantity adjustment device provided in an embodiment of the present invention. The node quantity adjustment device described below and the node quantity adjustment method described above can be referenced to each other.
[0080] Figure 4 A schematic diagram of a node quantity adjustment device provided in an embodiment of the present invention may include:
[0081] The determination module 100 is used to obtain the performance requirement information of the distributed storage cluster, and determine the storage mode according to the current performance parameters of the current distributed storage cluster and the performance requirement information; wherein the performance requirement information is an indicator for measuring the performance of the storage system, and the storage mode is a replica or an erasure code;
[0082] The target master control mode determination module 200 is used to analyze the performance requirement information and the storage mode to determine the target master control mode; wherein the master control mode is single-channel dual-control or dual-channel single-control, the single-channel dual-control means that a storage system includes two controllers, each controller controls only one central processing unit, and the dual-channel single-control means that a storage system uses one controller to manage the two central processing units;
[0083] A switching module 300, for synchronizing a master control mode switching instruction to a soft switch controlling a central processing unit interconnection signal when the target master control mode is inconsistent with the historical master control mode;
[0084] The interconnection signal adjustment module 400 is used to control the interconnection signal of the central processing unit according to the master control mode switching instruction using the soft switch, and adjust the relationship between the serial communication interface and the central processing unit; wherein the interconnection signal is connected or disconnected.
[0085] Further, based on the above embodiment, the performance requirement information includes the number of input / output operations per second, bandwidth, latency, available capacity, as well as network card bandwidth, CPU specifications, hard disk capacity and quantity, and cache disk capacity and quantity of the cluster.
[0086] Further, based on the above embodiment, the above node quantity adjustment method may further include:
[0087] Whether the master control method switching is supported is determined by a module for determining whether the storage server in use supports the switching of the master control method;
[0088] The determination execution module is used to determine the execution step of obtaining the performance requirement information of the distributed storage cluster when supported.
[0089] Further, based on any of the above embodiments, the interconnect signal adjustment module 400 may include:
[0090] A single-channel to dual-channel module is used to control the interconnection signal connection of the central processing unit according to the master control mode switching instruction when it is determined that the single-channel dual-control is switched to the dual-channel single-control, so as to realize the interconnection of the dual-channel central processing units;
[0091] The first implementation switching unit is used to disconnect any central processing unit from the serial communication interface, and synchronize the master control mode switching instruction to the complex programmable logic device, and use the complex programmable logic device to simultaneously control the power-on timing of the two central processing units and their peripherals, determine that the central processing unit and various external devices are powered on as a whole motherboard, and after the setting is completed, control the entire unit to restart, and realize the conversion from single-channel dual-control to dual-channel single-control;
[0092] A dual-channel and single-channel unit is used to, when it is determined that the dual-channel single control is switched to the single-channel dual control, use the soft switch to control the disconnection of the interconnection signal of the central processing unit according to the master control mode switching instruction;
[0093] The second implementation switching unit is used to connect any central processing unit to the serial communication interface through a channel, and synchronize the master control mode switching instruction to the complex programmable logic device, and use the complex programmable logic device to control the power-on timing of the two central processing units and their peripherals respectively, to ensure that the two central processing units and their corresponding external devices are powered on as two independent integral devices. After the setting is completed, the machine is controlled to restart to realize the switching from dual-channel single control to single-channel dual control.
[0094] Further, based on the above embodiment, the above node quantity adjustment method may further include:
[0095] The performance judgment module is used to detect the adjusted cluster and determine whether the latest master control mode meets the cluster performance requirements;
[0096] The process ending module is used to determine the process ending when the cluster performance requirements are met;
[0097] The cluster performance parameter adjustment module is used to determine to adjust the cluster performance parameters when it is uncertain whether the cluster performance requirements are met, and control the master control mode based on the adjusted cluster performance parameters.
[0098] Further, based on the above embodiment, the performance judgment module may include:
[0099] The cluster detection unit is used to detect the adjusted cluster to determine whether the cluster performance requirements and effective capacity are met based on the current latest master control method; wherein the effective capacity of the cluster refers to the maximum amount of tasks or data that all nodes in the cluster can jointly process within a specific time.
[0100] Further, based on the above embodiment, the above node quantity adjustment method may further include:
[0101] A fault judgment module, used for determining to adjust the main control mode to single-channel dual control when it is determined that a single central processing unit fails;
[0102] The switching module is used to determine the data corresponding to the faulty central processing unit and migrate the data to the normal central processing unit.
[0103] It should be noted that the order of the modules and units in the above-mentioned node quantity adjustment device can be changed without affecting the logic.
[0104] Figure 4 The description of the features in the corresponding embodiments can be found in Figure 4 The relevant descriptions of the corresponding embodiments will not be repeated here one by one.
[0105] A node quantity adjustment device provided by an embodiment of the present invention may include: a storage mode determination module 100, which is used to obtain performance requirement information of a distributed storage cluster, and determine the storage mode according to current performance parameters of the current distributed storage cluster and the performance requirement information; wherein the performance requirement information is an indicator for measuring the performance of the storage system, and the storage mode is a replica or an erasure code;
[0106] The target master control mode determination module 200 is used to analyze the performance requirement information and the storage mode to determine the target master control mode; wherein the master control mode is single-channel dual-control or dual-channel single-control, the single-channel dual-control means that a storage system includes two controllers, each controller controls only one central processing unit, and the dual-channel single-control means that a storage system uses one controller to manage the two central processing units;
[0107] A switching module 300, for synchronizing a master control mode switching instruction to a soft switch controlling a central processing unit interconnection signal when the target master control mode is inconsistent with the historical master control mode;
[0108] The interconnection signal adjustment module 400 is used to control the interconnection signal of the central processing unit according to the master control mode switching instruction using the soft switch, and adjust the relationship between the serial communication interface and the central processing unit; wherein the interconnection signal is connected or disconnected. Compared with the current inability to adjust the number of nodes, when the target master control mode and the historical master control mode are inconsistent, the present invention synchronizes the master control mode switching instruction to the soft switch that controls the interconnection signal of the central processing unit. Since the central processing units in different master control modes are different, the number of nodes can be changed according to performance requirements, thereby improving the reliability of the server.
[0109] Figure 5 A schematic diagram of a node quantity adjustment device provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the node quantity adjustment device includes: a memory 60, for storing a computer program;
[0110] The processor 61 is used to implement the steps of the node quantity adjustment method in the above embodiment when executing a computer program.
[0111] The node quantity adjustment device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.
[0112] Among them, the processor 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 61 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0113] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein, after the computer program is loaded and executed by the processor 61, it can implement the relevant steps of the node quantity adjustment method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 602 may include Windows, Unix, Linux, etc. Data 603 may include but is not limited to data required for node quantity adjustment, etc.
[0114] In some embodiments, the node quantity adjustment device may also include a display screen 62 , an input and output interface 63 , a communication interface 64 , a power supply 65 , and a communication bus 66 .
[0115] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation on the node quantity adjustment device, and may include more or fewer components than those shown in the figure.
[0116] It is understandable that if the node quantity adjustment method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the current technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, disk or optical disk and other media that can store program code.
[0117] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for adjusting the number of nodes are implemented.
[0118] The above is a detailed introduction to a node quantity adjustment method, device, equipment and readable storage medium provided by an embodiment of the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0119] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0120] The above is a detailed introduction to a node quantity adjustment method, device, equipment and readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A method for adjusting the number of nodes, characterized in that: include: Acquire performance requirement information of a distributed storage cluster, and determine the storage mode according to current performance parameters of the current distributed storage cluster and the performance requirement information; wherein the performance requirement information is an indicator for measuring the performance of the storage system, and the storage mode is a replica or an erasure code; Analyze the performance requirement information and the storage mode to determine the target master control mode; wherein the master control mode is single-channel dual-control or dual-channel single-control, the single-channel dual-control means that a storage system includes two controllers, each controller controls only one central processing unit, and the dual-channel single-control means that a storage system uses one controller to manage the two central processing units; When the target master control mode is inconsistent with the historical master control mode, the master control mode switching instruction is synchronized to the soft switch controlling the interconnection signal of the central processing unit; The soft switch is used to control the interconnection signal of the central processing unit according to the master control mode switching instruction, and the relationship between the serial communication interface and the central processing unit is adjusted; wherein the interconnection signal is connected or disconnected.
2. The node quantity adjustment method according to claim 1, characterized in that: The performance requirement information includes the number of input / output operations per second, bandwidth, latency, available capacity, as well as network card bandwidth, central processing unit specifications, hard disk capacity and quantity, and cache disk capacity and quantity of the cluster.
3. The node quantity adjustment method according to claim 1, characterized in that: Before obtaining the performance requirement information of the distributed storage cluster, the method further includes: Determine whether the storage server in use supports the switching of the master control mode; When supported, determine the steps for performing the acquisition of performance requirement information for the distributed storage cluster.
4. The method for adjusting the number of nodes according to any one of claims 1 to 3, characterized in that: The method of using the soft switch to control the interconnection signal of the central processing unit according to the master control mode switching instruction and adjusting the relationship between the serial communication interface and the central processing unit includes: When it is determined that the single-channel dual-control mode is switched to the dual-channel single-control mode, the soft switch is used to control the interconnection signal connection of the central processing unit according to the master control mode switching instruction to realize the interconnection of the dual-channel central processing units; Cut off any central processing unit from the serial communication interface, and synchronize the master control mode switching instruction to the complex programmable logic device, and use the complex programmable logic device to simultaneously control the power-on timing of the two central processing units and their peripherals, and determine that the central processing unit and various external devices are powered on as a whole motherboard. After the setting is completed, control the entire machine to restart, and realize the conversion from single-channel dual-control to dual-channel single-control; Alternatively, when it is determined that the dual-channel single-control is switched to the single-channel dual-control, the interconnection signal of the central processing unit is disconnected by using the soft switch according to the master control mode switching instruction; Connect any central processing unit to the serial communication interface through a channel, and synchronize the master control mode switching instruction to the complex programmable logic device, and use the complex programmable logic device to control the power-on timing of the two central processing units and their peripherals respectively, to ensure that the two central processing units and their corresponding external devices are powered on as two independent integral devices. After the setting is completed, control the machine to restart and realize the switching from dual-channel single control to single-channel dual control.
5. The node quantity adjustment method according to claim 1, characterized in that: After using the soft switch to control the interconnection signal of the central processing unit according to the master control mode switching instruction and adjusting the relationship between the serial communication interface and the central processing unit, the method further includes: Test the adjusted cluster to determine whether the latest master control method meets the cluster performance requirements; When the cluster performance requirements are met, the process is terminated. When it is uncertain whether the cluster performance requirement is met, it is determined to adjust the cluster performance parameters, and the master control mode is controlled based on the adjusted cluster performance parameters.
6. The method for adjusting the number of nodes according to claim 5, characterized in that: The step of testing the adjusted cluster to determine whether the latest master control mode meets the cluster performance requirements includes: The adjusted cluster is tested to determine whether the current latest master control method meets the cluster performance requirements and effective capacity; wherein the effective capacity of the cluster refers to the maximum amount of tasks or data that all nodes in the cluster can jointly process within a specific time.
7. The node quantity adjustment method according to claim 1, characterized in that: The node quantity adjustment method further includes: When it is determined that a single central processing unit fails, determining to adjust the master control mode to single-channel dual control; The data corresponding to the faulty central processing unit is determined, and the data is migrated to a normal central processing unit.
8. A node quantity adjustment device, characterized in that: include: A storage mode determination module, used to obtain performance requirement information of a distributed storage cluster, and determine the storage mode according to current performance parameters of the current distributed storage cluster and the performance requirement information; wherein the performance requirement information is an indicator for measuring the performance of the storage system, and the storage mode is a replica or an erasure code; a target master control mode determination module, configured to determine a target master control mode by analyzing the performance requirement information and the storage mode; wherein the master control mode is single-channel dual-control or dual-channel single-control, wherein the single-channel dual-control means that a storage system includes two controllers, each controller controls only one central processing unit, and the dual-channel single-control means that a storage system uses one controller to manage the two central processing units; A switching module, used for synchronizing the master control mode switching instruction to the soft switch controlling the interconnection signal of the central processing unit when the target master control mode is inconsistent with the historical master control mode; The interconnection signal adjustment module is used to control the interconnection signal of the central processing unit according to the master control mode switching instruction using the soft switch, and adjust the relationship between the serial communication interface and the central processing unit; wherein the interconnection signal is connected or disconnected.
9. A node quantity adjustment device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program to implement the steps of the node quantity adjustment method according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the node quantity adjustment method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Multi-node computing power server and operation method
CN120491771A
