Method and apparatus for processing of a baseboard management controller
Patent Information
- Application Number
- CN202310484851.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-04-28
AI Technical Summary
[0004]本发明提供一种基板管理控制器的处理方法以及装置,以便解决基板管理控制器稳定性较差的问题
[0074]在本发明实施例中,在接收到目标指令的情况下,基于目标负载列表以及目标指令指示的目标基板管理控制器地址,确定目标基板管理控制器地址对应的目标节点;目标负载列表中包括多个节点与多个基板管理控制器地址的对应关系;在目标节点为当前节点的情况下,基于目标基板管理控制器地址以及当前节点中的实例缓存对应的基板管理控制器地址,确定目标实例缓存;基于目标实例缓存,对目标基板管理控制器执行目标指令指示的操作;目标基板管理控制器为目标基板管理控制器地址对应的基板管理控制器。这样,在节点接收到目标指令的情况下,可以基于目标负载列表中包含的多个节点与多个基板管理控制器地址的对应关系,判断当前节点是否为目标节点,即当前节点是否需要响应目标指令,在当前节点为目标节点,即当前节点为需要响应目标指令的目标节点的情况下,基于目标实例缓存,对目标基板管理控制器执行目标指令指示的操作,可以避免多个节点同时对同一目标指令进行响应处理,造成基板管理控制器稳定性受影响,提高了基板管理控制器的稳定性。
Smart Images

Figure CN116610365B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of network technology, and in particular relates to a processing method and apparatus for a baseboard management controller. Background Technology
[0002] With the continuous development of science and technology, servers are being used more and more widely. As a key component of the server, the Baseboard Manager Controller (BMC) is also an important component for users to monitor and manage the server. Therefore, the robustness of its software system is extremely important, and it is necessary to monitor the actual operating status inside the Baseboard Manager Controller in real time.
[0003] In related technologies, under distributed deployment mode, there may be multiple nodes responding to the same command at the same time to operate the same baseboard management controller, resulting in poor stability of the baseboard management controller. Summary of the Invention
[0004] This invention provides a processing method and apparatus for a substrate management controller, in order to solve the problem of poor stability of the substrate management controller.
[0005] To solve the above-mentioned technical problems, the present invention is implemented as follows:
[0006] In a first aspect, the present invention provides a processing method for a baseboard management controller, applied to any one of multiple nodes, the method comprising:
[0007] Upon receiving a target instruction, the target node corresponding to the target baseboard management controller address is determined based on the target load list and the target baseboard management controller address indicated by the target instruction; the target load list includes the correspondence between the multiple nodes and the multiple baseboard management controller addresses;
[0008] When the target node is the current node, the target instance cache is determined based on the target baseboard management controller address and the baseboard management controller address corresponding to the instance cache in the current node;
[0009] Based on the target instance cache, the operation indicated by the target instruction is executed on the target substrate management controller; the target substrate management controller is the substrate management controller corresponding to the address of the target substrate management controller.
[0010] Optionally, the plurality of nodes includes a master node and a plurality of slave nodes; when the current node is the master node, the method further includes:
[0011] For any node to be assigned among the plurality of nodes, the response time required for the node to be assigned to establish a connection with each baseboard management controller in the distributed system is obtained, resulting in multiple target response times; the distributed system contains the plurality of nodes.
[0012] Based on the target response time corresponding to each of the multiple nodes, determine at least one baseboard management controller that the node to be assigned needs to manage;
[0013] If at least one baseboard management controller meets the preset allocation conditions, the correspondence between the node to be allocated and the baseboard management controller address of the at least one baseboard management controller is recorded in the target load list;
[0014] If at least one baseboard management controller does not meet the preset allocation conditions, the operation of determining the at least one baseboard management controller to be managed by the node to be allocated is re-executed based on the target response time corresponding to each of the plurality of nodes.
[0015] Optionally, after determining the at least one baseboard management controller to be managed by the node to be assigned based on the target response time corresponding to each of the plurality of nodes, the method further includes:
[0016] A first ratio is determined based on the sum of the historical response times of the at least one baseboard management controller and the total historical response time of all baseboard management controllers in the distributed system;
[0017] The second ratio is determined based on the load index value corresponding to the node to be assigned, the load index value of the master node, and the load index values of each slave node.
[0018] If the difference between the first ratio and the second ratio is less than a first preset threshold, it is determined that the at least one substrate management controller meets the preset allocation condition.
[0019] If the difference between the first ratio and the second ratio is not less than a first preset threshold, it is determined that the at least one substrate management controller does not meet the preset allocation conditions.
[0020] Optionally, before determining the first ratio based on the sum of the historical response times of the at least one baseboard management controller and the total historical response time of all baseboard management controllers in the distributed system, the method further includes:
[0021] Based on the number of historical requests received by each of the at least one baseboard management controllers and the target response time, the historical response time of each baseboard management controller is determined;
[0022] Based on the number of historical requests received by each of the baseboard management controllers in the distributed system and the first response time, the first historical response time corresponding to each of the baseboard management controllers is determined;
[0023] Based on the first historical response time corresponding to each of the baseboard management controllers, the total historical response time of all baseboard management controllers in the distributed system is determined.
[0024] Optionally, before determining the second ratio based on the load metric value corresponding to the node to be assigned, the load metric value of the master node, and the load metric values of each of the slave nodes, the method includes:
[0025] Obtain the processor performance information, memory performance information, disk performance information, and network performance information of the node to be allocated;
[0026] Obtain the first weight corresponding to the processor performance information, the second weight corresponding to the memory performance information, the third weight corresponding to the disk performance information, and the fourth weight corresponding to the network performance information;
[0027] Based on the processor performance information, the first weight, the memory performance information, the second weight, the disk performance information, the third weight, the network performance information, and the fourth weight, the load index value corresponding to the node to be allocated is determined.
[0028] Optionally, the method further includes:
[0029] Obtain the average resource utilization rate of the master node and each of the slave nodes within the target duration;
[0030] If the difference between the average resource utilization of the master node and any of the slave nodes, or between any two of the slave nodes, is greater than a second preset threshold, the operation of determining at least one baseboard management controller to be managed by the node to be assigned is re-executed based on the target response time corresponding to each of the plurality of nodes.
[0031] Optionally, determining the target instance cache based on the target baseboard management controller address and the baseboard management controller address corresponding to the instance cache in the current node includes:
[0032] Retrieve the instance cache in the current node;
[0033] If an instance cache exists that matches the target substrate management controller address, the instance cache corresponding to the substrate management controller address that matches the target substrate management controller address is obtained and used as the instance cache to be filtered; different instance caches to be filtered correspond to different processing operations;
[0034] The cached instances whose corresponding processing operations are consistent with the operations indicated by the target instruction are identified as target instance caches.
[0035] If there is no instance cache with the same target baseboard management controller address as the target baseboard management controller address, or if there is no instance cache to be filtered with the same processing operation as the operation indicated by the target instruction, the target instance cache is created based on the target instruction.
[0036] Optionally, the operation of executing the target instruction indication on the target substrate management controller based on the target instance cache includes:
[0037] When the target instruction is a target monitoring instruction, the system logs into the target baseboard management controller based on the target instance cache, obtains relevant information about the server through the target baseboard management controller, and performs the monitoring operation indicated by the target monitoring instruction on the server based on the relevant information; the server is equipped with the target baseboard management controller.
[0038] If the target instruction is a target configuration instruction, the target baseboard management controller is logged in based on the target instance cache, and the configuration operation indicated by the target configuration instruction is executed on the target baseboard management controller.
[0039] In a second aspect, the present invention provides a processing apparatus for a substrate management controller, applied to any one of a plurality of nodes, the apparatus comprising:
[0040] The first determining module is configured to, upon receiving a target instruction, determine the target node corresponding to the target baseboard management controller address based on a target load list and the target baseboard management controller address indicated by the target instruction; the target load list includes the correspondence between the plurality of nodes and the plurality of baseboard management controller addresses;
[0041] The second determining module is used to determine the target instance cache based on the target baseboard management controller address and the baseboard management controller address corresponding to the instance cache in the current node when the target node is the current node;
[0042] The first execution module is used to execute the operation indicated by the target instruction on the target baseboard management controller based on the target instance cache; the target baseboard management controller is the baseboard management controller corresponding to the address of the target baseboard management controller.
[0043] Optionally, the plurality of nodes includes a master node and a plurality of slave nodes; the device may further include:
[0044] The first acquisition module is used to acquire, for any one of the multiple nodes to be assigned, the response time required for the node to be assigned to establish a connection with each baseboard management controller in the distributed system, thereby obtaining multiple target response times; the multiple nodes are deployed in the distributed system.
[0045] The third determining module is used to determine, based on the target response time corresponding to each of the plurality of nodes, at least one baseboard management controller that the node to be assigned needs to manage.
[0046] The first recording module is used to record the correspondence between the node to be allocated and the baseboard management controller address of the at least one baseboard management controller to the target load list when the at least one baseboard management controller meets the preset allocation conditions.
[0047] The fourth determining module is used to re-execute the operation of determining the at least one baseboard management controller to be managed by the node to be assigned based on the target response time corresponding to each of the plurality of nodes when the at least one baseboard management controller does not meet the preset allocation conditions.
[0048] Optionally, the device may further include:
[0049] The fifth determining module is used to determine a first ratio based on the sum of the historical response times of the at least one baseboard management controller and the total historical response time of all baseboard management controllers in the distributed system;
[0050] The sixth determining module is used to determine a second ratio based on the load index value corresponding to the node to be assigned, the load index value of the master node, and the load index values of each slave node.
[0051] The seventh determining module is used to determine that the at least one baseboard management controller meets the preset allocation conditions when the difference between the first ratio and the second ratio is less than a first preset threshold.
[0052] The eighth determining module is used to determine that the at least one baseboard management controller does not meet the preset allocation conditions when the difference between the first ratio and the second ratio is not less than the first preset threshold.
[0053] Optionally, the device may further include:
[0054] The ninth determining module is used to determine the historical response time of each of the at least one baseboard management controllers based on the number of historical requests received by each baseboard management controller and the target response time.
[0055] The tenth determining module is used to determine the first historical response time corresponding to each of the baseboard management controllers based on the number of historical requests received by each of the baseboard management controllers in the distributed system and the first response time.
[0056] The eleventh determining module is used to determine the total historical response time of all baseboard management controllers in the distributed system based on the first historical response time corresponding to each baseboard management controller.
[0057] Optionally, the device may further include:
[0058] The second acquisition module is used to acquire the processor performance information, memory performance information, disk performance information and network performance information of the node to be allocated;
[0059] The third acquisition module is used to acquire the first weight corresponding to the processor performance information, the second weight corresponding to the memory performance information, the third weight corresponding to the disk performance information, and the fourth weight corresponding to the network performance information.
[0060] The twelfth determining module is used to determine the load index value corresponding to the node to be allocated based on the processor performance information, the first weight, the memory performance information, the second weight, the disk performance information, the third weight, the network performance information, and the fourth weight.
[0061] Optionally, the device may further include:
[0062] The fourth acquisition module is used to acquire the average resource utilization rate of the master node and each of the slave nodes within the target duration.
[0063] The thirteenth determining module is used to re-execute the operation of determining at least one baseboard management controller to be managed by the node to be assigned based on the target response time corresponding to each of the plurality of nodes when the difference between the average resource utilization rate of the master node and any of the slave nodes, or any two of the slave nodes, is greater than a second preset threshold.
[0064] Optionally, the second determining module may include:
[0065] The first acquisition submodule is used to acquire the instance cache in the current node;
[0066] The second acquisition submodule is used to acquire, when there is an instance cache whose corresponding baseboard management controller address matches the target baseboard management controller address, as an instance cache to be filtered; different instance caches to be filtered correspond to different processing operations;
[0067] The first determining submodule is used to determine the cached instances to be filtered that have the same processing operation as the operation indicated by the target instruction as the target instance cache;
[0068] The first creation module is used to create the target instance cache based on the target instruction when there is no instance cache with the target baseboard management controller address that matches the target baseboard management controller address, or when there is no instance cache to be filtered with the corresponding processing operation that matches the operation indicated by the target instruction.
[0069] Optionally, the first execution module may include:
[0070] The first monitoring submodule is used to log in to the target baseboard management controller based on the target instance cache when the target instruction is a target monitoring instruction, and obtain relevant information about the server through the target baseboard management controller, and perform the monitoring operation indicated by the target monitoring instruction on the server based on the relevant information; the server is equipped with the target baseboard management controller;
[0071] The first configuration submodule is used to log in to the target baseboard management controller based on the target instance cache when the target instruction is a target configuration instruction, and to perform the configuration operation indicated by the target configuration instruction on the target baseboard management controller.
[0072] Thirdly, the present invention provides an electronic device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the processing method of the aforementioned baseboard management controller when executing the program.
[0073] Fourthly, the present invention provides a readable storage medium that, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the processing method of the aforementioned board management controller.
[0074] In this embodiment of the invention, upon receiving a target instruction, a target node corresponding to the target substrate management controller address is determined based on the target load list and the target substrate management controller address indicated by the target instruction. The target load list includes a correspondence between multiple nodes and multiple substrate management controller addresses. If the target node is the current node, a target instance cache is determined based on the target substrate management controller address and the substrate management controller address corresponding to the instance cache in the current node. Based on the target instance cache, the operation indicated by the target instruction is executed on the target substrate management controller. The target substrate management controller is the substrate management controller corresponding to the target substrate management controller address. Thus, when a node receives a target instruction, it can determine whether the current node is a target node, i.e., whether the current node needs to respond to the target instruction, based on the correspondence between multiple nodes and multiple substrate management controller addresses contained in the target load list. If the current node is a target node, i.e., the current node needs to respond to the target instruction, the operation indicated by the target instruction is executed on the target substrate management controller based on the target instance cache. This avoids multiple nodes simultaneously responding to the same target instruction, which could affect the stability of the substrate management controller and improve its stability. Attached Figure Description
[0075] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0076] Figure 1 This is a flowchart of the processing method of a baseboard management controller provided in an embodiment of the present invention;
[0077] Figure 2 This is a schematic diagram of a master node architecture provided in an embodiment of the present invention;
[0078] Figure 3 This is a structural diagram of a processing device for a substrate management controller provided in an embodiment of the present invention;
[0079] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0080] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0081] Figure 1 This is a flowchart illustrating the processing steps of a baseboard management controller according to an embodiment of the present invention, applicable to any node among multiple nodes. These multiple nodes can be deployed in a distributed system, which can be a group of computers interconnected via a network to exchange messages and communicate, coordinating their behavior. Each node can be a single machine with a management system deployed on it, interacting with each other to achieve a common goal. The baseboard management controller is a dedicated microcontroller embedded in the motherboard of a computer (typically a server). The baseboard management controller is responsible for managing the interface between the system management software and the platform hardware. Each node can manage one or more baseboard management controllers; that is, the distributed system can contain multiple servers, and correspondingly, multiple baseboard management controllers.
[0082] like Figure 1 As shown, the method may include:
[0083] Step 101: Upon receiving a target instruction, determine the target node corresponding to the target baseboard management controller address based on the target load list and the target baseboard management controller address indicated by the target instruction; the target load list includes the correspondence between the multiple nodes and the multiple baseboard management controller addresses.
[0084] In this embodiment of the invention, the target instruction can be an instruction used to instruct processing operations on the baseboard management controller, such as status monitoring operations, component information acquisition operations, baseboard management controller configuration operations, firmware upgrade operations, power and fan management operations, log management operations, etc. The target instruction may include the target baseboard management controller address; that is, the target instruction is used to perform the processing operation indicated by the target instruction on the target baseboard management controller corresponding to the target baseboard management controller address. When a node receives a target instruction, it determines the target baseboard management controller address indicated by the target instruction. From the correspondence between nodes and baseboard management controllers contained in the target load list, it determines the node corresponding to the target baseboard management controller address as the target node. The target load list may contain multiple correspondences between nodes and multiple baseboard management controller addresses. This correspondence can represent the management relationship between a node and a baseboard management controller; that is, if node A in the target load list corresponds to baseboard management controller address A, then node A manages baseboard management controller A. One node can correspond to multiple baseboard management controller addresses, meaning one node can manage multiple baseboard management controllers, but one baseboard management controller address corresponds to a unique node, meaning one baseboard management controller is managed by a unique node. Since a baseboard management controller can only be managed by a single node, correspondingly, in the target load list, a baseboard management controller address corresponds to only one node. That is, for a target instruction, there is only one corresponding target node among multiple nodes in the distributed system.
[0085] Step 102: If the target node is the current node, determine the target instance cache based on the target baseboard management controller address and the baseboard management controller address corresponding to the instance cache in the current node.
[0086] In this embodiment of the invention, when a target node is determined based on the target load list, if the target node is the current node, and the current node is the node acting as the execution subject in this embodiment (i.e., the node that receives the target instruction), indicating that the current node is the only node managing the substrate management controller corresponding to the target substrate management controller address, meaning the current node needs to respond to the target instruction, then the task management module calls the substrate management controller management module to obtain the instance cache in the current node's cache area. The instance cache corresponding to the target substrate management controller address and capable of implementing the processing operation indicated by the target instruction is determined as the target instance cache. The target instance cache is used to execute the processing operation indicated by the target instruction on the target substrate management controller. The instance cache can be obtained by copying a specific implementation class. Each instance cache can correspond to one substrate management controller address, meaning each instance cache can be used for one type of processing operation on the substrate management controller. Based on the instance cache, the processing operation in the specific implementation class can be implemented for the substrate management controller corresponding to its corresponding substrate management controller address. The instance cache can include session information, i.e., the login information used to log in to the baseboard management controller. Based on the session information, operations to log in to the baseboard management controller can be performed. The instance cache can also include information corresponding to different processing operations performed on the baseboard management controller, such as status monitoring operations, component information acquisition operations, baseboard management controller configuration operations, firmware upgrade operations, power and fan management operations, log management operations, etc. The instance cache and the baseboard management controller address can be stored in the form of key-value pairs, i.e., the baseboard management controller address is the key and the instance cache is the value.
[0087] For example, when the target substrate management controller address is obtained, all key-value pairs in the cache area of the current node are obtained, the target substrate management controller address is matched with the keys in all key-value pairs, and then the value (instance cache) in the key-value pair that matches the processing operation indicated by the target instruction is determined according to the processing operation that can be implemented. Thus, the target instance cache corresponding to the target substrate management controller address can be determined.
[0088] Understandably, to avoid the baseboard management controller session being saturated due to multi-threaded concurrent execution, and to ensure that only one instance exists in the process, each processing operation performed on the same baseboard management controller corresponds to only one instance cache. That is, each processing operation performed by a node on the same baseboard management controller corresponds to a separate instance cache. Each instance cache corresponding to the same baseboard management controller address stored in the node's cache area corresponds to a different processing operation. This avoids the waste of cache resources caused by multiple instance caches with the same function performing the same processing operation on the same baseboard management controller. Simultaneously, it ensures that in actual execution, the same processing operation performed on the same baseboard management controller can be implemented through the same instance cache.
[0089] Step 103: Based on the target instance cache, execute the operation indicated by the target instruction on the target baseboard management controller; the target baseboard management controller is the baseboard management controller corresponding to the address of the target baseboard management controller.
[0090] In this embodiment of the invention, since the target instance cache is obtained by copying a specific implementation class, which is used to implement the content agreed upon in the interface, the target instance cache allows the target baseboard management controller to perform operations indicated by the target instruction; that is, the interface can be called to perform processing operations indicated by the target instruction.
[0091] In summary, in this embodiment of the invention, upon receiving a target instruction, the target node corresponding to the target substrate management controller address is determined based on the target load list and the target substrate management controller address indicated by the target instruction. The target load list includes a correspondence between multiple nodes and multiple substrate management controller addresses. If the target node is the current node, a target instance cache is determined based on the target substrate management controller address and the substrate management controller address corresponding to the instance cache in the current node. Based on the target instance cache, the operation indicated by the target instruction is executed on the target substrate management controller. The target substrate management controller is the substrate management controller corresponding to the target substrate management controller address. Thus, when a node receives a target instruction, it can determine whether the current node is a target node, i.e., whether the current node needs to respond to the target instruction, based on the correspondence between multiple nodes and multiple substrate management controller addresses contained in the target load list. If the current node is a target node, i.e., the current node needs to respond to the target instruction, the operation indicated by the target instruction is executed on the target substrate management controller based on the target instance cache. This avoids multiple nodes simultaneously responding to the same target instruction, which could affect the stability of the substrate management controller and improve its stability.
[0092] Furthermore, after the system has been running for a period of time, concurrent execution of multiple threads will create multiple sessions to log in to the baseboard management controller. The baseboard management controller retains login records, i.e., session information, which can lead to a situation where the baseboard management controller's sessions are fully occupied. In the case of concurrent multi-threading, this embodiment of the invention can directly execute the processing operation indicated by the target instruction based on a determined target instance cache, without creating multiple sessions on the baseboard management controller and then logging in to the baseboard management controller. Therefore, it can avoid session accumulation in the baseboard management controller to a certain extent.
[0093] Optionally, the plurality of nodes includes a master node and a plurality of slave nodes.
[0094] In this system, master and slave nodes can be determined based on their load performance. Specifically, the node with the highest load metric value is designated as the master node, and all other nodes are designated as slave nodes. For example, the task management module of any node can be used to obtain performance parameter information for each node. This performance parameter information can include processor performance, memory performance, disk performance, and network performance, etc., and a corresponding weight value can be assigned to each performance parameter. Based on the performance parameter information and its corresponding weight values, the load metric value for each node is determined. The weight values can be defined according to the node's purpose. For example, if a node has high network bandwidth requirements, the weight value for network performance information should be increased; if a node has high local read / write requirements, the weight value for disk performance information should be increased. In this way, the resulting load metric values for each node not only reflect the node's performance but also, to some extent, reflect its load capacity under different operational requirements.
[0095] For example, the load index value P can be determined using Formula 1:
[0096]
[0097] Where P is the load metric value corresponding to the node, x 1、 x2、…x n They can represent different types of performance parameter information, w1, w2, ... w n They can represent the weight values corresponding to different performance information, for example, w1 is the weight value corresponding to x1, w2 is the weight value corresponding to x2, and so on.
[0098] When the current node is the master node, the embodiments of the present invention may further include the following steps:
[0099] Step 201: For any node to be assigned among the plurality of nodes, obtain the response time required for the node to be assigned to establish a connection with each baseboard management controller in the distributed system, and obtain multiple target response times; the distributed system has the plurality of nodes deployed.
[0100] In this embodiment of the invention, the node to be assigned can be a master node or any slave node in the distributed system, or it can be a subset of nodes in the distributed system. For example, a subset of nodes can be multiple nodes in the distributed system with identical node functions. For the master node and any slave node to be assigned, the master node can obtain the response time required for the node to be assigned to establish a connection with any baseboard management controller in the distributed system, thus obtaining the target response time. For all baseboard management controllers in the distributed system, the target response time for establishing a connection between the node to be assigned and them is obtained, thus obtaining multiple target response times.
[0101] Step 202: Based on the target response time corresponding to each of the multiple nodes, determine at least one baseboard management controller that the node to be assigned needs to manage.
[0102] In this embodiment of the invention, the multiple target response times corresponding to the node to be assigned can characterize the connection speed between the node to be assigned and each baseboard management controller. Therefore, based on the multiple target response times corresponding to all nodes in the distributed system, the node to be assigned can be assigned a node with a smaller target response time as much as possible. After obtaining the multiple target response times corresponding to the master node and each slave node, all target response times can be sorted, and each baseboard manager in the distributed system can be assigned to each node according to the sorting order, and at least one baseboard management controller that the current node to be assigned needs to manage can be determined.
[0103] In one possible implementation, after obtaining the multiple target response times corresponding to the master node and each slave node, the target response times of each baseboard management controller, the master node, and each slave node can be obtained separately. Based on the multiple target response times corresponding to the baseboard manager, the baseboard manager is preferentially assigned to the node with the smaller target response time.
[0104] Step 203: If at least one baseboard management controller meets the preset allocation conditions, record the correspondence between the node to be allocated and the baseboard management controller address of the at least one baseboard management controller in the target load list.
[0105] In this embodiment of the invention, after determining at least one baseboard server to be managed by the node to be assigned, it is necessary to verify whether the at least one baseboard server assigned to the node to be assigned meets the preset allocation conditions. If the preset allocation conditions are met, it indicates that at least one baseboard server can be assigned to be managed by the node to be assigned. Then, the address of at least one baseboard management controller corresponding to at least one baseboard management controller is obtained, and the correspondence between the node to be assigned and the address of at least one baseboard management controller is recorded in the target load list. The preset allocation conditions may be a first ratio of the sum of the historical response times of the at least one baseboard management controller managed by the node to be assigned to the total historical response time of the baseboard management controllers managed by all nodes in the distributed system, and the difference between the load index value of the node to be assigned and the second ratio of the total load index value of all nodes in the distributed system is less than a first preset threshold. Since the historical response time of a node and the baseboard management controller is positively correlated with the historical computing resources consumed by the node, the longer the historical response time, the more node requests the baseboard management controller receives, and the more computing resources it consumes. Therefore, the sum of the historical response times of the at least one baseboard management controller managed by the node to be assigned can, to some extent, reflect the historical computing resource consumption of the node to be assigned. In other words, to ensure load balancing across nodes, the ratio of historical computing resources consumed by the node to be allocated to the total historical computing resources consumed in the distributed system should be as close as possible to the ratio of the load capacity of the node to be allocated to the total load capacity of all nodes. This is considered to meet the preset allocation conditions. When both the master node and each slave node have determined the baseboard management controller they need to manage, the master node distributes the target load list to each slave node, enabling each slave node to determine whether it needs to respond to the target command based on the target load list.
[0106] Understandably, upon initially obtaining the correspondence between the nodes to be assigned and at least one baseboard management controller address, a target load list is created and stored in a designated storage area, and the correspondence is recorded in the target load list. Subsequently, upon obtaining the correspondence between other nodes to be assigned and at least one baseboard management controller address, the target load list is retrieved from the designated storage area, and the correspondence is recorded in the target load list.
[0107] Step 204: If at least one baseboard management controller does not meet the preset allocation conditions, re-execute the operation of determining at least one baseboard management controller to be managed by the node to be allocated based on the target response time corresponding to each of the multiple nodes.
[0108] In this embodiment of the invention, if at least one baseboard management controller does not meet the preset allocation conditions, it indicates that the at least one baseboard management controller allocated to the node to be allocated cannot achieve load balancing among the nodes. Therefore, it is necessary to readjust the at least one baseboard management controller to be managed by the node to be allocated based on the target response time of each of the multiple nodes. Then, based on the adjustment result, it is determined whether the at least one baseboard management controller allocated to the node to be allocated this time meets the preset allocation conditions, until the at least one baseboard management controller allocated to the node to be allocated meets the preset allocation conditions.
[0109] In this embodiment of the invention, the master node allocates at least one baseboard management controller to the node to be assigned based on the target response time. Then, by determining whether the at least one baseboard management controller meets preset allocation conditions, the master node determines the baseboard management controller that the node to be assigned actually needs to manage, and obtains a target load list. In this way, the master node only records a baseboard management controller to the target load list if at least one baseboard management controller meets the preset allocation conditions, improving the reliability of the correspondence between multiple nodes and multiple baseboard management controller addresses in the target load list.
[0110] Optionally, embodiments of the present invention may further include the following steps:
[0111] Step 301: Determine a first ratio based on the sum of the historical response times of the at least one baseboard management controller and the total historical response time of all baseboard management controllers in the distributed system.
[0112] In this embodiment of the invention, the sum of the historical response times of at least one baseboard management controller is obtained. The historical response time can be the response time required by the baseboard management controller to respond to one or more node requests within a preset time. The historical response time of any one of the at least one baseboard management controllers can be determined based on the target response time between the node to be assigned and the baseboard management controller, and the number of node requests received by the baseboard management controller within the preset time. The sum of the historical response times required by each baseboard management controller in the distributed system to respond to multiple node requests within the preset time is obtained as the total historical response time. The ratio of the sum of the historical response times of at least one baseboard management controller to the total response time is determined as a first ratio, S1, which can be determined by Formula 2.
[0113]
[0114] In this distributed system, assuming there are n nodes, and for any node k among the n nodes, node k manages l baseboard management controllers, then T lk f represents the target response time required for the l-th baseboard management controller managed by node k to establish a connection with node k.l Let T represent the number of requests received by the l-th baseboard management controller managed by node k within a preset time period. lk f l This represents the historical response time of the l-th baseboard management controller managed by node k. Correspondingly, T... 1k f1+T 2k f2+…T lk f l This can represent the sum of the historical response times of the baseboard management controllers managed by k. This can represent the sum of the historical response times of all baseboard management controllers managed by n nodes, i.e., the total historical response time of all baseboard management controllers in the distributed system. Let the node to be assigned be j, and T... 1j Then, f represents the target response time required for the i-th baseboard management controller managed by node j to establish a connection with node j. i This represents the number of requests received by the i-th baseboard management controller managed by the j-th node within a preset time period.
[0115] Step 302: Determine the second ratio based on the load index value corresponding to the node to be assigned, the load index value of the master node, and the load index values of each slave node.
[0116] In this embodiment of the invention, a second ratio is determined based on the load index value corresponding to the node to be allocated and the sum of the load index values of all nodes in the distributed system. The second ratio S2 can be determined by formula three:
[0117]
[0118] Among them, P j This represents the load index value of the node j to be assigned, P1+P2+…+P n This represents the sum of the load performance values of n nodes in a distributed system.
[0119] Step 303: If the difference between the first ratio and the second ratio is less than a first preset threshold, determine that the at least one substrate management controller meets the preset allocation conditions.
[0120] Step 304: If the difference between the first ratio and the second ratio is not less than the first preset threshold, determine that the at least one baseboard management controller does not meet the preset allocation conditions.
[0121] In the embodiments of the present invention, when the difference between the first ratio and the second ratio is less than a first preset threshold, it indicates that the at least one baseboard management controller allocated to the node to be allocated can make the computing resources consumed by the node match its available load capacity, and the load of the node to be allocated is balanced in this case, so that the at least one baseboard management controller allocated to the node to be allocated meets the preset allocation condition; when the difference between the first ratio and the second ratio is not less than the first preset threshold, it indicates that the at least one baseboard management controller allocated to the node to be allocated cannot make the computing resources consumed by the node match its available load capacity, the effect of this allocation result is poor, the load of the node to be allocated is not balanced in this case, and the at least one baseboard management controller allocated to the node to be allocated cannot meet the preset allocation condition. Wherein, that the first ratio is greater than the second ratio can characterize the load of the node to be allocated, that is, the at least one baseboard management controller allocated to the node to be allocated does not enable the node to be allocated to exert its available load capacity, and that the first ratio is less than the second ratio can characterize the load of the node to be allocated, that is, the at least one baseboard management controller allocated to the node to be allocated exceeds the load capacity of the node to be allocated. It can be understood that the value of the first preset threshold can be set as required, and a smaller value of the first preset threshold can represent a higher requirement for the load balancing of each node. That is, making the first ratio and the second ratio as close as possible, that is, S1≈S2, leads to a better load balancing effect of the nodes.
[0122] For example, assume there are six servers S1 to S6, each deployed with a baseboard management controller, and two distributed nodes P1 and P2. The response times of the six servers in the two nodes are respectively T11, T12, T13, T14, T15, T16; and T21, T22, T23, T24, T25, T26. Wherein, if T11<T21<T12<T22<T13<T23<T24<T14<T25<T15<T16<T26, since the response time of servers S1, S2, S3, S6 in node P1 is shorter than that in P2, S1, S2, S3, S6 will be preferentially allocated to P1, and similarly S4, S5 will be preferentially allocated to P2; assuming that the number of requests for the six servers is the same and the performance of P1 and P2 is the same, the load balancing formula can be expressed as It is determined whether the difference between the ratios on both sides of the formula is less than the first preset threshold, and if it is not less than, the right side of the formula can be adjusted, S6 is allocated to node P2, and the load balancing formula at this time is It is continuously determined whether the difference between the ratios on both sides of the formula is less than the first preset threshold, until the difference between the ratios on both sides of the formula is less than the first preset threshold.
[0123] In this embodiment of the invention, by determining a first ratio and a second ratio, and based on the first ratio and the second ratio, it is determined whether at least one baseboard management controller meets the preset allocation conditions, that is, whether the at least one baseboard management controller managed by the node to be allocated matches the load capacity of the node, thereby making the allocation scheme to the at least one baseboard management controller managed by the node to be allocated more reasonable, so as to make the load of the node to be allocated more balanced.
[0124] Optionally, prior to step 301, the embodiments of the present invention further include the following steps:
[0125] Step 401: Determine the historical response time of each of the at least one baseboard management controllers based on the number of historical requests received by each baseboard management controller and the target response time.
[0126] In this embodiment of the invention, for any one of the at least one baseboard management controllers, the number of node requests received by the baseboard management controller within a preset time period is obtained as the historical request count, and the target response time required for the baseboard management controller to establish a connection with the node to be assigned is obtained. Based on the product of the historical request count and the target response time, the historical response time of the baseboard management controller is determined.
[0127] Step 402: Based on the number of historical requests received by each baseboard management controller in the distributed system and the first response time, determine the first historical response time corresponding to each baseboard management controller.
[0128] In this embodiment of the invention, the number of node requests received by each baseboard management controller in the distributed system within a preset time period is obtained as the historical request count received by each baseboard management controller, and the response time required for each baseboard management controller to establish a connection with the node managing that baseboard management controller is obtained as the first response time. Based on the historical request count and the first response time, the first historical response time corresponding to each baseboard management controller is determined.
[0129] Step 403: Based on the first historical response time corresponding to each of the baseboard management controllers, determine the total historical response time of all baseboard management controllers in the distributed system.
[0130] In this embodiment of the invention, the total historical response time of all baseboard management controllers in the distributed system can be obtained by adding the first historical response times corresponding to each baseboard management controller.
[0131] In this embodiment of the invention, the historical response time required for the baseboard management controller to receive node requests can be determined by the number of historical requests and the response time, thereby improving the calculation efficiency of historical response time.
[0132] Optionally, prior to step 302, embodiments of the present invention further include the following steps:
[0133] Step 501: Obtain the processor performance information, memory performance information, disk performance information, and network performance information of the node to be allocated.
[0134] In this embodiment of the invention, performance-related information of the node to be assigned is obtained. Specifically, the master node may obtain performance-related information by sending an information acquisition request to the node to be assigned. This performance-related information may include processor performance information, memory performance information, disk performance information, and network performance information of the node to be assigned.
[0135] Step 502: Obtain the first weight corresponding to the processor performance information, the second weight corresponding to the memory performance information, the third weight corresponding to the disk performance information, and the fourth weight corresponding to the network performance information.
[0136] In this embodiment of the invention, different weight values can be pre-set for different performance information. After obtaining performance-related information, the weight values corresponding to the performance information can be obtained, such as a first weight for processor performance information, a second weight for memory performance information, a third weight for disk performance information, and a fourth weight for network performance information. The weight values can be set based on the purpose of the node, and this embodiment of the invention does not limit this.
[0137] Step 503: Based on the processor performance information, the first weight, the memory performance information, the second weight, the disk performance information, the third weight, the network performance information, and the fourth weight, determine the load index value corresponding to the node to be allocated.
[0138] In this embodiment of the invention, the load index value corresponding to the node to be allocated is determined based on each performance information and the weight corresponding to each performance information. The specific determination method is as shown in Formula 1.
[0139] In this embodiment of the invention, by using weights corresponding to different performance information, the differentiated index preferences for node uses in different application scenarios can be met, and the flexibility of weight settings is improved, so that the load index value can more clearly reflect the load capacity of the node in different application scenarios.
[0140] Optionally, embodiments of the present invention further include the following steps:
[0141] Step 601: Obtain the average resource utilization rate of the master node and each slave node within the target duration.
[0142] In this embodiment of the invention, the average resource utilization rate of the master node and each slave node within a target duration is obtained. The average resource utilization rate can be determined by obtaining the processor utilization rate of the master node and each slave node within the target duration. The average resource utilization rate can reflect the task processing status of the nodes to a certain extent within the target duration. For example, for any node, the processor utilization rate within the target duration can be collected through a monitoring platform or monitoring process to determine the average resource utilization rate corresponding to that node. Assuming the target duration is 7 days, the idle time data and total running time data of the processors for each day within the 7 days can be obtained. Based on the idle time data and total running time data, the processor utilization rate of the node for one day is determined. Then, based on the average processor utilization rate over 7 days, the average resource utilization rate corresponding to that node is calculated.
[0143] Step 602: If the difference between the average resource utilization rate of the master node and any of the slave nodes, or any two of the slave nodes, is greater than the second preset threshold, the operation of determining at least one baseboard management controller to be managed by the node to be allocated is re-executed based on the target response time corresponding to each of the multiple nodes.
[0144] In this embodiment of the invention, if the difference in average resource utilization between any two nodes exceeds a second preset threshold, it indicates that some nodes have fewer tasks and are relatively idle, while others have more tasks and are relatively busy, meaning there is a load imbalance among the nodes. Therefore, it is necessary to readjust the target load list to achieve load balance among the nodes again. After generating a new target load list, since the management relationship between the nodes and the baseboard management controller may change, it is necessary to log out of the baseboard management controller managed by each node and refresh the instance cache stored in the node. The new instance cache will be added back during subsequent operation. During the process of re-determining the target load list, the historical request count and target response time data may change. These changes may originate from the execution process within the target duration. Therefore, changes in historical request count and target response time data can reflect the node's operating pattern within the target duration. Accordingly, the readjusted target load list is also based on the changed data, which better reflects the node's operating pattern. The second preset threshold can be set arbitrarily; this embodiment of the invention does not impose any restrictions on it.
[0145] In this embodiment of the invention, by obtaining the average resource utilization rate of the master node and each slave node, the operating status of the master node and each slave node within the target duration can be monitored. If the difference in average resource utilization rate is greater than a second preset threshold, the target load list is adjusted so that the adjusted target load list is more in line with the operating rules of the nodes.
[0146] In one possible implementation, since the master node in the distributed system can obtain and maintain a list of distributed nodes and monitor the activity status of each node, when the master node detects a change in a node in the distributed system, it actively triggers the target load list generation program. This involves re-executing the operation of determining at least one baseboard management controller that the node to be assigned needs to manage based on the target response time corresponding to each of the multiple nodes. The changes in a node can include: node expansion, reduction, or node deactivation.
[0147] Optionally, step 102 may include the following steps:
[0148] Step 1021: Obtain the instance cache in the current node.
[0149] In this embodiment of the invention, the baseboard management controller management module obtains all cached instance caches from the cache area of the current node.
[0150] Step 1022: If there is an instance cache whose corresponding baseboard management controller address matches the target baseboard management controller address, obtain the instance cache corresponding to the baseboard management controller address that matches the target baseboard management controller address, and use it as the instance cache to be filtered; different instance caches to be filtered correspond to different processing operations.
[0151] In this embodiment of the invention, based on the baseboard management controller address corresponding to each instance cache in the current node, it is determined whether it matches the target baseboard management controller address. If it does, the instance cache corresponding to the baseboard management controller address that matches the target baseboard management controller address is obtained as the instance cache to be filtered. Different instance caches to be filtered correspond to different processing operations performed on the same baseboard management controller.
[0152] Step 1023: Cache the instances to be filtered that have the same processing operation as the operation indicated by the target instruction, and determine them as the target instance cache.
[0153] In this embodiment of the invention, based on the processing operation corresponding to the cache to be filtered, it is determined whether it is consistent with the operation indicated by the target instruction. If they are consistent, the instance cache corresponding to the consistent processing operation is determined as the target instance cache.
[0154] Step 1024: If there is no instance cache with the same target baseboard management controller address as the target baseboard management controller address, or if there is no instance cache to be filtered with the same processing operation as the operation indicated by the target instruction, create the target instance cache based on the target instruction.
[0155] In this embodiment of the invention, if the addresses of the baseboard management controllers corresponding to the instance caches are inconsistent with the addresses of the target baseboard management controllers, or if the processing operations corresponding to the instance caches to be filtered are inconsistent with the operations indicated by the target instructions, indicating that the current node has not cached any instances that perform the operations indicated by the target instructions to the target baseboard management controller, then the operations indicated by the target instructions can be executed based on the target instructions to obtain a specific implementation class, and the specific implementation class can be copied to create a target instance cache and store it in the cache area of the current node.
[0156] In this embodiment of the invention, the instance cache to be screened is determined based on the baseboard management controller address corresponding to the instance cache, and the target instance cache is determined based on the processing operation corresponding to the instance cache to be screened. The target instance cache can be screened step by step, reducing the complexity of the steps to determine the target instance cache.
[0157] Optionally, embodiments of the present invention may further include the following steps:
[0158] Step 701: If the target instruction is a target monitoring instruction, log in to the target baseboard management controller based on the target instance cache, obtain relevant information about the server through the target baseboard management controller, and perform the monitoring operation indicated by the target monitoring instruction on the server based on the relevant information; the server is equipped with the target baseboard management controller.
[0159] In this embodiment of the invention, the monitoring module in the distributed system responds to a target monitoring command. If the target command is a target monitoring command, it can log in to the target baseboard management controller based on session information in the target instance cache, and obtain relevant server information through the target baseboard management controller based on processing operation information in the target instance cache. This relevant information is then stored in the node's storage module. Based on this relevant information, the monitoring operation indicated by the target monitoring command is executed on the server. This relevant information can include information about the server's processor, memory, fan, power supply, etc., allowing monitoring of the server's operating status. For example, first-level relevant server information can be obtained at a first moment and stored in the node's storage module. Second-level relevant server information can be obtained at a second moment and stored in the node's storage module. Based on both the first and second-level relevant information, the server's operating status is monitored. For instance, based on the processor information in the first and second-level relevant information, the server's processor operating status can be monitored. This allows for the detection and location of problems in case of server malfunctions, enabling timely handling.
[0160] Step 702: If the target instruction is a target configuration instruction, log in to the target baseboard management controller based on the target instance cache, and execute the configuration operation indicated by the target configuration instruction on the target baseboard management controller.
[0161] In this embodiment of the invention, when the configuration module in the distributed system responds to a target configuration instruction, if the target instruction is a target configuration instruction, it can log in to the target baseboard management controller based on the session information in the target instance cache, and execute the configuration operation indicated by the target configuration instruction on the target baseboard management controller based on the processing operation information in the target instance cache, such as setting the server network, Network Time Protocol (NTP), Domain Name System (DNS), etc. The relevant configuration information is then stored in the node's storage module.
[0162] In this embodiment of the invention, when the target instruction is of different types, the processing operation indicated by the target instruction can be responded to and implemented based on the determined target instance cache, thereby improving the comprehensiveness of instruction response types.
[0163] For example, Figure 2 A schematic diagram of a master node architecture is shown, such as... Figure 2 As shown, the master node includes a resource management module, a configuration module, a monitoring module, a baseboard management controller management module, a storage module, and a task management module. The resource management module manages the server resources connected to the node, including adding, modifying, and deleting server information, such as the baseboard management controller address, username, password, and the protocol used. The configuration module calls the baseboard management controller management module through the task management module to configure the relevant functions of the baseboard management controller. The monitoring module obtains baseboard management controller status and component information through the task management module to monitor the server's health. The baseboard management controller management module encapsulates the interfaces of various baseboard management controller models, providing a unified management service interface to shield the differences in interfaces between different servers. The storage module stores relevant information generated by the resource management module, configuration module, and monitoring module. The task management module provides task scheduling (calling the baseboard management controller management module) and load balancing management (generating a target load list).
[0164] The specific implementation process of managing the baseboard management controller is as follows: (1) Start the server management system. In the distributed deployment mode, the task management module starts the task scheduling function and load balancing function. Among them, the load balancing function means that the master node needs to generate a target load list and distribute it to each slave node so that the load of each node is balanced. (2) Add the baseboard management controller to be managed through the resource management module, and input the information category to be obtained, such as the baseboard management controller address, username, password, and protocol type information. The resource management module scans the corresponding server according to the input information and adds the scanned baseboard management controller information to the storage module. The baseboard management controller information includes the information corresponding to the above information categories, server model, baseboard management controller version, and Basic Input Output System (BIOS) version, etc. (3) After the baseboard management controller resource is added, upon receiving a target monitoring instruction, the monitoring module uses the task management module to determine whether the master node is the node corresponding to the baseboard management controller address indicated by the target monitoring instruction. If so, it calls the baseboard management controller management module to determine the target instance cache, obtains the server information corresponding to the baseboard management controller based on the target instance cache, monitors the server health status in real time, and stores the obtained server information in the storage module. (4) Upon receiving a target configuration instruction, the configuration module uses the task management module to determine whether the master node is the node corresponding to the baseboard management controller address indicated by the target configuration instruction. If so, it calls the baseboard management controller management module to configure the relevant configurations of the baseboard management controller, such as NTP configuration, DNS configuration, log configuration, or firmware upgrade, and stores the relevant configuration information in the storage module.
[0165] Figure 3 This is a structural diagram of a processing device for a substrate management controller provided in an embodiment of the present invention. The device 80 may include:
[0166] The first determining module 801 is used to determine the target node corresponding to the target baseboard management controller address based on the target load list and the target baseboard management controller address indicated by the target instruction when a target instruction is received; the target load list includes the correspondence between the plurality of nodes and the plurality of baseboard management controller addresses;
[0167] The second determining module 802 is used to determine the target instance cache based on the target baseboard management controller address and the baseboard management controller address corresponding to the instance cache in the current node when the target node is the current node;
[0168] The first execution module 803 is used to execute the operation indicated by the target instruction on the target baseboard management controller based on the target instance cache; the target baseboard management controller is the baseboard management controller corresponding to the address of the target baseboard management controller.
[0169] Optionally, the plurality of nodes includes a master node and a plurality of slave nodes; the device 80 may further include:
[0170] The first acquisition module is used to acquire, for any one of the multiple nodes to be assigned, the response time required for the node to establish a connection with each baseboard management controller in the distributed system, thereby obtaining multiple target response times; the distributed system has the multiple nodes deployed.
[0171] The third determining module is used to determine, based on the target response time corresponding to each of the plurality of nodes, at least one baseboard management controller that the node to be assigned needs to manage.
[0172] The first recording module is used to record the correspondence between the node to be allocated and the baseboard management controller address of the at least one baseboard management controller to the target load list when the at least one baseboard management controller meets the preset allocation conditions.
[0173] The fourth determining module is used to re-execute the operation of determining the at least one baseboard management controller to be managed by the node to be assigned based on the target response time corresponding to each of the plurality of nodes when the at least one baseboard management controller does not meet the preset allocation conditions.
[0174] Optionally, the device 80 may further include:
[0175] The fifth determining module is used to determine a first ratio based on the sum of the historical response times of the at least one baseboard management controller and the total historical response time of all baseboard management controllers in the distributed system;
[0176] The sixth determining module is used to determine a second ratio based on the load index value corresponding to the node to be assigned, the load index value of the master node, and the load index values of each slave node.
[0177] The seventh determining module is used to determine that the at least one baseboard management controller meets the preset allocation conditions when the difference between the first ratio and the second ratio is less than a first preset threshold.
[0178] The eighth determining module is used to determine that the at least one baseboard management controller does not meet the preset allocation conditions when the difference between the first ratio and the second ratio is not less than the first preset threshold.
[0179] Optionally, the device 80 may further include:
[0180] The ninth determining module is used to determine the historical response time of each of the at least one baseboard management controllers based on the number of historical requests received by each baseboard management controller and the target response time.
[0181] The tenth determining module is used to determine the first historical response time corresponding to each of the baseboard management controllers based on the number of historical requests received by each of the baseboard management controllers in the distributed system and the first response time.
[0182] The eleventh determining module is used to determine the total historical response time of all baseboard management controllers in the distributed system based on the first historical response time corresponding to each baseboard management controller.
[0183] Optionally, the device 80 may further include:
[0184] The second acquisition module is used to acquire the processor performance information, memory performance information, disk performance information and network performance information of the node to be allocated;
[0185] The third acquisition module is used to acquire the first weight corresponding to the processor performance information, the second weight corresponding to the memory performance information, the third weight corresponding to the disk performance information, and the fourth weight corresponding to the network performance information.
[0186] The twelfth determining module is used to determine the load index value corresponding to the node to be allocated based on the processor performance information, the first weight, the memory performance information, the second weight, the disk performance information, the third weight, the network performance information, and the fourth weight.
[0187] Optionally, the device 80 may further include:
[0188] The fourth acquisition module is used to acquire the average resource utilization rate of the master node and each of the slave nodes within the target duration.
[0189] The thirteenth determination module is used to re-execute the operation of determining at least one baseboard management controller to be managed by the node to be assigned based on the target response time corresponding to each of the plurality of nodes when the difference between the average resource utilization rate of the master node and any of the slave nodes, or any two of the slave nodes, is greater than a second preset threshold.
[0190] Optionally, the second determining module 802 may include:
[0191] The first acquisition submodule is used to acquire the instance cache in the current node;
[0192] The second acquisition submodule is used to acquire, when there is an instance cache whose corresponding baseboard management controller address matches the target baseboard management controller address, as an instance cache to be filtered; different instance caches to be filtered correspond to different processing operations;
[0193] The first determining submodule is used to determine the cached instances to be filtered that have the same processing operation as the operation indicated by the target instruction as the target instance cache;
[0194] The first creation module is used to create the target instance cache based on the target instruction when there is no instance cache with the target baseboard management controller address that matches the target baseboard management controller address, or when there is no instance cache to be filtered with the corresponding processing operation that matches the operation indicated by the target instruction.
[0195] Optionally, the first execution module 803 may include:
[0196] The first monitoring submodule is used to log in to the target baseboard management controller based on the target instance cache when the target instruction is a target monitoring instruction, and obtain relevant information about the server through the target baseboard management controller, and perform the monitoring operation indicated by the target monitoring instruction on the server based on the relevant information; the server is equipped with the target baseboard management controller;
[0197] The first configuration submodule is used to log in to the target baseboard management controller based on the target instance cache when the target instruction is a target configuration instruction, and to perform the configuration operation indicated by the target configuration instruction on the target baseboard management controller.
[0198] In summary, the processing apparatus for the substrate management controller provided in this embodiment of the invention, upon receiving a target instruction, determines the target node corresponding to the target substrate management controller address based on the target load list and the target substrate management controller address indicated by the target instruction; the target load list includes a correspondence between multiple nodes and multiple substrate management controller addresses; if the target node is the current node, a target instance cache is determined based on the target substrate management controller address and the substrate management controller address corresponding to the instance cache in the current node; based on the target instance cache, the operation indicated by the target instruction is executed on the target substrate management controller; the target substrate management controller is the substrate management controller corresponding to the target substrate management controller address. Thus, when a node receives a target instruction, it can determine whether the current node is a target node, i.e., whether the current node needs to respond to the target instruction, based on the correspondence between multiple nodes and multiple substrate management controller addresses contained in the target load list. If the current node is a target node, i.e., the current node needs to respond to the target instruction, the operation indicated by the target instruction is executed on the target substrate management controller based on the target instance cache. This avoids multiple nodes simultaneously responding to the same target instruction, which could affect the stability of the substrate management controller and improves its stability.
[0199] The present invention also provides an electronic device, see [link to relevant documentation]. Figure 4 It includes: a processor 901, a memory 902, and a computer program 9021 stored in the memory and executable on the processor. When the processor executes the program, it implements the processing method of the baseboard management controller of the foregoing embodiment.
[0200] The present invention also provides a readable storage medium, wherein when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is able to perform the processing method of the board management controller of the foregoing embodiments.
[0201] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0202] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0203] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0204] Similarly, it should be understood that, in order to simplify the invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.
[0205] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0206] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention can also be implemented as a device or apparatus program for performing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0207] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0208] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0209] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0210] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A processing method for a baseboard management controller, characterized in that, The method, applied to any one of multiple nodes, includes: Upon receiving a target instruction, the target node corresponding to the target baseboard management controller address is determined based on the target load list and the target baseboard management controller address indicated by the target instruction; the target load list includes the correspondence between the multiple nodes and the multiple baseboard management controller addresses; When the target node is the current node, the target instance cache is determined based on the target baseboard management controller address and the baseboard management controller address corresponding to the instance cache in the current node; Based on the target instance cache, the operation indicated by the target instruction is executed on the target substrate management controller; the target substrate management controller is the substrate management controller corresponding to the target substrate management controller address. The plurality of nodes includes a master node and a plurality of slave nodes; when the current node is the master node, the method further includes: For any node to be assigned among the plurality of nodes, the response time required for the node to be assigned to establish a connection with each baseboard management controller in the distributed system is obtained, resulting in multiple target response times; the distributed system contains the plurality of nodes. Based on the target response time corresponding to each of the multiple nodes, determine at least one baseboard management controller that the node to be assigned needs to manage; If at least one baseboard management controller meets the preset allocation conditions, the correspondence between the node to be allocated and the baseboard management controller address of the at least one baseboard management controller is recorded in the target load list; If at least one baseboard management controller does not meet the preset allocation conditions, the operation of determining at least one baseboard management controller to be managed by the node to be allocated is re-executed based on the target response time corresponding to each of the plurality of nodes. After determining the at least one baseboard management controller to be managed by the node to be assigned based on the target response time corresponding to each of the plurality of nodes, the method further includes: A first ratio is determined based on the sum of the historical response times of the at least one baseboard management controller and the total historical response time of all baseboard management controllers in the distributed system; The second ratio is determined based on the load index value corresponding to the node to be assigned, the load index value of the master node, and the load index values of each slave node. If the difference between the first ratio and the second ratio is less than a first preset threshold, it is determined that the at least one substrate management controller meets the preset allocation condition. If the difference between the first ratio and the second ratio is not less than the first preset threshold, it is determined that the at least one substrate management controller does not meet the preset allocation conditions.
2. The method according to claim 1, characterized in that, Before determining the first ratio based on the sum of the historical response times of the at least one baseboard management controller and the total historical response time of all baseboard management controllers in the distributed system, the method further includes: Based on the number of historical requests received by each of the at least one baseboard management controllers and the target response time, the historical response time of each baseboard management controller is determined; Based on the number of historical requests received by each of the baseboard management controllers in the distributed system and the first response time, the first historical response time corresponding to each of the baseboard management controllers is determined; Based on the first historical response time corresponding to each of the baseboard management controllers, the total historical response time of all baseboard management controllers in the distributed system is determined.
3. The method according to claim 1, characterized in that, Before determining the second ratio based on the load metric values corresponding to the nodes to be assigned, the load metric values of the master node, and the load metric values of each slave node, the method includes: Obtain the processor performance information, memory performance information, disk performance information, and network performance information of the node to be allocated; Obtain the first weight corresponding to the processor performance information, the second weight corresponding to the memory performance information, the third weight corresponding to the disk performance information, and the fourth weight corresponding to the network performance information; Based on the processor performance information, the first weight, the memory performance information, the second weight, the disk performance information, the third weight, the network performance information, and the fourth weight, the load index value corresponding to the node to be allocated is determined.
4. The method according to any one of claims 1-3, characterized in that, The method further includes: Obtain the average resource utilization rate of the master node and each of the slave nodes within the target duration; If the difference between the average resource utilization of the master node and any of the slave nodes, or between any two of the slave nodes, is greater than a second preset threshold, the operation of determining at least one baseboard management controller to be managed by the node to be assigned is re-executed based on the target response time corresponding to each of the plurality of nodes.
5. The method according to claim 1, characterized in that, The step of determining the target instance cache based on the target baseboard management controller address and the baseboard management controller address corresponding to the instance cache in the current node includes: Retrieve the instance cache in the current node; If an instance cache exists that matches the target substrate management controller address, the instance cache corresponding to the substrate management controller address that matches the target substrate management controller address is obtained and used as the instance cache to be filtered; different instance caches to be filtered correspond to different processing operations; The cached instances whose corresponding processing operations are consistent with the operations indicated by the target instruction are identified as target instance caches. If there is no instance cache with the same target baseboard management controller address as the target baseboard management controller address, or if there is no instance cache to be filtered with the same processing operation as the operation indicated by the target instruction, the target instance cache is created based on the target instruction.
6. The method according to claim 5, characterized in that, The operation of executing the target instruction indication on the target substrate management controller based on the target instance cache includes: When the target instruction is a target monitoring instruction, the system logs into the target baseboard management controller based on the target instance cache, obtains relevant information about the server through the target baseboard management controller, and performs the monitoring operation indicated by the target monitoring instruction on the server based on the relevant information; the server is equipped with the target baseboard management controller. If the target instruction is a target configuration instruction, the target baseboard management controller is logged in based on the target instance cache, and the configuration operation indicated by the target configuration instruction is executed on the target baseboard management controller.
7. A processing apparatus for a substrate management controller, characterized in that, The device is applied to any one of a plurality of nodes, and includes: The first determining module is configured to, upon receiving a target instruction, determine the target node corresponding to the target baseboard management controller address based on a target load list and the target baseboard management controller address indicated by the target instruction; the target load list includes the correspondence between the plurality of nodes and the plurality of baseboard management controller addresses; The second determining module is used to determine the target instance cache based on the target baseboard management controller address and the baseboard management controller address corresponding to the instance cache in the current node when the target node is the current node; The first execution module is configured to execute the operation indicated by the target instruction on the target baseboard management controller based on the target instance cache; the target baseboard management controller is the baseboard management controller corresponding to the address of the target baseboard management controller; The plurality of nodes includes a master node and a plurality of slave nodes; the device further includes: The first acquisition module is used to acquire, for any one of the multiple nodes to be assigned, the response time required for the node to be assigned to establish a connection with each baseboard management controller in the distributed system, thereby obtaining multiple target response times; the multiple nodes are deployed in the distributed system. The third determining module is used to determine, based on the target response time corresponding to each of the plurality of nodes, at least one baseboard management controller that the node to be assigned needs to manage. The first recording module is used to record the correspondence between the node to be allocated and the baseboard management controller address of the at least one baseboard management controller to the target load list when the at least one baseboard management controller meets the preset allocation conditions. The fourth determining module is used to re-execute the operation of determining the at least one baseboard management controller to be managed by the node to be assigned based on the target response time corresponding to each of the plurality of nodes when the at least one baseboard management controller does not meet the preset allocation conditions; The device further includes: The fifth determining module is used to determine a first ratio based on the sum of the historical response times of the at least one baseboard management controller and the total historical response time of all baseboard management controllers in the distributed system; The sixth determining module is used to determine a second ratio based on the load index value corresponding to the node to be assigned, the load index value of the master node, and the load index values of each slave node. The seventh determining module is used to determine that the at least one baseboard management controller meets the preset allocation conditions when the difference between the first ratio and the second ratio is less than a first preset threshold. The eighth determining module is used to determine that the at least one baseboard management controller does not meet the preset allocation conditions when the difference between the first ratio and the second ratio is not less than the first preset threshold.
8. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the processing method of the baseboard management controller as described in any one of claims 1-6.
9. A readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the processing method of one or more of the baseboard management controllers as described in claims 1-6.
Citation Information
Patent Citations
Server, node equipment information acquisition method and device thereof, equipment and medium
CN113872796A
Data processing method and device for solid state disk and electronic equipment
CN115408161A