A network performance tuning method, BMC and server

By adaptively configuring the optimal TCP RMEM Buffer parameters of the NC-SI network card, the problem of poor network application performance of the BMC system in the NC-SI network port mode is solved, achieving a higher transmission rate and user experience, and is suitable for improving Performance of high-bandwidth applications such as KVM.

CN116208495BActive Publication Date: 2024-09-20XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211675113.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-26
Publication Date
2024-09-20
Estimated Expiration
2042-12-26

AI Technical Summary

Technical Problem

In NC-SI network port mode, the TCP RMEM Buffer configuration of the BMC system is inappropriate, resulting in poor network application performance, and even lags or performance deterioration when KVM installs the operating system.

Method used

By adaptively configuring the optimal TCP RMEM Buffer parameters for the NC-SI network card, the network performance of BMC in NC-SI usage scenarios is optimized, and the transmission rate of TCP network applications is improved. Specific methods include obtaining the optimal TCP receive buffer configuration parameters of the network card, dynamically adjusting the TCP receive buffer parameters through OEM commands or mapping table queries, and ensuring that the parameters adapt to the needs of different network card models.

Benefits of technology

It significantly improves network application performance in NC-SI scenarios and improves user experience. Especially in scenarios with high bandwidth requirements such as KVM installation of operating systems, the transmission rate increases from a few hundred KB to about 3MB.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116208495B
    Figure CN116208495B
Patent Text Reader

Abstract

The present application provides a method for tuning network performance, which is applied to a baseboard management controller BMC. The method includes obtaining the optimal configuration parameters of the TCP receive buffer corresponding to the network card when the network mode is determined to be the NC‑SI network port mode, and then configuring the TCP receive buffer parameters for the network card based on the optimal configuration parameters of the TCP receive buffer. Through the method for tuning network performance provided by the present application, the network performance of the BMC in the NC‑SI usage scenario is optimized, and the transmission rate of the NC‑SI scenario and TCP-based network applications (such as KVM installation of OS, etc.) is improved, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of servers, and in particular to a network performance tuning method, a BMC and a server. Background Art

[0002] The current baseboard management controller (BMC) out-of-band management provides different modes for dedicated network ports and network controller sideband interface (NC-SI) network ports. However, due to different requirements for BMC system TCP RMEM Buffer in different scenarios, the performance of some TCP-based network applications is not optimal under NC-SI applications. The performance deterioration is particularly obvious on some NC-SI-supporting network cards, and may even cause the OS to get stuck during the installation of the operating system (OS) through KVM. Summary of the invention

[0003] The embodiments of the present application provide a network performance tuning method, BMC and server, which adaptively configure the optimal TCP RMEM Buffer parameters for the NC-SI network card, optimize the network performance of the BMC in the NC-SI usage scenario, and improve the transmission rate of TCP-based network applications (such as KVM installation of OS, etc.) in the NC-SI scenario, thereby improving the user experience.

[0004] In the first aspect, an embodiment of the present application provides a network performance tuning method applied to a baseboard management controller BMC, the method comprising determining that the network port mode is the NC-SI network port mode; obtaining the optimal configuration parameters of the TCP receive buffer corresponding to the network card; and configuring the TCP receive buffer parameters for the network card based on the optimal configuration parameters of the TCP receive buffer.

[0005] By adaptively configuring the optimal TCP RMEM Buffer parameters for the NC-SI network card, the TCP network application performance of the network card in the NC-SI network application scenario can be greatly improved, the network transmission rate can be increased, and the user experience can be improved.

[0006] In a possible implementation, obtaining the optimal configuration parameters of the TCP receiving buffer corresponding to the network card includes: sending an instruction to the network card, the instruction being used to obtain the optimal configuration parameters of the TCP receiving buffer corresponding to the network card; and receiving the optimal configuration parameters of the TCP receiving buffer corresponding to the network card returned by the network card. Optionally, the instruction is an OEM instruction.

[0007] That is to say, the BMC of the embodiment of the present application provides an NC-SI OEM command, which can be implemented for the network card of self-developed or cooperative manufacturers. Before initializing the TCP network protocol parameters, the BMC will first obtain the optimal TCP RMEM Bufferer parameters from the network card through the NC-SI OEM command, set the TCP RMEM Bufferer parameters of the BMC OS, and realize adaptive configuration of the optimal TCP RMEM buffer parameters for the NC-SI network card, which has extremely strong scalability.

[0008] In another possible implementation, obtaining the optimal configuration parameters of the TCP receive buffer corresponding to the network card includes: obtaining the four-tuple information of the network card; querying a mapping table based on the four-tuple information to obtain the optimal configuration parameters of the TCP receive buffer corresponding to the network card, wherein the mapping table records the mapping relationship between the four-tuple information of multiple network cards and the optimal configuration parameters of the TCP receive buffer.

[0009] In this possible implementation, the BMC locally stores a mapping table of the quadruple information of multiple network cards and the optimal TCP RMEM buffer parameters corresponding to each network card. The mapping table is queried by obtaining the quadruple information of the network card to obtain the optimal TCP RMEM buffer parameters corresponding to the network card. The optimal TCP RMEM buffer parameters corresponding to each network card in the mapping table can, for example, be obtained through a binary test to obtain the empirical tuning values ​​of the optimal TCP RMEM buffer parameters corresponding to each network card.

[0010] In another possible implementation, the mode of the network port may be obtained by real-time monitoring. When the mode of the network port is monitored to be the NC-SI network port mode, the network mode of the BMC is determined to be the NC-SI network port mode.

[0011] In another possible implementation, based on the optimal configuration parameters of the TCP receive buffer, configuring the TCP receive buffer parameters for the network card is implemented as follows: based on the optimal configuration parameters of the TCP receive buffer, configuring the TCP receive buffer parameters in the TCP protocol stack, so that the setting of the optimal parameters of the TCP receive buffer can take effect without restarting the BMC system.

[0012] In a second aspect, an embodiment of the present application provides a baseboard management controller BMC, including a processor, wherein the processor is configured to perform the following steps:

[0013] Make sure the network port mode is NC-SI;

[0014] Get the optimal configuration parameters of the TCP receive buffer corresponding to the network card;

[0015] Configure the TCP receive buffer parameters for the network card based on the optimal configuration parameters of the TCP receive buffer.

[0016] In a possible implementation, obtaining the optimal configuration parameters of the TCP receiving buffer corresponding to the network card includes: sending an instruction to the network card, the instruction being used to obtain the optimal configuration parameters of the TCP receiving buffer corresponding to the network card; and receiving the optimal configuration parameters of the TCP receiving buffer corresponding to the network card returned by the network card. Optionally, the instruction is an OEM instruction.

[0017] That is to say, the BMC of the embodiment of the present application provides an NC-SI OEM command, which can be implemented for the network card of self-developed or cooperative manufacturers. Before initializing the TCP network protocol parameters, the BMC will first obtain the optimal TCP RMEM Bufferer parameters from the network card through the NC-SI OEM command, set the TCP RMEM Bufferer parameters of the BMC OS, and realize adaptive configuration of the optimal TCP RMEM buffer parameters for the NC-SI network card, which has extremely strong scalability.

[0018] In another possible implementation, obtaining the optimal configuration parameters of the TCP receive buffer corresponding to the network card includes: obtaining the four-tuple information of the network card; querying a mapping table based on the four-tuple information to obtain the optimal configuration parameters of the TCP receive buffer corresponding to the network card, wherein the mapping table records the mapping relationship between the four-tuple information of multiple network cards and the optimal configuration parameters of the TCP receive buffer.

[0019] In this possible implementation, the BMC locally stores a mapping table of the quadruple information of multiple network cards and the optimal TCP RMEM buffer parameters corresponding to each network card. The mapping table is queried by obtaining the quadruple information of the network card to obtain the optimal TCP RMEM buffer parameters corresponding to the network card. The optimal TCP RMEM buffer parameters corresponding to each network card in the mapping table can, for example, be obtained through a binary test to obtain the empirical tuning values ​​of the optimal TCP RMEM buffer parameters corresponding to each network card.

[0020] In another possible implementation, the network mode of the network port may be obtained by real-time monitoring. When the network mode of the network port is monitored to be the NC-SI network port mode, the network mode of the BMC is determined to be the NC-SI network port mode.

[0021] In another possible implementation, based on the optimal configuration parameters of the TCP receive buffer, configuring the TCP receive buffer parameters for the network card is implemented as follows: based on the optimal configuration parameters of the TCP receive buffer, configuring the TCP receive buffer parameters in the TCP protocol stack, so that the setting of the optimal parameters of the TCP receive buffer can take effect without restarting the BMC system.

[0022] In a third aspect, an embodiment of the present application provides a server, including a BMC, where the BMC is used to execute the method of the first aspect to achieve optimization of network performance.

[0023] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0024] In a fifth aspect, an embodiment of the present application further provides a computer program or a computer program product, wherein the computer program or the computer program product comprises instructions, which, when executed, cause a computer to execute the method described in the first aspect.

[0025] In a sixth aspect, an embodiment of the present application further provides a chip, comprising at least one processor and a communication interface, wherein the processor is used to execute the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A schematic diagram showing a keyboard, video mouse (KVM) client communicating with a server via a BMC in the related art is shown;

[0027] Figure 2 The following is a schematic diagram of an application scenario of the NC-SI network mode of a BMC;

[0028] Figure 3 A schematic diagram of the structure of a server provided in an embodiment of the present application;

[0029] Figure 4 A flowchart of a method for optimizing network performance provided in an embodiment of the present application;

[0030] Figure 5 and 6 It is a schematic diagram of the implementation of an NC-SI OEM command;

[0031] Figure 7 A schematic diagram showing the structure of a BMC of a method for optimizing network performance applied to an embodiment of the present application is shown;

[0032] Figure 8 A schematic diagram of the process steps executed in the network pattern recognition unit;

[0033] Fig. 9 A schematic diagram of the process steps executed in the network card identification unit;

[0034] Fig.10 A schematic diagram of the process steps performed in the parameter selection and validation unit;

[0035] Fig.11 A flowchart of a method for optimizing network performance provided in an embodiment of the present application for a self-developed network card;

[0036] Fig.12 A flow chart of a method for tuning network performance for an externally purchased network card provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The technical solution of the present application is further described in detail below through the accompanying drawings and embodiments.

[0038] Figure 1 FIG. 1 shows a schematic diagram of a keyboard, video mouse (KVM) client communicating with a server via a BMC in the related art. Figure 1 As shown in the figure, the BMC system will take an empirical TCP RMEM Buffer parameter value, so that the performance of TCP-based network applications under NC-SI application is barely acceptable, but not optimal, and cannot be compatible with certain types of network cards.

[0039] In other words, in the related art, the value set by the BMC system for the TCP RMEM Bufferer of the network is a fixed empirical value, which is not applicable to all NC-SI network cards. As a result, in the NC-SI application scenario, the performance of TCP-based network applications is not optimal. What's more, for some types of network cards, the network performance will be deteriorated, affecting the user experience of installing the operating system (OS) or transferring files through the BMC KVM.

[0040] It is easy for those skilled in the art to understand that the Transmission Control Protocol (TCP) can also provide flow control. Each party in a TCP connection needs to set up a fixed-size buffer space. The receiving end of TCP only allows the other end to send data that can be accommodated by the receiving end buffer.

[0041] TCP RMEM Bufferer is used to cache data received from the peer, which will be read by the application later. In general, the window value of a TCP packet reflects the size of the free space in the receive buffer. For connections with large bandwidth and large amounts of data, increasing the size of TCP RMEM Bufferer can significantly improve TCP transmission performance. However, increasing TCP RMEM Bufferer will cause TCP to occupy more memory. Therefore, whether the configuration of TCP RMEM Bufferer parameter value is appropriate directly affects network performance.

[0042] To this end, the embodiments of the present application provide a network performance tuning method, BMC and server, which optimizes the network performance of BMC in NC-SI usage scenarios by adaptively configuring the optimal TCP RMEM Buffer parameters for the NC-SI network card, and improves the transmission rate of TCP-based network applications (such as KVM installation of OS, etc.) in NC-SI scenarios, thereby improving the user experience.

[0043] Figure 2 The following is a schematic diagram of an application scenario of the NC-SI network mode of BMC. A typical application scenario of the NC-SI network mode is that customers use the KVM function of the BMC through NC-SI to install the OS. The specific data link is as follows: Figure 3 As shown, the customer will mount the optical drive to the service side of the server (the server can be, for example, an X86 server) on the server side, and the OS optical drive data will pass through the switch (SW), the NC-SI side of the network interface card (NIC), all the way to the BMC, and the BMC will forward it to the service side of the server through the PCI E device to implement the OS installation.

[0044] The BMC that applies the network performance tuning method provided in the embodiment of the present application will identify whether the current network mode is the NC-SI mode. If the BMC is in the NC-SI network mode, it will obtain the optimal TCP RMEM Bufferer parameters of the network card, and then adaptively configure the optimal TCP RMEM Bufferer parameters for the network card to optimize the NC-SI rate performance.

[0045] There are two ways for BMC to determine the optimal TCP RMEM Bufferer parameters of NC-SI network cards. One is to pre-build a static mapping table, and different network card models correspond to different parameters. The other is to actively obtain the optimal NC-SI TCP RMEM Bufferer parameters from the network card through OEM commands.

[0046] The following describes in detail with reference to the accompanying drawings a method for optimizing network performance, a BMC, and a specific implementation of a server according to an embodiment of the present application.

[0047] Figure 3 A schematic diagram of the structure of a server provided in an embodiment of the present application. Figure 3 As shown, the server 300 includes components such as a memory 310, a processor 320, a BMC 330, and a network card 340. Those skilled in the art will appreciate that Figure 3 The structure of the server shown in the figure does not constitute a limitation on the server provided in the embodiment of the present application. The server provided in the embodiment of the present application may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0048] Combine the following Figure 3 The various components of the server 300 provided in the embodiment of the present application are described in detail:

[0049] The memory 310 may be used to store OS instructions, data instructions, and data generated when the storage processor 320 runs the instructions of the OS and executes various functional applications of the server 300. The data instructions are used to indicate the operation instructions of the method flow. Optionally, the memory 310 may include a high-speed random access memory and may also include a non-volatile memory, such as a disk storage device, a flash memory device, or other volatile solid-state storage device. Figure 3 As shown, the memory 310 may include at least one memory card, such as Figure 3 The memory card 311, memory card 312 and memory card 313 in the memory card 311. The memory card can be any storage medium that can be used as memory, such as a memory board or a memory stick. A memory card can refer to a memory stick or a memory board, or a collection of multiple memory sticks or a collection of multiple memory boards. It should be noted that Figure 3 This is just an example of the memory in the embodiment of the present application, and the embodiment of the present application does not limit the quantity and form of the memory.

[0050] The processor 320 is the control center of the server 300, and uses various interfaces and lines to connect various components, and executes various functions of the server 300 and processes data by running or executing instructions of the OS stored in the memory 310, and calling data stored in the memory 340, thereby realizing various services based on the server 300. Optionally, the processor 320 may include one or more processing units, which may be a central processing unit (CPU), a digital signal processor, a field-programmable gate array (FPGA) or other programmable logic devices, which are not limited here.

[0051] BMC 330 is used to monitor and control the hardware of server 300. For example, it can monitor the temperature, voltage and other information of server 300, and make corresponding adjustments to ensure that server 300 is in a normal operating state. When server 200 is in an abnormal state, server 300 can also be restarted by resetting. BMC 330 can also record various hardware information and logs to prompt users who use server 300 and locate faults. It should be noted that BMC 330 is an independent device. It does not rely on other hardware in server 300 (such as processor 320 or memory 310, etc.), nor does it rely on the server's OS. However, BMC 330 can interact with the OS, such as Figure 3 As shown, the BMC includes a BMC storage medium 331 and a BMC processor 332, and interacts with the OS through the BMC processor 332, which can play a better management role. The BMC storage medium 331 is used to store the instructions required by the BMC 330 when running and the data generated when running. The BMC storage medium 331 can be a flash memory (flash), a random access memory (random access memory, RAM), or a read-only memory (read-on ly memory, ROM), etc., which is not limited here.

[0052] The network card 340 is used to realize communication connection with other devices. The network card 340 has at least one network port, for example, Figure 3 In the embodiment, network card 1, network card 2 and network card 3 are included, and at least one network port is connected to the communication interface of other devices through a cable to realize data transmission between server 200 and other devices. Optionally, network card 340 can be integrated on board, or can be inserted through a high-speed serial computer expansion bus standard (peripheral component interconnect express, PCI E) slot or PCI slot in server 300, which is not limited here.

[0053] The server 300 may be a server of X86 architecture, specifically a blade server, a high-density server, a rack server or a high-performance server, which is not specifically limited in the present application.

[0054] The server 300 may be a server for providing cloud computing services, i.e., a server that provides corresponding resources to the client. For example, the resources provided by the server to the client may be storage resources, and the storage resources may be storage systems, such as file storage systems, block storage systems, or object storage systems, or a combination of the above storage systems. The resources provided by the server to the client may also be computing resources, such as virtual machines, etc. The embodiment of the present application does not limit the type of server and the resources provided by the server.

[0055] The OS involved in the embodiments of the present application is the most basic system software running on the server. For example, the OS can be a Windows operating system, a Linux operating system, or a VMware operating system, etc., which is not limited here.

[0056] Figure 4 A flowchart of a method for optimizing network performance provided in an embodiment of the present application. The method can be Figure 3 The BMC 330 shown in FIG. 1 is executed to optimize network performance. Figure 4 As shown, a network performance tuning method provided in an embodiment of the present application at least includes steps S401 to S403.

[0057] In step S401, it is determined that the network mode is the NC-SI network port mode.

[0058] The BMC can determine the BMC's network mode in a variety of ways, which can also be called the BMC's network port mode. For example, the BMC's network mode can be determined by receiving instructions input by the user, and the instructions input by the user indicate whether the BMC's current network mode is a dedicated network port or an NC-SI network port. Alternatively, the BMC can determine whether the BMC's network mode is the NC-SI mode by monitoring the network mode of the network port. When the network module of the network port is monitored to be in the NC-SI network port mode, the network mode is determined to be the NC-SI network card mode.

[0059] For example, the BMC monitors the configuration parameters of the network port mode. When the configuration parameter is the dedicated network port mode, the network port mode of the BMC is determined to be the dedicated network port mode. When the configuration parameter is the NC-SI network port mode, the network port mode of the BMC is determined to be the NC-SI mode.

[0060] In another example, the BMC determines the network port mode of the BMC by monitoring the event mode triggered by the user. For example, the user selects the setting option of the NC-SI network port mode as the dedicated network port mode or the NC-SI mode on the network port mode configuration page of the BMC of the client, and then the client transmits the user-triggered event to the BMC, and the BMC monitors the received user-triggered event mode as the dedicated network port mode or the NC-SI network port mode, and then determines that the network port mode of the BMC is the dedicated network port mode or the NC-SI network port mode.

[0061] If the network mode is determined to be NC-SI network port mode, perform the subsequent TCP RMEM Bufferer parameter tuning steps. Otherwise, continue to monitor the BMC network port mode.

[0062] In step S402, the optimal configuration parameters of the TCP receiving buffer corresponding to the network card are obtained.

[0063] The BMC can obtain the optimal configuration parameters of the TCP RMEM Bufferer corresponding to the network card by directly sending an acquisition instruction to the network card. For example, the BMC sends an instruction to the network card, and the instruction is used to obtain the optimal configuration parameters of the TCP RMEM Bufferer corresponding to the network card; the network card responds to the instruction and returns the optimal configuration parameters of the TCP RMEM Bufferer corresponding to itself to the BMC. In other words, the network card itself stores its own optimal configuration parameters of the TCP RMEM Bufferer. When the network card receives the acquisition instruction sent by the BMC, it responds to the instruction and returns the optimal configuration parameters of the TCP RMEM Bufferer stored by itself to the BMC.

[0064] Optionally, this instruction is an OEM instruction.

[0065] That is to say, the BMC of the embodiment of the present application provides an NC-SI OEM command, which can be implemented for the network card of self-developed or cooperative manufacturers. Before initializing the TCP network protocol parameters, the BMC will first obtain the optimal TCP RMEM Bufferer parameters from the network card through the NC-SI OEM command, set the TCP RMEM Bufferer of the BMC OS, and realize adaptive configuration of the optimal TCP RMEM Bufferer parameters for the NC-SI network card, which has extremely strong scalability.

[0066] Get the NC-SI OEM command definition corresponding to the optimal TCP RMEM Bufferer parameters of the network card. According to the DSP0222 Network Control Sideband Interface (NC-SI) Specification document, based on Figure 5 and Figure 6 Command extension: a new subcommand 0x68 is added to return the minimum buffer, default buffer and maximum buffer of the optimal TCP RMEMBufferer supported by the network card itself.

[0067] In another example, the BMC can also obtain the optimal TCP RMEM Bufferer parameters corresponding to the network card by querying the built-in mapping table of the BMC. Exemplarily, the BMC locally pre-stores a mapping table, which records the mapping relationship between multiple network cards and the optimal TCP RMEM Bufferer parameters corresponding to the multiple network cards. For example, the mapping table records the quadruple information of multiple network cards and the mapping relationship between the optimal TCP RMEM Bufferer parameters. The BMC first obtains the quadruple information of the network card. For example, the BMC obtains the quadruple information of the network card through the NC-SI standard command, and then queries the optimal TCP RMEM Bufferer parameters corresponding to the network card from the mapping table according to the obtained quadruple information, thereby obtaining the optimal TCP RMEM Bufferer parameters corresponding to the network card.

[0068] There are many methods for making the mapping table. For example, each network card can be tested to obtain the optimal TCP RMEM Bufferer parameters corresponding to each network card, and then the quadruple information of each network card and the corresponding optimal TCP RMEM Bufferer parameters are recorded in the mapping table to complete the making of the mapping table.

[0069] Optionally, the optimal TCP RMEM Bufferer parameter of each network card can be obtained by testing using a binary test method. For example, each network card is first tested using the maximum TCP RMEM Bufferer parameter value as a test value, and then the test value of the TCP RMEM Bufferer parameter is set to half of the previous test value to test it. When the network rate is improved, the test value is continued to be half of the previous test value. When the network rate is degraded, the test value is set to the average of the previous test value and the current test value to test it. This iteration is repeated until the optimal TCP RMEM Bufferer parameter of each network card is found.

[0070] Alternatively, the optimal TCP RMEM Bufferer parameters corresponding to each network card can be obtained by asking the network card manufacturer, and then the quadruple information of each network card and the corresponding optimal TCP RMEM Bufferer parameters are recorded in the mapping table to complete the preparation of the mapping table.

[0071] It is easy for those skilled in the art to understand that NC-SI, i.e., network controller sideband interface technology, is used to realize information transmission between the BMC chip and the Ethernet controller, which enables the BMC chip to use the network interface on the server motherboard like using an independent management network port. The BMC can use the network card on the server motherboard through the NC-SI network port mode to realize remote control of the server, such as KVM, etc. The BMC realizes TCP communication by setting TCP RMEM Bufferer parameters. The BMC configures the optimal TCP RMEM Bufferer parameters for the network card to achieve the optimal network performance.

[0072] In step S403, based on the optimal configuration parameters of the TCP receive buffer, the TCP receive buffer parameters are configured for the network card.

[0073] After the above steps, the BMC will obtain the optimal TCP RMEM Bufferer parameters in the current NC-SI scenario, and then set the parameters to the TCP protocol stack of the BMC OS, so that the TCP RMEM Bufferer parameter settings corresponding to the network card can take effect without resetting the BMC system.

[0074] The application scenarios of the network performance tuning method provided in the embodiment of the present application include all BMC-related TCP network applications in the NC-SI scenario, including but not limited to KVM installation OS, SCP and other scenarios.

[0075] Figure 7 The structure diagram of the BMC of the method for optimizing network performance applied to the embodiment of the present application is shown. Figure 7 As shown, a device for tuning network performance is deployed in the storage medium of the BMC, which can be called a network performance tuning device. The network performance tuning device includes a network mode recognition unit, a network card recognition unit, and a parameter selection and validation unit.

[0076] Among them, in the network pattern recognition unit, Figure 8 Process steps shown.

[0077] After BMC is started, it monitors the current network mode in real time. When it detects that the network is in NC-SI network mode, it calls the corresponding hook function for callback processing and executes TCP RMEM Bufferer parameter optimization action.

[0078] Executed in the network card identification unit Fig. 9 Process steps shown.

[0079] BMC obtains the NIC's quadruple information through the NC-SI standard command. The NIC's quadruple information includes the NIC's vendor identity document (VID), device identity document (DID), subvendor identity document (SVID) and subdevice identity document (SDID). Therefore, the specific model of the NIC can be determined based on the obtained quadruple information.

[0080] Executed in parameter selection and validation unit Fig.10 Process steps shown.

[0081] The BMC obtains the optimal TCP RMEM Bufferer parameters of the network card through a NC-SIOEM command defined by the BMC. The network card manufacturer can implement the OEM command to provide the optimal TCP RMEM Bufferer parameters of the network card itself.

[0082] Get the NC-SI OEM command definition corresponding to the optimal TCP RMEM Bufferer parameters of the network card. According to the DSP0222 Network Control Sideband Interface (NC-SI) Specification document, based on Figure 5 and Figure 6 Command extension: a new subcommand 0x68 is added to return the minimum buffer, default buffer and maximum buffer of the optimal TCP RMEMBufferer supported by the network card itself.

[0083] If the BMC cannot resolve the corresponding TCP RMEM Bufferer, the BMC will enable an alternative solution for dynamic adaptation. That is, the BMC will first build a mapping table. The table style is as follows:

[0084] Quadruple Corresponding TCP RMEM Bufferer parameters xx.xx.xx.xx xxxx.xxxx.xxxx

[0085] The table shows the optimal TCP RMEM Bufferer parameters for each network card. Optionally, you can obtain the empirically tuned TCP RMEM Bufferer parameters for each network card through a binary test.

[0086] BMC obtains the NIC's quadruple through the NC-SI standard command. Since the quadruple corresponds to the NIC model one-to-one, BMC matches the quadruple in the mapping table according to the NIC's quadruple to obtain the corresponding TCP RMEMBufferer parameters.

[0087] After the above steps, the BMC will obtain the optimal TCP RMEM Bufferer parameters in the current scenario, and then set the parameters to the TCP protocol stack of the BMC OS, so that the TCP RMEM Bufferer parameter settings corresponding to the network card can take effect without resetting the BMC system.

[0088] For the network card that has implemented the NC-SI OEM command defined in the BMC above (such as a self-developed network card), the BMC's adaptive adaptation process for this type of network card is as follows: Fig.11 As shown:

[0089] The BMC monitors the change of the BMC network mode. When the BMC network mode is switched to the NC-SI network mode, the BMC obtains the optimal TCP RMEM Bufferer parameters supported by the current network card through the defined OEM command.

[0090] The BMC sets the acquired TCP RMEM Bufferer parameters to the TCP protocol stack of the BMC mini-system. The TCP RMEM Bufferer parameter settings take effect without restarting the BMC.

[0091] For network cards that have not yet implemented the NC-SI OEM commands defined in the BMC above (such as purchased network cards), the BMC's adaptive adaptation process for this type of network card is as follows: Fig.12 As shown:

[0092] After the BMC monitors the change of the BMC network mode and switches to the NC-SI network mode, the BMC obtains the optimal TCP RMEM Bufferer parameters supported by the current network card through the defined OEM command. The network card does not support the NC-SI OEM command and cannot parse the corresponding data.

[0093] When the BMC cannot parse the corresponding TCP RMEM Bufferer parameters, the BMC will enable an alternative solution for dynamic adaptation. That is, the BMC will first build a mapping table, and the BMC will match the four-tuple in the mapping table according to the four-tuple of the network card to obtain the corresponding TCP RMEM Bufferer parameters.

[0094] The BMC sets the acquired TCP RMEM Bufferer parameters to the TCP protocol stack of the BMC mini-system. The TCP RMEM Bufferer parameter settings take effect without restarting the BMC.

[0095] In summary, in TCP-based network applications, the size of the TCP RMEM Bufferer value affects the efficiency and time of network transmission. Compared with the existing fixed TCP RMEM Bufferer value, the solution provided in the embodiment of the present application obtains the optimal TCP RMEM Bufferer value of the network card by providing an adaptive method, realizes dynamic performance tuning, and dynamically adapts the parameters to improve scalability and compatibility. By using the solution provided in the embodiment of the present application to perform performance tuning on some inte l network cards and me l network cards, the rate of installing the OS through KVM can be optimized from hundreds of KB to about 3MB, which can greatly improve the user experience.

[0096] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer instructions are executed by a processor, the above-mentioned method for tuning network performance is implemented.

[0097] An embodiment of the present application provides a chip, which includes at least one processor and an interface, wherein the at least one processor determines program instructions or data through the interface; the at least one processor is used to execute the program instructions to implement the network performance tuning method mentioned above.

[0098] An embodiment of the present application provides a computer program or a computer program product, which includes instructions. When the instructions are executed, the computer is caused to execute the above-mentioned method for tuning network performance.

[0099] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0100] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented by hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0101] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A network performance tuning method, applied to a baseboard management controller BMC, characterized in that: include: Make sure the network port mode is NC-SI; Obtaining optimal configuration parameters of a TCP receiving buffer corresponding to a network card, wherein the network card is used to enable communication between the BMC and an external device; Based on the optimal configuration parameters of the TCP receive buffer, configure TCP receive buffer parameters for the network card; The obtaining of the optimal configuration parameters of the TCP receiving buffer corresponding to the network card includes: Sending an instruction to the network card, wherein the instruction is used to obtain optimal configuration parameters of the TCP receive buffer corresponding to the network card; If a response from the network card is received, then obtaining the optimal configuration parameters of the TCP receiving buffer corresponding to the network card returned by the network card; After the step of sending an instruction to the network card, wherein the instruction is used to obtain the optimal configuration parameters of the TCP receiving buffer corresponding to the network card, the method includes: If no response is received from the network card, obtaining the four-tuple information of the network card; Based on the four-tuple information, a mapping table is queried to obtain the optimal configuration parameters of the TCP receiving buffer corresponding to the network card, wherein the mapping table records the mapping relationship between the four-tuple information of multiple network cards and the optimal configuration parameters of the TCP receiving buffer.

2. The method according to claim 1, characterized in that The instruction is an OEM instruction, and the OEM instruction carries a request for obtaining optimal configuration parameters of the TCP receiving buffer corresponding to the network card.

3. The method according to claim 1, characterized in that The mapping table is obtained based on test results of multiple network cards, wherein the test result of each network card includes the four-tuple information of each network card and the optimal configuration parameters of the TCP receiving buffer corresponding to each network card.

4. The method according to claim 3, characterized in that The test results of the multiple network cards are obtained based on a binary test on the multiple network cards to obtain the optimal configuration parameters of the TCP receiving buffer corresponding to each network card.

5. The method according to claim 1, characterized in that Determining that the network port mode is the NC-SI network port mode includes: Mode of monitoring network port; When it is monitored that the mode of the network port is the NC-SI network port mode, it is determined that the network port mode is the NC-SI network port mode.

6. The method according to any one of claims 1 to 5, characterized in that: The configuring of TCP receive buffer parameters for the network card based on the optimal configuration parameters of the TCP receive buffer includes: Based on the optimal configuration parameters of the TCP receive buffer, TCP receive buffer parameters in the TCP protocol stack are configured.

7. A baseboard management controller BMC, characterized in that: The method comprises a processor configured to execute the method according to any one of claims 1 to 6.

8. A server, characterized in that: The BMC is included, and the BMC is used to execute the method according to any one of claims 1 to 7 to achieve the optimization of network performance.