A server bandwidth allocation method, apparatus, electronic device, and storage medium.
By automatically identifying expansion card resources and application scenarios through the baseboard management controller, and generating bandwidth allocation strategies, the problem of needing to power off and change hardware for server bandwidth allocation in existing technologies is solved. This enables automated and flexible bandwidth adjustment, adapting to a variety of application scenarios.
Patent Information
- Application Number
- CN202310072096.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-31
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-01-31
AI Technical Summary
Existing servers require power outages, disassembly, and hardware connection modifications for bandwidth allocation, making them inflexible in adapting to the needs of different application scenarios and unable to automatically adjust bandwidth allocation strategies.
The baseboard management controller automatically identifies the resource information and application scenarios of the expansion card, generates a bandwidth allocation strategy, and uses the GPIO interface to configure the level data of the PCIe switch chip to achieve automatic bandwidth allocation.
It enables automatic adjustment of PCIe bandwidth based on the bandwidth requirements of expansion cards without the need for manual configuration, adapting to various application scenarios and improving the flexibility and efficiency of the server.
Smart Images

Figure CN116260725B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a bandwidth allocation method and device for a server, an electronic device, and a storage medium. BACKGROUND
[0002] With the maturity and landing of new technologies such as artificial intelligence, 5G, and big data, enterprises are facing the urgent need for server upgrades. The rapid landing of artificial intelligence technology also brings opportunities for the expansion of artificial intelligence infrastructure, which is mainly based on artificial intelligence servers. To meet the collection and organization of various data in the fields of big data, cloud computing, artificial intelligence, and the like, AI servers in various heterogeneous forms have been widely used. To create an "efficient, flexible, and stable" AI server, it is necessary to have rich scalability, and the AI server must meet the application requirements of multiple scenarios. This requires the server product to have flexibility to adapt to different AI task requirements. Artificial intelligence servers are constantly being optimized and upgraded, with simultaneous innovation in software and hardware to provide higher performance services to users. To fully utilize the performance of the server, it is not enough to rely solely on chips, but rather the entire system should be optimized from various details to achieve comprehensive improvement and progress, enabling the system to move towards intelligence, diversity, and complex forms.
[0003] Most of the existing servers allocate bandwidth for PCIe ports through physical switching to achieve differentiated configuration under different requirements. For example, a PCIe X16 port can be connected to a PCIe X16 device through a high-speed signal cable, or it can be divided into two PCIe x8 ports and connected to two PCIe X8 devices. However, similar changes require the server to be powered off for disassembly, and the high-speed cable or hardware board connection method needs to be changed to reallocate bandwidth. After modification, only the current bandwidth allocation method can be supported, and more application scenarios cannot be flexibly adapted. SUMMARY
[0004] To solve the above technical problems or at least partially solve the above technical problems, the present application provides a bandwidth allocation method and device for a server, an electronic device, and a storage medium.
[0005] According to an aspect of an embodiment of the present application, a bandwidth allocation method for a server is provided, applied to a baseboard management controller, and the method comprises:
[0006] reading target resource information currently corresponding to an expansion card in a case in which a target server is located;
[0007] obtaining a target application scenario of the target server, and obtaining a target bandwidth allocation strategy using the target application scenario and the target resource information.
[0008] configure the PCIe Switch chip of the target server according to the target bandwidth allocation strategy.
[0009] Further, the target resource information currently corresponding to the expansion card in the case of the target server is read, including:
[0010] reading the expansion card type, expansion card model and expansion card position of the expansion card in the case of the target server;
[0011] the expansion card type, expansion card model and expansion card position are taken as the target resource information.
[0012] Further, the target application scenario of the target server is obtained, and a target bandwidth allocation strategy is obtained by using the target application scenario and the target resource information, including:
[0013] obtaining the topology structure of the target server, and determining the target application scenario of the target server by using the topology structure;
[0014] obtaining the target bandwidth demand corresponding to the target resource information of the target server in the target application scenario;
[0015] a target bandwidth allocation strategy matched with the target bandwidth demand is obtained from a bandwidth allocation strategy set, wherein the bandwidth allocation strategy set includes a plurality of bandwidth allocation strategies, and different bandwidth allocation strategies are used to configure the PCIe port of the PCIe Switch chip into different PCIe bandwidths.
[0016] Further, the target application scenario of the target server is determined by using the topology structure, including:
[0017] obtaining an application scenario library, wherein the application scenario library includes a plurality of preset topology structures of the target server in a plurality of application scenarios;
[0018] the application scenario of the preset topology structure matched with the topology structure in the application scenario library is determined as the target application scenario.
[0019] Further, the PCIe Switch chip of the target server is configured by using the target bandwidth allocation strategy, including:
[0020] generating a configuration instruction by using the target bandwidth allocation strategy;
[0021] The GPIO interface is called based on the configuration instruction to configure level data of a power-on configuration pin of the PCIe Switch chip.
[0022] According to another aspect of the embodiments of the present application, a bandwidth allocation method of a server is also provided, which is applied to a PCIe Switch chip, and the method comprises the following steps:
[0023] Target level data of a power-on configuration pin of the PCIe Switch chip is monitored, wherein the target level data is configured by a baseboard management controller in a target server using a target bandwidth allocation strategy;
[0024] The target bandwidth allocation strategy is acquired using the target level data, and bandwidth is allocated according to the target bandwidth allocation strategy.
[0025] According to another aspect of the embodiments of the present application, a bandwidth allocation device of a server is also provided, which comprises the following modules:
[0026] A reading module is configured to read target resource information currently corresponding to an expansion card in a chassis of a target server;
[0027] An acquiring module is configured to acquire a target application scenario of the target server, and acquire a target bandwidth allocation strategy using the target application scenario and the target resource information;
[0028] A configuration module is configured to configure a PCIe Switch chip of the target server using the target bandwidth allocation strategy, so that the PCIe Switch chip allocates bandwidth according to a target bandwidth allocation strategy after the target server is powered on.
[0029] According to another aspect of the embodiments of the present application, a bandwidth allocation device of a server is also provided, which comprises the following modules:
[0030] A monitoring module is configured to monitor target level data of a power-on configuration pin of the PCIe Switch chip, wherein the target level data is configured by a baseboard management controller in a target server using a target bandwidth allocation strategy;
[0031] A processing module is configured to acquire the target bandwidth allocation strategy using the target level data, and allocate bandwidth according to the target bandwidth allocation strategy.
[0032] According to another aspect of the embodiments of the present application, a storage medium is also provided, which comprises a stored program, and the program performs the above steps when running.
[0033] According to another aspect of the embodiments of the present application, an electronic device is also provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete the communication among each other through the communication bus; wherein: the memory is used to store a computer program; and the processor is used to execute the steps in the above method by running the program stored in the memory.
[0034] The embodiments of the present application also provide a computer program product containing instructions which, when run on a computer, cause the computer to execute the steps in the above method.
[0035] The above technical solution provided by the embodiments of the present application has the following advantages compared with the prior art: the method provided by the embodiments of the present application automatically identifies the bandwidth requirement of the expansion card in the current application scenario by using the baseboard management controller, configures a corresponding bandwidth allocation strategy according to the bandwidth requirement of the expansion card, and finally automatically allocates PCIe bandwidth for the PCIe Switch chip by using the bandwidth allocation strategy. The automatic allocation of PCIe bandwidth is realized through the resource information of the expansion card, and even when the application scenario of the server changes, it is not necessary to manually configure a file carrying the bandwidth allocation strategy by the staff, and more application scenarios can be flexibly adapted. BRIEF DESCRIPTION OF DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application.
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows, and obviously, other drawings can also be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0038] Figure 1 A flowchart of a bandwidth allocation method of a server provided by the embodiments of the present application is shown in the figure.
[0039] Figure 2 A schematic diagram of a topology structure of a server provided by the embodiments of the present application is shown in the figure.
[0040] Figure 3 A schematic diagram of a topology structure of a server provided by the embodiments of the present application is shown in the figure.
[0041] Figure 4 A schematic diagram of a topology structure of a server provided by the embodiments of the present application is shown in the figure.
[0042] Figure 5 A flowchart of a bandwidth allocation method of a server provided by another embodiment of the present application is shown in the figure.
[0043] Figure 6 A block diagram of a bandwidth allocation apparatus of a server according to an embodiment of the present application is provided.
[0044] Figure 7 A block diagram of a bandwidth allocation apparatus of a server according to another embodiment of the present application is provided.
[0045] Figure 8 A structural schematic diagram of an electronic device according to an embodiment of the present application is provided. DETAILED DESCRIPTION
[0046] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application but not all the embodiments of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and should not be construed as an improper limitation on the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0047] It should be noted that, in this document, relational terms such as “first” and “second”, and the like, are used solely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms “comprises”, “comprising”, or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element preceded by “comprises...” does not, without more limitations, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the stated elements.
[0048] The embodiments of the present application provide a bandwidth allocation method, apparatus, electronic device and storage medium of a server. The method provided by the embodiments of the present application can be applied to any required electronic device, for example, a server, a terminal and the like, which are not specifically limited here, and for the convenience of description, are simply referred to as electronic devices hereinafter.
[0049] According to an aspect of the embodiments of the present application, a method embodiment of a bandwidth allocation method of a server is provided. Figure 1 A flowchart of a bandwidth allocation method of a server according to an embodiment of the present application is provided, as shown in Figure 1 The method comprises the following steps.
[0050] Step S11, read the target resource information currently corresponding to the expansion card in the chassis where the target server is located.
[0051] The method provided by the embodiment of the application is applied to a baseboard management controller in a target server, and the baseboard management controller is mainly used for acquiring different resource information of an expansion board in a chassis where the target server is located, and performing different bandwidth allocation by using the resource information.
[0052] Specifically, reading the target resource information currently corresponding to the expansion card in the chassis where the target server is located includes the following steps A1-A2.
[0053] Step A1, read the expansion card type, expansion card model and expansion card position of the expansion card in the chassis where the target server is located.
[0054] Step A2, take the expansion card type, expansion card model and expansion card position as the target resource information.
[0055] In the embodiment of the application, after the baseboard management controller is powered on and started, the expansion card type, expansion card model and expansion card position of the expansion card in the chassis are read through an I2C bus. Specifically, the baseboard management controller can identify the expansion card type and expansion card model of the expansion card in the server processing S5 state through an I2C port. The expansion card type can be a graphics processing unit (GPU) type, a network interface controller (NIC) type, a memory type and the like. The expansion card model can be a specification corresponding to a graphics processing unit, a network interface controller and a memory. The expansion card position is used to indicate which PCIe Switch chip the expansion card is connected to. Based on this, the baseboard management controller takes the expansion card type, expansion card model and expansion card position obtained as the target resource information of the expansion card.
[0056] Step S12, acquire the target application scenario of the target server currently, and acquire the target bandwidth allocation strategy by using the target application scenario and the target resource information.
[0057] In the embodiment of the application, acquiring the target application scenario of the target server currently, and acquiring the target bandwidth allocation strategy by using the target application scenario and the target resource information includes the following steps B1-B3.
[0058] Step B1, acquire the topology structure of the target server currently, and determine the target application scenario of the target server currently by using the topology structure.
[0059] In the embodiment of the present application, the target application scenario of the target server is determined by using the topology structure, including: obtaining an application scenario library, wherein the application scenario library includes preset topologies of the target server in multiple application scenarios; and determining the application scenario of the preset topology in the application scenario library that matches the topology as the target application scenario.
[0060] In the embodiment of the present application, in order to avoid manual query of the current application scenario of the target server, an application scenario library is set in the baseboard management controller, thereby improving the query efficiency of the current application scenario of the target server. The application scenario library includes preset topologies of the target server in multiple application scenarios, as shown in FIG. 1, the topologies of the server in different application scenarios are different. Based on this, the baseboard management controller can directly obtain the topology of the target server by detecting the connection information of each PCIe switch chip, the connection information includes: which expansion cards are connected to the PCIe switch chip, and then the application scenario of the preset topology in the application scenario library that matches the topology is determined as the target application scenario. Figures 2 to 4
[0061] Step B2, obtaining the target bandwidth demand of the target resource information of the target server in the target application scenario.
[0062] In the embodiment of the present application, the resource information of the target server in different application scenarios corresponds to different bandwidth demands, that is, it can be understood that the same expansion card type corresponds to multiple different expansion card models, and each expansion card model corresponds to different bandwidth demands. Based on this, in order to facilitate the baseboard management controller to quickly determine the bandwidth demand of the target resource information, the bandwidth demand corresponding to each expansion card model is pre-configured, so that the baseboard management controller can directly query the matching bandwidth demand by using the expansion card model in the target resource information, and determine the bandwidth demand as the target bandwidth demand. The bandwidth demand is a specific bandwidth value required by the expansion card.
[0063] Step B3, obtaining the target bandwidth allocation strategy that matches the target bandwidth demand from a bandwidth allocation strategy set, wherein the bandwidth allocation strategy set includes multiple bandwidth allocation strategies, and different bandwidth allocation strategies are used to configure the PCIe port of the PCIe switch chip into different PCIe bandwidths.
[0064] In the embodiment of the present application, after obtaining the bandwidth demand, the baseboard management controller queries the bandwidth allocation strategy set, and the bandwidth allocation strategy set includes the correspondence between the bandwidth demand and the bandwidth allocation strategy. The bandwidth allocation strategy includes: uplink and downlink PCIe port number, port bandwidth type, etc. The target bandwidth allocation strategy corresponding to the target bandwidth demand is determined from the above correspondence.
[0065] Step S13, configure the PCIe Switch chip of the target server by using the target bandwidth allocation strategy, so that the PCIe Switch chip performs bandwidth allocation according to the target bandwidth allocation strategy after being powered on in the target server.
[0066] In the embodiment of the present application, the PCIe Switch chip of the target server is configured by using the target bandwidth allocation strategy, including the following steps C1-C2:
[0067] Step C1, generate a configuration instruction by using the target bandwidth allocation strategy.
[0068] Step C2, configure the level data of the power-on configuration pins of the PCIe Switch chip by calling the GPIO interface based on the configuration instruction.
[0069] In the embodiment of the present application, the baseboard management controller first converts the target bandwidth allocation strategy into target level data of the power-on configuration pins in the PCIe Switch chip based on the association between the bandwidth allocation strategy and the level data, and the target level data includes the level values corresponding to each power-on configuration pin of the PCIe Switch chip. It can be understood that the level data of the power-on configuration pins represents the bandwidth allocation strategy allocated by the baseboard management controller to the PCIe Switch chip.
[0070] Based on this, the method provided in the embodiment of the present application realizes automatic allocation of PCIe bandwidth according to the bandwidth demand of the expansion card, does not need a configuration file, and realizes automatic and rapid allocation of PCIe bandwidth by determining the bandwidth allocation strategy of the bandwidth demand and converting it into level data.
[0071] In the embodiment of the present application, the baseboard management controller generates a configuration instruction by using the target bandwidth allocation strategy to convert the target level data, and the configuration instruction carries the level values of each power-on configuration pin. Then, the baseboard management controller configures the level data of the power-on configuration pins of the PCIe Switch chip by calling the GPIO interface through the configuration instruction, that is, configures the level data of each power-on configuration pin of the PCIe Switch chip according to the level values carried by the configuration instruction. Subsequently, after being powered on, the PCIe Switch chip performs bandwidth allocation according to the level values of the power-on configuration pins.
[0072] As an example, the PCIe Switch chip includes 4 power-on configuration pins, the pin identifiers of the 4 power-on configuration pins are 01, 02, 03, and 04, and meanwhile, 4 GPIO interfaces are needed, the interface identifiers of the 4 GPIO interfaces are 1-1, 1-2, 1-3, and 1-4 respectively. Assuming that the obtained target level data is 0001, and the target level data in the target level value combination is arranged in the order of the number of the power-on configuration pins, at this time, the baseboard management controller first configures the level value of the GPIO interface with the interface identifier 1-1 as 0, the level value of the GPIO interface with the interface identifier 1-2 as 1, the level value of the GPIO interface with the interface identifier 1-3 as 1, and the level value of the GPIO interface with the interface identifier 1-4 as 0. Correspondingly, the level value of the power-on configuration pin with the configuration pin identifier 01 corresponding to the GPIO interface with the interface identifier 1-1 is 0, the level value of the power-on configuration pin with the configuration pin identifier 02 corresponding to the GPIO interface with the interface identifier 1-2 is 1, the level value of the power-on configuration pin with the configuration pin identifier 03 corresponding to the GPIO interface with the interface identifier 1-3 is 1, and the level value of the power-on configuration pin with the configuration pin identifier 04 corresponding to the GPIO interface with the interface identifier 1-4 is 0. That is, the PCIe bandwidth is allocated to the PCIe Switch chip according to the bandwidth allocation strategy corresponding to the target level data 0110.
[0073] In addition, when the current application scenario of the server is an Nvme or a Riser card, flexible bandwidth allocation can also be performed through the GPIO interface. In this way, it is ensured that the baseboard management controller has learned the resource information of the expansion card before power-on, and can correctly configure the bandwidth allocation strategy of the PCIe Switch chip during power-on of the PCIe Switch chip.
[0074] The method provided by the embodiment of the present application automatically identifies the bandwidth requirement of the expansion card in the current application scenario by using the baseboard management controller, configures a corresponding bandwidth allocation strategy according to the bandwidth requirement of the expansion card, and finally automatically allocates PCIe bandwidth to the PCIe Switch chip by using the bandwidth allocation strategy. The automatic allocation of the PCIe bandwidth is realized through the resource information of the expansion card, even when the application scenario of the server changes, manual configuration of a file carrying the bandwidth allocation strategy by a staff is not needed, and more application scenarios can be flexibly adapted.
[0075] According to another aspect of the embodiment of the present application, a bandwidth allocation method of a server is also provided, Figure 5 A flowchart of the bandwidth allocation method of the server provided by the embodiment of the present application is shown in Figure 5
[0076] Step S21: Monitor the target level data of the power-on configuration pin of the PCIe Switch chip, wherein the target level data is configured by the baseboard management controller in the target server using the target bandwidth allocation strategy.
[0077] Step S22: Obtain the target bandwidth allocation strategy using the target level data, and allocate bandwidth according to the target bandwidth allocation strategy.
[0078] The method provided in this application is applied to a PCIe Switch chip. After the PCIe Switch chip is powered on, it monitors the voltage levels of each power-on configuration pin and obtains the final target voltage level data based on the voltage levels and the pin identification order of the power-on configuration pins. The PCIe Switch chip uses the obtained target voltage level data to acquire the corresponding target bandwidth allocation strategy and allocates PCIe bandwidth to each PCIe port of the PCIe Switch chip according to the target bandwidth allocation strategy.
[0079] The method provided in this application configures the level values of each power-on configuration pin in the PCIe Switch chip through the baseboard management controller, so that after the server is powered on, the PCIe Switch chip monitors the level values of the power-on configuration pins to obtain target level data. This realizes automatic bandwidth allocation using the target bandwidth allocation strategy corresponding to the target level data, and at the same time enables the PCIe Switch chip to avoid customizing differentiated configurations for multiple configurations.
[0080] Figure 6 This is a block diagram of a server bandwidth allocation device provided in an embodiment of this application. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 6 As shown, the device includes:
[0081] Reading module 61 is used to read the target resource information currently corresponding to the expansion card in the chassis where the target server is located;
[0082] The acquisition module 62 is used to acquire the current target application scenario of the target server and acquire the target bandwidth allocation strategy using the target application scenario and target resource information;
[0083] Configuration module 63 is used to configure the PCIe Switch chip of the target server using the target bandwidth allocation strategy, so that the PCIe Switch chip allocates bandwidth according to the target bandwidth allocation strategy after the target server is powered on.
[0084] In the embodiment of the present application, the reading module 61 is configured to read the expansion card type, the expansion card model and the expansion card position of the expansion card in the chassis where the target server is located; and the expansion card type, the expansion card model and the expansion card position are taken as the target resource information.
[0085] In the embodiment of the present application, the obtaining module 62 is configured to obtain the current topology structure of the target server, and determine the target application scenario of the target server by using the topology structure; obtain the target bandwidth demand corresponding to the target resource information in the target application scenario of the target server; and obtain the target bandwidth allocation strategy matched with the target bandwidth demand from the bandwidth allocation strategy set, wherein the bandwidth allocation strategy set includes a plurality of bandwidth allocation strategies, and different bandwidth allocation strategies are used to configure the PCIe port of the PCIe Switch chip into different PCIe bandwidths.
[0086] In the embodiment of the present application, the obtaining module 62 is specifically configured to obtain an application scenario library, wherein the application scenario library includes preset topology structures of the target server in a plurality of application scenarios; and the application scenario of the preset topology structure matched with the topology structure in the application scenario library is determined as the target application scenario.
[0087] In the embodiment of the present application, the configuration module 63 is configured to generate a configuration instruction by using the target bandwidth allocation strategy; and configure the level data of the power-on configuration pin of the PCIe Switch chip by using the GPIO interface based on the configuration instruction.
[0088] Figure 7 A block diagram of a bandwidth allocation device of a server provided in the embodiment of the present application is shown in FIG. 6. The device can be realized as part or all of an electronic device by software, hardware or a combination of both. As shown in FIG. 6, the device includes: Figure 7
[0089] The monitoring module 71 is configured to monitor the level data of the power-on configuration pin of the PCIe Switch chip, wherein the level data is configured by the baseboard management controller in the target server by using the target bandwidth allocation strategy;
[0090] The processing module 72 is configured to parse the level data to obtain the target bandwidth allocation strategy, and perform bandwidth allocation according to the target bandwidth allocation strategy.
[0091] The embodiment of the present application further provides an electronic device, as shown in FIG. 7, which can include a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 complete communication with each other through the communication bus 1504. Figure 8
[0092] a memory 1503, configured to store a computer program;
[0093] a processor 1501, configured to execute the computer program stored in the memory 1503, and implement the steps of the above embodiments.
[0094] The communication bus mentioned in the terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0095] The communication interface is used for communication between the terminal and other devices.
[0096] The memory can include a Random Access Memory (RAM) and can also include a non-volatile memory, for example, at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0097] The processor mentioned above can be a general processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; can also be a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0098] In another embodiment provided in the present application, a computer readable storage medium is also provided, and the computer readable storage medium stores instructions, when the instructions run on a computer, the computer executes the bandwidth allocation method of the server in any of the above embodiments.
[0099] In another embodiment provided in the present application, a computer program product containing instructions is also provided, when the instructions run on a computer, the computer executes the bandwidth allocation method of the server in any of the above embodiments.
[0100] In the embodiments described above, the whole or part of the embodiments can be realized by software, hardware, firmware or any combination thereof. When realized by software, the whole or part of the embodiments can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the whole or part of the processes or functions described in the embodiments of the present application are produced. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk), etc.
[0101] The above only describes the preferred embodiments of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0102] The above only describes the specific embodiments of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features applied herein.
Claims
1. A bandwidth allocation method of a server, characterized by, The method is applied to a baseboard management controller and comprises the following steps: reading target resource information currently corresponding to an expansion card in a case in which a target server is located; obtaining a target application scenario of the target server currently, and obtaining a target bandwidth allocation strategy by using the target application scenario and the target resource information; configuring a PCIe Switch chip of the target server by using the target bandwidth allocation strategy, so that the PCIe Switch chip performs bandwidth allocation according to the target bandwidth allocation strategy after being powered on on the target server; the step of obtaining the target application scenario of the target server currently and obtaining the target bandwidth allocation strategy by using the target application scenario and the target resource information comprises the following steps: obtaining a topology structure of the target server currently, and determining the target application scenario of the target server currently by using the topology structure; obtaining a target bandwidth demand of the target resource information corresponding to the target application scenario of the target server; and obtaining a target bandwidth allocation strategy matched with the target bandwidth demand from a bandwidth allocation strategy set, wherein the bandwidth allocation strategy set comprises a plurality of bandwidth allocation strategies, different bandwidth allocation strategies are used to configure PCIe ports of the PCIe Switch chip into different PCIe bandwidths, and a bandwidth allocation strategy comprises uplink and downlink PCIe port numbers and port bandwidth types.
2. The method of claim 1, wherein, the step of reading the target resource information currently corresponding to the expansion card in the case in which the target server is located comprises the following steps: reading an expansion card type, an expansion card model and an expansion card position of the expansion card in the case in which the target server is located; taking the expansion card type, the expansion card model and the expansion card position as the target resource information.
3. The method of claim 1, wherein, the step of determining the target application scenario of the target server currently by using the topology structure comprises the following steps: obtaining an application scenario library, wherein the application scenario library comprises preset topology structures of the target server in a plurality of application scenarios; determining an application scenario of a preset topology structure matched with the topology structure in the application scenario library as the target application scenario.
4. The method of claim 1, wherein, the step of configuring the PCIe Switch chip of the target server by using the target bandwidth allocation strategy comprises the following steps: generating a configuration instruction by using the target bandwidth allocation strategy; configuring level data of a power-on configuration pin of the PCIe Switch chip based on the configuration instruction by calling a GPIO interface.
5. A bandwidth allocation method of a server, characterized by, The method is applied to a PCIe Switch chip and comprises the following steps: monitoring target level data of a power-on configuration pin of the PCIe Switch chip, wherein the target level data is configured by a baseboard management controller in a target server by using a target bandwidth allocation strategy; obtaining the target bandwidth allocation strategy by using the target level data, and performing bandwidth allocation according to the target bandwidth allocation strategy.
6. A bandwidth allocation apparatus of a server, characterized by comprising: comprises the following steps: a reading module is configured to read target resource information currently corresponding to an expansion card in a case in which a target server is located; An obtaining module is configured to obtain a target application scenario of the target server currently, and obtain a target bandwidth allocation strategy by using the target application scenario and the target resource information; A configuration module is configured to configure a PCIe Switch chip of the target server by using the target bandwidth allocation strategy, so that the PCIe Switch chip performs bandwidth allocation according to the target bandwidth allocation strategy after being powered on on the target server; The obtaining module is configured to obtain a topology structure of the target server currently, and determine the target application scenario of the target server currently by using the topology structure; Obtain a target bandwidth demand corresponding to the target resource information of the target server in the target application scenario, and obtain a target bandwidth allocation strategy matched with the target bandwidth demand from a bandwidth allocation strategy set, wherein the bandwidth allocation strategy set includes a plurality of bandwidth allocation strategies, different bandwidth allocation strategies are used to configure PCIe ports of the PCIe Switch chip into different PCIe bandwidths, and the bandwidth allocation strategy includes uplink and downlink PCIe port numbers and port bandwidth types.
7. A bandwidth allocation apparatus of a server, characterized by comprising: Comprise: A monitoring module is configured to monitor target level data of a power-on configuration pin of the PCIe Switch chip, wherein the target level data is configured by a baseboard management controller in the target server by using the target bandwidth allocation strategy; A processing module is configured to obtain the target bandwidth allocation strategy by using the target level data, and perform bandwidth allocation according to the target bandwidth allocation strategy.
8. A storage medium, characterized by The storage medium includes a stored program, wherein the program is used to execute the method in any one of claims 1 to 5 when the processor runs.
9. An electronic device, comprising: Comprise processor, communication interface, memory and communication bus, wherein, the processor, communication interface, memory complete mutual communication through communication bus;Wherein: The memory is used to store computer programs; The processor is used to execute the method in any one of claims 1 to 5 by running the programs stored in the memory.
Citation Information
Patent Citations
CPU topology device, electronic equipment and topology switching method
CN112181888A
PCIe bandwidth allocation processing method and processing device and storage medium
CN115221090A
Bandwidth allocation method, device and equipment and readable storage medium
CN118585477A