Bandwidth allocation method

By dynamically monitoring and adjusting PCIe bandwidth allocation strategy in the server, the problem of low bandwidth allocation efficiency in the existing technology is solved, and more efficient and flexible bandwidth management is achieved.

CN120045489AActive Publication Date: 2025-05-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202412000519.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-27
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

In the prior art, the allocation of PCIe bandwidth is usually limited by a fixed configuration, resulting in inefficient allocation of bandwidth to components in complex systems with multiple hosts or multi-task concurrent.

Method used

By in response to the first power-up of the server, data communication resources of the first component are determined and the maximum available bandwidth of the second component is determined based on these resources. Then, the initial bandwidth allocation strategy is determined based on the maximum available bandwidth, the occupied state of data communication resources is monitored during the server operation, the bandwidth allocation strategy is adjusted, and finally the bandwidth is allocated to the second component according to the target strategy.

Benefits of technology

It improves the efficiency of allocating bandwidth to components, solves the problem of low bandwidth allocation efficiency in multi-host or multi-task concurrent systems, and realizes more flexible and efficient bandwidth management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045489A_ABST
    Figure CN120045489A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a bandwidth allocation method, and the method comprises the steps: responding to the first power-on of a server, and determining a data communication resource of a first component in the server; based on the data communication resources, the maximum available bandwidth of a second component in the server is determined, and the bandwidth use sequence of the first component is earlier than that of the second component; based on the maximum available bandwidth, an initial bandwidth allocation strategy of the second component is determined, and the initial bandwidth allocation strategy is used for representing a rule for allocating bandwidth to the second component; in the running process of the server, determining the occupation state of the data communication resources, and adjusting the initial bandwidth allocation strategy based on the occupation state to obtain a target bandwidth allocation strategy; and allocating the bandwidth to the second component according to the target bandwidth allocation strategy, thereby solving the technical problem of low efficiency of allocating the bandwidth to the component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical fields of computer hardware and server architecture. Specifically, the present application relates to a bandwidth allocation method. Background Art

[0002] At present, with the rapid development of computer technology, the high-speed version of the Peripheral Component Interconnect Express (PCIe) bus has become the main interface standard for connecting a Central Processing Unit (CPU) to various high-speed peripherals (such as graphics cards, network cards, storage devices, etc.).

[0003] However, the allocation of PCIe bandwidth is usually limited by a fixed configuration method, such as a single-host configuration, which restricts the flexibility and performance of the system in different application scenarios. Especially in complex systems with multi-host or multi-task concurrency, there is a technical problem of low efficiency in allocating bandwidth to components.

[0004] In view of the related art, there is a technical problem of low efficiency in allocating bandwidth to components. At present, no effective solution has been proposed. Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the Invention

[0005] The embodiments of the present application provide a bandwidth allocation method to at least solve the technical problem of low efficiency in allocating bandwidth to components in the related art.

[0006] According to an embodiment of the present application, a bandwidth allocation method is provided, including: in response to the server being powered on for the first time, determining the data communication resources of a first component in the server; based on the data communication resources, determining the maximum available bandwidth of a second component in the server, where the bandwidth usage order of the first component is prior to that of the second component; based on the maximum available bandwidth, determining an initial bandwidth allocation policy for the second component, where the initial bandwidth allocation policy is used to represent the rule for allocating bandwidth to the second component; during the operation of the server, determining the occupancy status of the data communication resources, and based on the occupancy status, adjusting the initial bandwidth allocation policy to obtain a target bandwidth allocation policy; and allocating bandwidth to the second component according to the target bandwidth allocation policy.

[0007] In an exemplary embodiment, based on the data communication resources, determining the maximum available bandwidth of a second component in the server includes: determining the maximum available bandwidth of the second component based on the occupancy status of the data communication resources.

[0008] In an exemplary embodiment, before determining the maximum available bandwidth of a second component based on the occupancy status of data communication resources, the method further includes: monitoring a reset signal of a first component based on a programmable logic controller to obtain a first monitoring result; and determining the occupancy status of the data communication resources based on the first monitoring result.

[0009] In an exemplary embodiment, determining the occupancy status of the data communication resources based on the first monitoring result includes: in response to the first monitoring result indicating that the reset signal is in a target state, determining that the occupancy status of the data communication resources is an occupied state.

[0010] In an exemplary embodiment, after determining the occupancy status of the data communication resources based on the first monitoring result, the method further includes: storing the occupancy status in a register of the programmable logic controller.

[0011] In an exemplary embodiment, allocating bandwidth to a second component according to a target bandwidth allocation policy includes: in response to the number of data communication resources with an occupied status being greater than or equal to a first quantity threshold, allocating data communication resources with a non-occupied status to the hard disk side of the second component; in response to the number of data communication resources with an occupied status being less than the first quantity threshold, transmitting configuration information in a register of the programmable logic controller to a baseboard management controller; in the case where the baseboard management controller receives the configuration information, controlling the baseboard management controller to monitor the status of memory resources in the server to obtain a second monitoring result; in response to the second monitoring result indicating that the number of memory resources in an idle state is a first quantity, allocating data communication resources corresponding to the memory resources to the second component; in response to the second monitoring result indicating that the number of memory resources in an idle state is a second quantity, or all memory resources are in a non-idle state, allocating data communication resources corresponding to the memory resources to the second component based on architecture information of a target component.

[0012] In an exemplary embodiment, during the operation of the server, determining the occupancy status of the data communication resources includes: during the operation of the server, monitoring the data communication resources by using a baseboard management controller to obtain the occupancy status.

[0013] In an exemplary embodiment, after monitoring the data communication resources by using the baseboard management controller to obtain the occupancy status, the method further includes: controlling the baseboard management controller to synchronize the monitored occupancy status to the programmable logic controller.

[0014] In an exemplary embodiment, based on the occupancy status, the initial bandwidth allocation policy is adjusted to obtain the target bandwidth allocation policy, including: controlling a programmable logic controller to adjust the initial bandwidth allocation policy based on the occupancy status to obtain the target bandwidth allocation policy.

[0015] In an exemplary embodiment, controlling a programmable logic controller to adjust the initial bandwidth allocation policy based on the occupancy status to obtain the target bandwidth allocation policy includes: in response to the occupancy status being the occupied state and the number of data communication resources in the occupied state being greater than the second quantity threshold, controlling the programmable logic controller to adjust the initial bandwidth allocation policy to obtain the target bandwidth allocation policy.

[0016] According to another embodiment of the present application, there is also provided a bandwidth allocation device, including: a first determination unit configured to determine the data communication resources of a first component in the server in response to the server being powered on for the first time; a second determination unit configured to determine the maximum available bandwidth of a second component in the server based on the data communication resources, where the bandwidth usage order of the first component is prior to that of the second component; a third determination unit configured to determine the initial bandwidth allocation policy of the second component based on the maximum available bandwidth, where the initial bandwidth allocation policy is used to represent the rule for allocating bandwidth to the second component; an adjustment unit configured to determine the occupancy status of the data communication resources during the operation of the server and adjust the initial bandwidth allocation policy based on the occupancy status to obtain the target bandwidth allocation policy; and an allocation unit configured to allocate bandwidth to the second component according to the target bandwidth allocation policy.

[0017] According to yet another embodiment of the present application, there is also provided a computer-readable storage medium storing a computer program, where the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0018] According to yet another embodiment of the present application, there is also provided an electronic device including a memory and a processor, where the memory stores a computer program and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0019] According to yet another embodiment of the present application, there is also provided a computer program product including a computer program, where the computer program implements the steps in any one of the above method embodiments when executed by a processor.

[0020] Through this application, in response to the server being powered on for the first time, determine the data communication resources of the first component in the server; based on the data communication resources, determine the maximum available bandwidth of the second component in the server, where the bandwidth usage order of the first component is prior to that of the second component; based on the maximum available bandwidth, determine the initial bandwidth allocation policy for the second component, where the initial bandwidth allocation policy is used to represent the rule for allocating bandwidth to the second component; during the operation of the server, determine the occupancy status of the data communication resources, and based on the occupancy status, adjust the initial bandwidth allocation policy to obtain the target bandwidth allocation policy; allocate bandwidth to the second component according to the target bandwidth allocation policy, thereby solving the technical problem of low efficiency in allocating bandwidth to components and achieving the technical effect of improving the efficiency of allocating bandwidth to components. Description of the Drawings

[0021] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0022] Figure 1 It is a hardware structure block diagram of a server device for a bandwidth allocation method according to an embodiment of the present application;

[0023] Figure 2 It is a flowchart of a bandwidth allocation method according to an embodiment of the present application;

[0024] Figure 3 It is a schematic diagram of an optional internal architecture of a CPU according to an embodiment of the present application;

[0025] Figure 4 It is a schematic diagram of an optional PCIe topology of an NVMe disk according to an embodiment of the present application;

[0026] Figure 5 It is a schematic diagram of an optional topology adjustment of a PCIe Switch according to an embodiment of the present application;

[0027] Figure 6 It is a flowchart of a server hardware performance tuning method according to an embodiment of the present application;

[0028] Figure 7 It is a schematic diagram of an optional CPLD signal monitoring according to an embodiment of the present application;

[0029] Figure 8 It is a schematic diagram of the structure of a bandwidth allocation device according to an embodiment of the present application;

[0030] Figure 9 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Detailed Embodiments

[0031] Embodiments of the present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.

[0032] It should be noted that the terms "first", "second", etc. in the specification, claims and the above-mentioned drawings of the present application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence.

[0033] The method embodiments provided in the embodiments of the present application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 is a hardware structural block diagram of a server device for a bandwidth allocation method according to an embodiment of the present application. As Figure 1 shown, the server device may include one or more ( Figure 1 only one is shown in Figure 1 the figure) processors 102 (the processors 102 may include, but are not limited to, processing devices such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above-mentioned server device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown in Figure 1 the figure is only schematic and does not limit the structure of the above-mentioned server device. For example, the server device may further include more or fewer components than

[0034] shown in

[0035] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by a communication provider of a server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0036] In this embodiment, a bandwidth allocation method is provided. Figure 2 It is a flowchart of the bandwidth allocation method according to an embodiment of the present application, as Figure 2 shown, and the process includes the following steps:

[0037] Step S202, in response to the server being powered on for the first time, determine the data communication resources of the first component in the server.

[0038] In the above step S202, when the server is powered on for the first time, the data communication resources of the first component in the server can be determined. Among them, the first component can be various hardware components of the server, and can include but are not limited to a CPU, a memory controller, a network adapter (network card), etc. Here, it is only for illustration, and the type of the first component is not specifically limited. The data communication resources can be PCIe resources, and the first component can be a hardware device that occupies PCIe resources.

[0039] Step S204, based on the data communication resources, determine the maximum available bandwidth of the second component in the server, where the bandwidth usage order of the first component is prior to that of the second component.

[0040] In the above step S204, after determining the data communication resources of the first component in the server in response to the server being powered on for the first time, based on the determined data communication resources, the maximum available bandwidth of the second component in the server can be determined. Among them, the second component can be located downstream of the first component, that is, the bandwidth usage order of the first component is prior to that of the second component. The second component can be a backend, for example, it can be a data storage system, including a hard disk, a Solid State Drive (SSD), a storage device (such as an NVMe hard disk), etc. Here, it is only for illustration, and the type of the second component is not specifically limited.

[0041] Optionally, when the server is powered on for the first time, the maximum available bandwidth of the backend can be determined according to the PCIe resources of the device. For example, the maximum available bandwidth of the backend can be determined according to the occupancy of the PCIe resources.

[0042] Step S206: Determine the initial bandwidth allocation policy for the second component based on the maximum available bandwidth, where the initial bandwidth allocation policy is used to represent the rule for allocating bandwidth to the second component.

[0043] In the above step S206, after determining the maximum available bandwidth of the second component in the server based on the data communication resources, the initial bandwidth allocation policy for the second component can be determined based on the determined maximum available bandwidth. Among them, the initial bandwidth allocation policy can be used to represent the rule for allocating bandwidth to the second component.

[0044] Step S208: During the operation of the server, determine the occupancy status of the data communication resources, and based on the occupancy status, adjust the initial bandwidth allocation policy to obtain the target bandwidth allocation policy.

[0045] In the above step S208, after determining the initial bandwidth allocation policy for the second component based on the maximum available bandwidth, the occupancy status of the data communication resources can be determined during the operation of the server. After determining the occupancy status of the data communication resources, the initial bandwidth allocation policy can be adjusted based on the determined occupancy status to obtain the target bandwidth allocation policy.

[0046] Optionally, when the server is running, the Baseboard Management Controller (BMC) can be used to monitor the occupancy status of the server's PCIe and memory resources in real time. Further, based on the determined occupancy status, the initial bandwidth allocation policy can be adjusted to obtain the target bandwidth allocation policy. Among them, the BMC can be a dedicated controller for monitoring and managing the server.

[0047] Optionally, after using the BMC to monitor the occupancy status of the server's PCIe and memory resources in real time, the BMC can synchronize the occupancy status (real-time service status) to the Complex Programmable Logic Device (CPLD), and the CPLD adjusts the initial bandwidth allocation policy to obtain the target bandwidth allocation policy.

[0048] It should be noted that the CPLD is a more complex logic element compared to the Programmable Logic Device (PLD). The CPLD is a digital integrated circuit in which users can construct logic functions according to their respective needs. The basic design method of the CPLD is to generate the corresponding target file by means of an integrated development software platform, using methods such as schematic diagrams and hardware description languages, and transfer the code to the target chip through a download cable (in-system programming) to implement the designed digital system.

[0049] Step S210: Allocate bandwidth to the second component according to the target bandwidth allocation policy.

[0050] In the above step S210, after adjusting the initial bandwidth allocation policy based on the occupancy status to obtain the target bandwidth allocation policy, bandwidth can be allocated to the second component according to the obtained target bandwidth allocation policy. Among them, the second component can be a PCIe switch (Switch).

[0051] Optionally, after adjusting the initial bandwidth allocation policy to obtain the target bandwidth allocation policy, the CPLD can be used to control the reasonable bandwidth allocation of the Switch card. A PCIe Switch is a hardware device that provides expansion or aggregation capabilities and allows more devices to be connected to a PCle port.

[0052] Through the above steps, in response to the server being powered on for the first time, determine the data communication resources of the first component in the server; based on the data communication resources, determine the maximum available bandwidth of the second component in the server, where the bandwidth usage order of the first component is prior to that of the second component; based on the maximum available bandwidth, determine the initial bandwidth allocation policy for the second component, where the initial bandwidth allocation policy is used to represent the rule for allocating bandwidth to the second component; during the operation of the server, determine the occupancy status of the data communication resources, and based on the occupancy status, adjust the initial bandwidth allocation policy to obtain the target bandwidth allocation policy; allocate bandwidth to the second component according to the target bandwidth allocation policy, thereby solving the technical problem of low efficiency in allocating bandwidth to components and achieving the technical effect of improving the efficiency of allocating bandwidth to components.

[0053] As an alternative implementation, determining the maximum available bandwidth of the second component in the server based on the data communication resources includes: determining the maximum available bandwidth of the second component based on the occupancy status of the data communication resources.

[0054] In this embodiment, after determining the data communication resources of the first component in the server in response to the server being powered on for the first time, based on the occupancy status of the data communication resources, the maximum available bandwidth of the second component can be determined.

[0055] Optionally, based on the occupancy status (occupancy situation) of the PCIe resources in the server, the maximum available bandwidth of the backend can be determined.

[0056] As an alternative implementation, before determining the maximum available bandwidth of the second component based on the occupancy status of the data communication resources, the method further includes: monitoring the reset signal of the first component based on a programmable logic controller to obtain a first monitoring result; determining the occupancy status of the data communication resources based on the first monitoring result.

[0057] In this embodiment, based on the programmable logic controller, the reset (PERST) signal of the first component can be monitored to obtain a first monitoring result. After monitoring the reset signal of the first component to obtain the first monitoring result, based on the obtained first monitoring result, the occupancy status of the data communication resources can be determined. Among them, the programmable logic controller can be a CPLD.

[0058] Optionally, in this embodiment, the CPU is divided into four non-uniform memory access (Non-Uniform Memory Access, abbreviated as NUMA) areas, and each NUMA area has resources of 32 channels (lanes). Among them, 16 lanes are used for inter-CPU interconnection, that is, the extensible generic memory interface (eXtensible Generic Memory Interface, abbreviated as XGMI) signal, and 16 lanes are used for PCIe expansion to connect devices such as network cards and hard disks. During the PCIe device initialization phase, the first step is to pull up the PERST signal, and the CPLD monitors the PCIe PERST signals of 8 chips (DIE) in real time. Among them, NUMA is an architecture model regarding how multiple CPUs access memory.

[0059] Through the above embodiment, by monitoring the PERST signal status, the CPLD can know in real time which PCIe lanes are occupied and which are idle, thus providing an immediate data basis for dynamic resource allocation. When the system is powered on or the device is initialized, the CPLD immediately detects the change of the PERST signal, quickly identifies the available PCIe resources, and can immediately participate in the resource allocation decision to ensure the timeliness and accuracy of resource allocation.

[0060] As an optional implementation manner, determining the occupancy status of the data communication resources based on the first monitoring result includes: in response to the first monitoring result indicating that the reset signal is in the target state, determining that the occupancy status of the data communication resources is the occupied state.

[0061] In this embodiment, after monitoring the reset signal of the first component to obtain the first monitoring result, when the obtained first monitoring result indicates that the reset signal is in the target state, it can be determined that the occupancy status of the data communication resources is the occupied state. Among them, the target state can be the pulled-up state.

[0062] Optionally, if the PERST signal is pulled up during the boot process, it means that the corresponding lane has been occupied by other devices and cannot be used to connect the NVMe disk.

[0063] As an alternative implementation, after determining the occupancy status of the data communication resources based on the first monitoring result, the method further includes: storing the occupancy status in a register of the programmable logic controller.

[0064] In this embodiment, after determining the occupancy status of the data communication resources based on the first monitoring result, the determined occupancy status of the data communication resources can be stored in a register of the programmable logic controller.

[0065] Optionally, after determining that the PERST signal is pulled high during the startup process, the corresponding lane has been occupied by other devices and cannot be used to connect to the NVMe disk, the CPLD records the available lanes in this step and writes them into the CPLD register.

[0066] As an alternative implementation, allocating bandwidth to the second component according to the target bandwidth allocation policy includes: in response to the number of data communication resources with an occupied status being greater than or equal to the first quantity threshold, allocating data communication resources with an unoccupied status to the hard disk end of the second component; in response to the number of data communication resources with an occupied status being less than the first quantity threshold, transmitting the configuration information in the register of the programmable logic controller to the baseboard management controller; in the case where the baseboard management controller receives the configuration information, controlling the baseboard management controller to monitor the status of the memory resources in the server to obtain a second monitoring result; in response to the number of memory resources with an idle status in the second monitoring result being the first quantity, allocating the data communication resources corresponding to the memory resources to the second component; in response to the number of memory resources with an idle status in the second monitoring result being the second quantity, or all the memory resources being in a non-idle state, allocating the data communication resources corresponding to the memory resources to the second component based on the architecture information of the target component.

[0067] In this embodiment, Table 1 shows the number of available DIEs of two CPUs in six scenarios. In the first, second, and third scenarios, the service end (network card end) occupies 4 or 5 DIEs. The number of PCIe resources being greater than or equal to the first quantity threshold can be used to measure that the service end occupies more than half of the PCIe resources. At this time, the available bandwidth of the hard disk end is given priority, and the remaining PCIe resources can be allotted to the PCIe SWITCH. In the fourth, fifth, and sixth scenarios, the service end occupies 2 or 3 DIEs of PCIe resources. The number of PCIe resources being less than the first quantity threshold can be used to measure that the service end occupies fewer resources. At this time, considering the front-end and back-end load balancing and network transmission loss, the hard disk end can occupy one DIE of each of the two CPUs. At this time, the available bandwidth of the hard disk end is no longer given priority, but the rationality of bandwidth allocation needs to be considered.

[0068] Optionally, for the fourth, fifth, and sixth scenarios, when the CPLD detects configurations that match these three scenarios, it passes the configuration information in the register to the BMC. The BMC checks whether there is free memory resource in the idle DIE. If there is only one DIE with free memory resource under the CPU, the Switch directly occupies the PCIe resource of this DIE without any other judgment. Here, the first quantity is 1, that is, only one DIE has free memory resource.

[0069] If all idle DIEs have no available memory or multiple DIEs have available idle memory, it is necessary to control the upstream resources of the Switch card according to the resource occupancy of the service network card. The allocation rule needs to be based on the architecture of the CPU (i.e., architecture information). For example, when the service-side network card occupies CPU0_DIE2 and CPU1_DIE3, the Switch card needs to occupy CPU1_DIE0 and CPU0_DIE1 to ensure that the NUMA between the network card and the Switch card can directly access each other. Here, the second quantity is multiple, that is, multiple DIEs have available idle memory.

[0070] Table 1 Table of the number of available DIEs of the CPU

[0071]

[0072] In the above embodiments, by dividing the scenarios into different categories and adopting different PCIe resource allocation strategies, when the service side occupies a large amount of PCIe resources, since the service side has occupied most of the PCIe resources, the system will automatically identify the remaining allocable resources and preferentially allocate them to the PCIe Switch on the hard disk side to ensure that the NVMe hard disk can obtain sufficient bandwidth, thereby avoiding the storage performance from becoming a bottleneck. When the service side occupies less PCIe resources, the system will be more inclined to achieve balanced allocation of front-end and back-end resources rather than pursuing the performance of the hard disk side. This is achieved by allocating one DIE to the hard disk side between two CPUs respectively, ensuring the balance of network transmission and data processing, and thus avoiding any single-point overload.

[0073] As an alternative implementation, during the operation of the server, determine the occupancy status of data communication resources, including: during the operation of the server, use the baseboard management controller to monitor the data communication resources to obtain the occupancy status.

[0074] In this embodiment, during the operation of the server, the baseboard management controller can be used to monitor the data communication resources to obtain the occupancy status. Optionally, when the server service is running, the BMC monitors the occupancy status of the server's PCIe and memory resources in real time.

[0075] Through the above embodiments, the BMC can continuously monitor the usage of the PCIe bus and memory in the server. By analyzing this data, the system can intelligently adjust resource allocation to ensure that high-load services obtain sufficient resources, improving the performance and efficiency of the overall system. Through real-time monitoring, resource overload, abnormal usage patterns, or potential hardware failures (such as memory errors and PCIe connection problems) can be quickly identified, allowing system administrators to take timely measures to prevent system crashes or data loss.

[0076] As an alternative implementation, after using the baseboard management controller to monitor the data communication resources and obtain the occupancy status, the method further includes: controlling the baseboard management controller to synchronize the monitored occupancy status to the programmable logic controller.

[0077] In this embodiment, after using the baseboard management controller to monitor the data communication resources and obtain the occupancy status, the baseboard management controller can be controlled to synchronize the monitored occupancy status to the programmable logic controller. Optionally, after the BMC real-time monitors the occupancy status of the server's PCIe and memory resources, the BMC can synchronize the real-time service status to the CPLD.

[0078] As an alternative implementation, based on the occupancy status, adjusting the initial bandwidth allocation policy to obtain the target bandwidth allocation policy includes: controlling the programmable logic controller to adjust the initial bandwidth allocation policy based on the occupancy status to obtain the target bandwidth allocation policy.

[0079] In this embodiment, after controlling the baseboard management controller to synchronize the monitored occupancy status to the programmable logic controller, the programmable logic controller can be controlled to adjust the initial bandwidth allocation policy based on the occupancy status to obtain the target bandwidth allocation policy. Optionally, after the BMC synchronizes the real-time service status to the CPLD, the CPLD can be controlled to complete the reasonable allocation of the bandwidth of the Switch card.

[0080] As an alternative implementation, controlling the programmable logic controller to adjust the initial bandwidth allocation policy based on the occupancy status to obtain the target bandwidth allocation policy includes: in response to the occupancy status being the occupied status and the number of data communication resources in the occupied status being greater than the second quantity threshold, controlling the programmable logic controller to adjust the initial bandwidth allocation policy to obtain the target bandwidth allocation policy.

[0081] In this embodiment, after determining the occupancy status of the communication resources, when the occupancy status of the communication resources is the occupied status and the number of occupied data communication resources is greater than the second quantity threshold, the programmable logic controller can be controlled to adjust the initial bandwidth allocation policy to obtain the target bandwidth allocation policy. Wherein, the second quantity threshold can be a warning threshold set according to the actual situation.

[0082] In the above embodiment, by setting a warning threshold, when the monitored resource usage reaches or exceeds the preset threshold, the dynamic adjustment of the bandwidth allocation policy is triggered. When the CPU or memory resource utilization rate of the server is high, the allocation of PCIe resources is automatically adjusted to ensure that critical applications or high-load services obtain sufficient bandwidth, thereby avoiding performance bottlenecks and improving the overall system performance. In addition, the dynamic adjustment can evenly distribute the load on different DIEs or CPUs, avoiding overloading of some resources while other resources are idle, and making more reasonable use of the hardware resources of the server.

[0083] Through this application, in response to the server being powered on for the first time, the data communication resources of the first component in the server are determined; based on the data communication resources, the maximum available bandwidth of the second component in the server is determined, wherein the bandwidth usage order of the first component is prior to that of the second component; based on the maximum available bandwidth, the initial bandwidth allocation policy of the second component is determined, wherein the initial bandwidth allocation policy is used to represent the rule for allocating bandwidth to the second component; during the operation of the server, the occupancy status of the data communication resources is determined, and based on the occupancy status, the initial bandwidth allocation policy is adjusted to obtain the target bandwidth allocation policy; according to the target bandwidth allocation policy, bandwidth is allocated to the second component, thereby solving the technical problem of low efficiency in allocating bandwidth to components and achieving the technical effect of improving the efficiency of allocating bandwidth to components.

[0084] Obviously, the above-described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. In order to better understand the above method, the following will describe the above process in conjunction with embodiments, but it is not used to limit the technical solutions of the embodiments of the present invention. Specifically:

[0085] With the rapid development of computer technology, the PCIe bus has become the main interface standard for connecting the CPU to various high-speed peripherals (such as graphics cards, network cards, storage devices, etc.). However, the allocation of PCIe bandwidth is usually limited by a fixed configuration method, such as a single host configuration, which limits the flexibility and performance of the system in different application scenarios. Especially in complex systems with multi-host or multi-task concurrency, how to efficiently and flexibly allocate PCIe bandwidth has become an urgent problem to be solved.

[0086] In an alternative example, a performance tuning solution for a distributed storage system is proposed. This solution analyzes the system performance by calling the server's log files to determine the current business model, and automatically adjusts performance parameters according to the business model to achieve the purpose of performance optimization. This solution realizes performance tuning from a software perspective. However, this solution cannot achieve flexible invocation of hardware resources.

[0087] To solve the above problems, this application proposes a server hardware performance tuning method, which maximizes the utilization rate of hardware PCIe resources for servers with different configurations that can be shipped, and ensures that the maximum PCIe bandwidth can be obtained by the backend NVMe disks. During business operation, reasonable PCIe channels are automatically allocated according to the occupancy rate of the node CPU or memory.

[0088] Figure 3 It is a schematic diagram of an optional internal architecture of the CPU according to an embodiment of the present application, as Figure 3 shown. Each CPU is divided into four NUMA internally, named DIE0 - DIE3 respectively. At the same time, there are four XGMI buses between two CPUs to complete the interconnection between CPUs. There are two memory channels and four memory slots under each CPU internal architecture.

[0089] According to the CPU architecture schematic diagram, there are channels between the four NUMA inside each CPU that can directly access each other. However, when it comes to cross - CPU interaction, the situation is different. For example, when DIE1 of CPU0 on the left needs to access the memory of DIE3 of CPU1 on the right, the access can be directly completed through the XGMI bus. But when DIE1 of CPU0 on the left needs to access the memory of DIE0 of CPU1 on the right, the access cannot be directly completed. It needs to access DIE3 through the XGMI bus first, and then access DIE0 through DIE3. The second method mentioned above increases the time consumption of the entire access process and has a greater impact on performance in high - performance scenarios. Considering this scenario, this embodiment proposes an optimal allocation scheme for PCIe resources to achieve the purpose of performance optimization.

[0090] It should be noted that in the early days, each server had a single CPU. With the development of technology, there emerged a need for multiple CPUs to work together. To address such needs, hardware designers distributed the memory controller evenly across each DIE, thus forming the NUMA architecture. The NUMA architecture divides CPUs into different groups (Nodes), each Node consisting of one or more (physical) CPUs and having independent local memory, input / output (Input / Output, abbreviated as I / O), and other resources. In the NUMA architecture, each node has its own memory and computing resources, which enables the processor to allocate resources more flexibly, improving the overall performance and efficiency. In addition, the NUMA architecture can expand the computing and storage capabilities of the processor by increasing the number of nodes, making it a very suitable architecture for large-scale parallel processing.

[0091] Figure 4 is a schematic diagram of an optional PCIe topology of an NVMe disk according to an embodiment of the present application, as Figure 4 shown, the PCIE signal can be used to represent the high-speed data communication paths between the CPU and the PCIe SWITCH, and between the PCIe SWITCH and the NVMe hard disk. The SAS signal can be used to represent the serial protocol (Serial Attached SCSI) for connecting storage devices (such as hard disks) and storage controllers. The I2C signal can be used to represent the two-wire bidirectional serial bus (Inter-Integrated Circuit) between microcontrollers and microprocessors. PE0~3 can be used to represent specific PCIe or management interfaces. J101 (Slimline) can be used to represent the PCIe interface for connecting Slimline-type devices (such as certain storage modules or expansion cards), and the same applies to the rest, which will not be elaborated here. Slot can be used to represent the slots on the motherboard for physically connecting various types of expansion cards or modules, such as PCIe cards, memory cards, etc. Riser can be an interface or card for expanding the motherboard slots. Labels such as FBP, FP_BP, 12C_EPBPO, etc. can be used to represent specific areas or interfaces on the motherboard, such as the rear panel (FBP), the front panel (FP_BP), and the I2C management interface related to PCIe devices (I2C_EPBPO). Rear_BPO can be used to represent the server rear panel or the rear board (Rear Board Planar Overlay), which is a board layer for connecting devices or expansion interfaces at the rear of the server, such as network ports or storage expansion cards. A redundant array of independent disks (Redundant Array of Independent Disks, abbreviated as RAID) card is a hardware device for managing and implementing RAID (disk array) technology.

[0092] To enable the NVMe drives of the server to automatically obtain reasonable PCIe resources according to different configurations, the PCIe topology of the NVMe drives is briefly introduced. As Figure 4 shown, the server can support 24 NVMe drives. Every 12 drives are connected to a PCIe Switch, and the PCIe Switch is fixedly connected to the PCIe X16 slot of the server. The server usually uses U.2 NVMe drives. The theoretical upstream bandwidth of the hard drives is PCIe X4. Under the topology of this figure, 12 drives share a group of PCIe X16 bandwidth, and each drive can only exert 1 / 3 of the theoretical bandwidth upper limit. In high-performance scenarios, the ideal performance cannot be exerted.

[0093] To solve the above problems, this embodiment proposes a hardware performance tuning solution, which can include: PCIe Switch topology optimization; when the server is powered on for the first time, determine the maximum available bandwidth at the backend according to the PCIe resource occupancy of the device; when the server business is running, the BMC monitors the PCIe and memory resource occupancy status of the server; the BMC synchronizes the real-time business status to the CPLD, and the CPLD controls the reasonable allocation of the bandwidth of the Switch card.

[0094] First, for the PCIe Switch topology optimization, as described above, the connection topology of the current server's PCIe Switch is given. The Switch is fixedly connected under a group of PCIe X16, resulting in limited available bandwidth. Figure 5 It is a schematic diagram of an optional topology adjustment of the PCIe Switch according to an embodiment of the present application. As Figure 5 shown, the topology of the PCIe Switch is re-optimized and designed. The 24 NVMe drives are no longer separately connected to two PCIe Switches, but are simultaneously connected under one Switch, and the upstream end of the Switch is simultaneously connected to the PCIe buses of 8 NUMA.

[0095] Figure 6 It is a flowchart of the server hardware performance tuning method according to an embodiment of the present application. As Figure 6 shown, the process of the server hardware performance tuning method can include the following steps:

[0096] Step S601, when the server is powered on for the first time, determine the maximum available bandwidth at the backend according to the PCIe resource occupancy of the device.

[0097] In the above step, when the server is powered on for the first time, determine the maximum available bandwidth at the backend according to the PCIe resource occupancy of the device. Figure 7 It is a schematic diagram of an optional CPLD signal monitoring according to an embodiment of the present application. As Figure 7As shown in the figure, the inside of the CPU is divided into four NUMA, and each NUMA has 32 lanes of resources. Among them, 16 lanes are used for inter - CPU interconnection, that is, XGMI signals, and 16 lanes are used for PCIe expansion to connect devices such as network cards and hard disks. During the initialization stage of the PCIe device, the first step is to pull up the PERST signal. The CPLD monitors the PCIEPERST signals of 8 DIEs in real - time. If the PERST signal is pulled up during the boot process, it means that the corresponding lane has been occupied by other devices and cannot be used to connect to the NVMe disk. The CPLD records the available lanes in this step and writes them into the CPLD register.

[0098] Step S602, when the server business is running, the BMC monitors the occupancy status of the server's PCIe and memory resources in real - time.

[0099] In the above steps, when the server business is running, the BMC monitors the occupancy status of the server's PCIe and memory resources in real - time. After the business is deployed on the device, the BMC monitors the resource occupancy status under the system (mainly the memory occupancy situation) in real - time, providing a basis for the bandwidth allocation of the PCIeSwitch.

[0100] Step S603, the BMC synchronizes the real - time service status to the CPLD.

[0101] Step S604, the CPLD controls the reasonable allocation of the bandwidth of the Switch card.

[0102] In the above steps, the business data of the server is generally input into the server through the business network. After the CPU processes the data, it falls onto the hard disk (i.e., NVMe) through cache media such as memory. To achieve better performance, first, it is necessary to avoid the situation of accessing data across two DIEs between the network card and the NVMe disk, reducing the communication latency between CPUs; second, it is necessary to ensure that the NUMA occupied by the NVMe disk is equipped with memory, avoiding the situation of accessing memory resources across DIEs when writing data, reducing the write data latency.

[0103] According to the possible actual configurations, Table 1 gives the number of available DIEs of the CPU in six scenarios, as well as different PCIe resource allocation strategies, which will not be elaborated here. Since reasonable bandwidth allocation needs to consider two points: cross - DIE access between the network card and the NVMe disk and cross - DIE access of memory, in actual tests, cross - DIE access of memory has a greater impact on the test performance. For the fourth, fifth, and sixth scenarios, it is necessary to control the upstream resources of the Switch card according to the resource occupancy situation of the business network card, and the allocation rules need to be based on the CPU architecture, which will not be elaborated here either.

[0104] Without adding new hardware modules, this embodiment solves the problem of unreasonable PCIe resource allocation through the effective cooperation among BMC, CPLD, and Switch, improves the hardware performance of the device, and does not affect the reliability.

[0105] This embodiment realizes the bandwidth allocation of Switch based on CPLD, with small hardware modification amount and strong feasibility; by combining CPLD, BMC, and Switch, the hardware PCIe resources can be utilized to the greatest extent; the resource allocation is completed through PCIe Switch, ensuring high hardware reliability.

[0106] In summary, through the above implementation manner, in response to the server being powered on for the first time, the data communication resources of the first component in the server are determined; based on the data communication resources, the maximum available bandwidth of the second component in the server is determined, where the bandwidth usage order of the first component is prior to that of the second component; based on the maximum available bandwidth, the initial bandwidth allocation policy for the second component is determined, where the initial bandwidth allocation policy is used to represent the rule for allocating bandwidth to the second component; during the operation of the server, the occupancy status of the data communication resources is determined, and based on the occupancy status, the initial bandwidth allocation policy is adjusted to obtain the target bandwidth allocation policy; according to the target bandwidth allocation policy, bandwidth is allocated to the second component, thereby solving the technical problem of low efficiency in allocating bandwidth to components and achieving the technical effect of improving the efficiency of allocating bandwidth to components.

[0107] Through the description of the above implementation manners, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application.

[0108] In this embodiment, a bandwidth allocation device is further provided. The device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0109] Figure 8 is a schematic structural diagram of the bandwidth allocation device according to the embodiment of the present application, as Figure 8As shown in the figure, the device includes: a first determination unit 802, a second determination unit 804, a third determination unit 806, an adjustment unit 808, and an allocation unit 810.

[0110] The first determination unit 802 is configured to determine the data communication resources of the first component in the server in response to the server being powered on for the first time.

[0111] The second determination unit 804 is configured to determine the maximum available bandwidth of the second component in the server based on the data communication resources, where the bandwidth usage order of the first component is prior to that of the second component.

[0112] The third determination unit 806 is configured to determine the initial bandwidth allocation policy for the second component based on the maximum available bandwidth, where the initial bandwidth allocation policy is used to represent the rule for allocating bandwidth to the second component.

[0113] The adjustment unit 808 is configured to determine the occupancy status of the data communication resources during the operation of the server, and adjust the initial bandwidth allocation policy based on the occupancy status to obtain the target bandwidth allocation policy.

[0114] The allocation unit 810 is configured to allocate bandwidth to the second component according to the target bandwidth allocation policy.

[0115] In an exemplary embodiment, the second determination unit 804 includes: a first determination module configured to determine the maximum available bandwidth of the second component based on the occupancy status of the data communication resources.

[0116] In an exemplary embodiment, before determining the maximum available bandwidth of the second component based on the occupancy status of the data communication resources, the device further includes: a first monitoring unit configured to monitor the reset signal of the first component based on a programmable logic controller to obtain a first monitoring result; a fourth determination unit configured to determine the occupancy status of the data communication resources based on the first monitoring result.

[0117] In an exemplary embodiment, the fourth determination unit includes: a second determination module configured to determine that the occupancy status of the data communication resources is the occupied status in response to the first monitoring result indicating that the reset signal is in a target state.

[0118] In an exemplary embodiment, after determining the occupancy status of the data communication resources based on the first monitoring result, the device further includes: a storage unit configured to store the occupancy status in a register of the programmable logic controller.

[0119] In an exemplary embodiment, the allocation unit 810 includes: a first allocation module, configured to allocate data communication resources with an unoccupied state to the hard disk side of the second component in response to the number of data communication resources with an occupied state being greater than or equal to a first quantity threshold; a transmission module, configured to transmit the configuration information in the register of the programmable logic controller to the baseboard management controller in response to the number of data communication resources with an occupied state being less than the first quantity threshold; a monitoring module, configured to control the baseboard management controller to monitor the state of the memory resources in the server to obtain a second monitoring result when the baseboard management controller receives the configuration information; a second allocation module, configured to allocate the data communication resources corresponding to the memory resources to the second component in response to the number of memory resources with an idle state in the second monitoring result being a first quantity; and a third allocation module, configured to allocate the data communication resources corresponding to the memory resources to the second component based on the architecture information of the target component in response to the number of memory resources with an idle state in the second monitoring result being a second quantity or all the memory resources being in a non-idle state.

[0120] In an exemplary embodiment, the adjustment unit 808 is configured to determine the occupied state of the data communication resources during the operation of the server, including: a second monitoring unit, configured to monitor the occupied state by using the baseboard management controller to monitor the data communication resources during the operation of the server.

[0121] In an exemplary embodiment, after using the baseboard management controller to monitor the data communication resources to obtain the occupied state, the apparatus further includes: a synchronization unit, configured to control the baseboard management controller to synchronize the monitored occupied state to the programmable logic controller.

[0122] In an exemplary embodiment, the adjustment unit 808 is configured to adjust the initial bandwidth allocation policy based on the occupied state to obtain a target bandwidth allocation policy, including: an adjustment module, configured to control the programmable logic controller to adjust the initial bandwidth allocation policy based on the occupied state to obtain a target bandwidth allocation policy.

[0123] In an exemplary embodiment, the adjustment module includes: an adjustment sub-module, configured to control the programmable logic controller to adjust the initial bandwidth allocation policy to obtain a target bandwidth allocation policy in response to the occupied state being an occupied state and the number of data communication resources in the occupied state being greater than a second quantity threshold.

[0124] In the above device, the first determination unit 802 determines the data communication resources of the first component in the server in response to the server being powered on for the first time. The second determination unit 804 determines the maximum available bandwidth of the second component in the server based on the data communication resources, where the bandwidth usage order of the first component is prior to that of the second component. The third determination unit 806 determines the initial bandwidth allocation policy for the second component based on the maximum available bandwidth, where the initial bandwidth allocation policy is used to represent the rule for allocating bandwidth to the second component. The adjustment unit 808 determines the occupancy status of the data communication resources during the operation of the server, and adjusts the initial bandwidth allocation policy based on the occupancy status to obtain the target bandwidth allocation policy. The allocation unit 810 allocates bandwidth to the second component according to the target bandwidth allocation policy, thereby solving the technical problem of low efficiency in allocating bandwidth to components and achieving the technical effect of improving the efficiency of allocating bandwidth to components.

[0125] It should be noted that the above-mentioned modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are respectively located in different processors in any combination form.

[0126] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0127] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drive, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disk, magnetic disk or optical disc, etc., various media that can store computer programs.

[0128] Optionally, in this embodiment, the above computer program may be configured to execute the corresponding steps of the method in the above embodiment through the computer program.

[0129] An embodiment of the present application also provides an electronic device, Figure 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application, as Figure 9 shown, the electronic device includes a memory 902 and a processor 904. A computer program is stored in the memory 902, and the processor 904 is configured to execute the steps in any one of the above method embodiments through the computer program.

[0130] Optionally, in this embodiment, the above processor 904 may be configured to execute the following steps through the computer program:

[0131] S1, in response to the server being powered on for the first time, determine the data communication resources of the first component in the server;

[0132] S2, based on the data communication resources, determine the maximum available bandwidth of the second component in the server, where the bandwidth usage order of the first component is prior to that of the second component;

[0133] S3, based on the maximum available bandwidth, determine the initial bandwidth allocation policy for the second component, where the initial bandwidth allocation policy is used to represent the rule for allocating bandwidth to the second component;

[0134] S4, during the operation of the server, determine the occupancy status of the data communication resources, and based on the occupancy status, adjust the initial bandwidth allocation policy to obtain the target bandwidth allocation policy;

[0135] S4, allocate bandwidth to the second component according to the target bandwidth allocation policy.

[0136] Optionally, in this embodiment, the above-mentioned processor 804 may also be set to execute the above steps through a computer program.

[0137] Optionally, those of ordinary skill in the art can understand that Figure 9 the structure shown is only schematic Figure 9 and does not limit the structure of the above-mentioned electronic device. For example, the electronic device may further include more or fewer components (such as network interfaces, etc.) than those shown Figure 9 in the figure, or have a different configuration from that shown Figure 9 in the figure.

[0138] Among them, the memory 902 can be used to store software programs and modules, such as the program instructions / modules corresponding to the bandwidth allocation method in the embodiments of the present application. The processor 904 executes various functional applications and data processing by running the software programs and modules stored in the memory 902, that is, implements the above-mentioned bandwidth allocation method. The memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 902 may further include a memory remotely set relative to the processor 904, and these remote memories can be connected to the terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, enterprise intranets, local area networks, mobile communication networks, and their combinations. Among them, the memory 902 may specifically but not limitedly be used to store information such as system configuration files. As an example, such as Figure 8As shown, the above-mentioned memory 902 may but is not limited to include all the modules in the above-mentioned bandwidth allocation device. In addition, it may also include but is not limited to other module units in the above-mentioned bandwidth allocation device, which will not be elaborated in this example.

[0139] Optionally, the above-mentioned transmission device 906 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 906 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 906 is a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0140] In addition, the above-mentioned electronic device further includes: a display 908; and a connection bus 810, which is used to connect each module component in the above-mentioned electronic device.

[0141] An embodiment of the present application further provides a computer program product, the above-mentioned computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any one of the above-mentioned method embodiments.

[0142] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any one of the above-mentioned method embodiments.

[0143] An embodiment of the present application further provides a computer program, the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in any one of the above-mentioned method embodiments.

[0144] Specific examples in this embodiment may refer to the examples described in the above-mentioned embodiments and exemplary embodiments, and will not be elaborated in this embodiment.

[0145] Obviously, those skilled in the art should understand that the various modules or steps of the present application described above can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module for implementation. In this way, the present application is not limited to any specific combination of hardware and software.

[0146] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application shall be included within the protection scope of the present application.

Claims

1. A bandwidth allocation method, characterized in that: include: In response to a server being powered on for the first time, determining a data communication resource of a first component in the server; determining, based on the data communication resources, a maximum available bandwidth of a second component in the server, wherein the bandwidth usage order of the first component precedes that of the second component; Based on the maximum available bandwidth, determine an initial bandwidth allocation strategy for the second component, wherein the initial bandwidth allocation strategy is used to represent a rule for allocating bandwidth to the second component; During the operation of the server, determining the occupancy status of the data communication resources, and adjusting the initial bandwidth allocation strategy based on the occupancy status to obtain a target bandwidth allocation strategy; Allocate bandwidth to the second component according to the target bandwidth allocation policy.

2. The method according to claim 1, characterized in that Determining a maximum available bandwidth of a second component in the server based on the data communication resource includes: The maximum available bandwidth of the second component is determined based on the occupancy status of the data communication resource.

3. The method according to claim 2, characterized in that Before determining the maximum available bandwidth of the second component based on the occupancy status of the data communication resource, the method further includes: Based on the programmable logic controller, monitoring the reset signal of the first component to obtain a first monitoring result; Based on the first monitoring result, the occupancy status of the data communication resource is determined.

4. The method according to claim 3, characterized in that Determining the occupancy state of the data communication resource based on the first monitoring result includes: In response to the first monitoring result being that the reset signal is in a target state, determining that the occupation state of the data communication resource is an occupied state.

5. The method according to claim 4, characterized in that After determining the occupancy state of the data communication resource based on the first monitoring result, the method further includes: The occupancy status is stored in a register of the programmable logic controller.

6. The method according to claim 1, characterized in that Allocating bandwidth to the second component according to the target bandwidth allocation strategy includes: In response to the number of the data communication resources in the occupied state being greater than or equal to a first number threshold, allocating the data communication resources in the unoccupied state to the hard disk end of the second component; In response to the number of the data communication resources in the occupied state being less than the first number threshold, transmitting configuration information in a register of a programmable logic controller to a baseboard management controller; When the baseboard management controller receives the configuration information, controlling the baseboard management controller to monitor the state of the memory resources in the server to obtain a second monitoring result; In response to the second monitoring result being that the number of the memory resources in the idle state is a first number, allocating data communication resources corresponding to the memory resources to the second component; In response to the second monitoring result that the number of memory resources in the idle state is a second number, or the memory resources are all in a non-idle state, based on the architecture information of the target component, the data communication resources corresponding to the memory resources are allocated to the second component.

7. The method according to claim 1, characterized in that During the operation of the server, determining the occupation state of the data communication resource includes: During the operation of the server, the data communication resources are monitored by a baseboard management controller to obtain the occupancy status.

8. The method according to claim 7, characterized in that After the baseboard management controller is used to monitor the data communication resources and obtain the occupancy status, the method further includes: The baseboard management controller is controlled to synchronize the monitored occupancy status to a programmable logic controller.

9. The method according to claim 8, characterized in that Based on the occupancy status, the initial bandwidth allocation strategy is adjusted to obtain a target bandwidth allocation strategy, including: The programmable logic controller is controlled to adjust the initial bandwidth allocation strategy based on the occupancy status to obtain the target bandwidth allocation strategy.

10. The method according to claim 9, characterized in that Controlling the programmable logic controller to adjust the initial bandwidth allocation strategy based on the occupancy state to obtain the target bandwidth allocation strategy includes: In response to the occupancy state being an occupied state, and the number of the data communication resources in the occupied state being greater than a second number threshold, the programmable logic controller is controlled to adjust the initial bandwidth allocation strategy to obtain the target bandwidth allocation strategy.

Citation Information

Patent Citations

  • Bandwidth allocation method and system

    CN105898383A

  • PCIE bandwidth automatic configuration method, server mainboard and server

    CN111159085A

  • PCIe bandwidth allocation method and basic input / output system

    CN114048036A

  • Bandwidth resource allocation method, PCIe channel switcher and electronic equipment

    CN115442239A

  • PCIE (Peripheral Component Interface Express) equipment bandwidth allocation method and related device

    CN115599727A