A server running regulation method and related components
By obtaining the theoretical maximum transmission rate of the network card and rationally allocating server resources, limiting the actual data transmission rate, and combining buffer management and hardware adjustments, the problem of unreasonable server network card configuration was solved, and efficient and reliable data transmission was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR (SHANDONG) COMPUTER TECH CO LTD
- Filing Date
- 2023-05-19
- Publication Date
- 2026-06-12
AI Technical Summary
In existing technologies, improper configuration of server network cards can lead to insufficient data transmission rates, affecting data transmission performance evaluation and potentially causing data loss.
By obtaining the theoretical maximum transmission rate of the network card, allocating the server's CPU and memory resources to meet the network card's requirements, and limiting the actual data transmission rate within the physical link, combined with buffer management and hardware performance adjustments, the reliability of data transmission is ensured.
It improves the network card's transmission rate and data transmission reliability, reduces the risk of failing bandwidth tests, and optimizes the overall performance of the server.
Smart Images

Figure CN116634040B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of servers, and in particular to a server operation control method and related components. Background Technology
[0002] As the fundamental carrier of information services, servers place high demands on network transmission speeds. Servers must guarantee sufficient bandwidth for data transmission, that is, the rate at which data is received or sent. If the server's data reception or transmission rate does not meet the requirements, data loss may occur, posing an irreparable risk. Servers typically use network interface cards (NICs) to receive and send data; therefore, proper NIC configuration to ensure high performance and thus meet the server's data transmission bandwidth requirements is crucial. Furthermore, to verify server data transmission rates, bandwidth testing is now conducted. Inappropriate NIC configuration may cause the server to fail the bandwidth testing, affecting the evaluation of the server's data transmission performance. Summary of the Invention
[0003] The purpose of this invention is to provide a method for regulating the operation of a server network interface card (NIC) and related components, which can ensure the transmission rate of the NIC and the reliability of data transmission.
[0004] To solve the above technical problems, the present invention provides a method for regulating the operation of a server network interface card (NIC), comprising:
[0005] The theoretical maximum transmission rate of the network card is obtained, and the central processing unit resources and memory resources in the server are allocated to the network card according to a preset allocation ratio to meet the network card's requirements for the theoretical maximum transmission rate.
[0006] Determine the data transmission rate of the physical link corresponding to the network card, and limit the actual data transmission rate of the network card to within the data transmission rate of the physical link, wherein the physical link includes the link used by the network card to send and receive data;
[0007] After allocating the central processing unit resources and the memory resources to the network card according to the preset allocation ratio and limiting the actual data transmission rate of the network card to within the data transmission rate of the physical link, the server is controlled to receive and send data through the network card.
[0008] On the one hand, the central processing unit resources and memory resources in the server are allocated to the network interface card according to a preset allocation ratio, including:
[0009] According to the preset allocation ratio and the priority of the physical link between the memory and the network card from near to far, the memory resources in the server are allocated to the network card;
[0010] According to the preset allocation ratio and the priority of the physical link between the central processing unit and the network card from near to far, the interrupt settings of the network card are bound to the central processing unit.
[0011] On the other hand, before controlling the server to receive data through the network card, the following is also included:
[0012] When the actual data transmission volume on the data receiving link is detected to be greater than the preset data transmission volume, the portion of data exceeding the preset data transmission volume on the data receiving link is stored in a buffer so that the data receiving link can send the remaining data to the network card.
[0013] On the other hand, after storing the portion of data exceeding the preset data transmission amount on the data receiving link in the buffer, the method further includes:
[0014] When the amount of data stored in the buffer reaches the preset data transmission volume, the data stored in the buffer is sent to the network card through the data receiving link.
[0015] On the other hand, the preset data transmission volume is the maximum data transmission volume of the network card under a preset stable state.
[0016] On the other hand, after controlling the server to receive and send data through the network card, the system further includes:
[0017] Obtain the data reception volume and data transmission volume of the network interface card (NIC);
[0018] When it is determined, based on the data received volume and the data sent volume, that the current data throughput of the network card exceeds the preset data throughput, the data processing performance of the hardware in the server is adjusted, wherein the hardware includes any one or more combinations of memory, central processing unit and hard disk in the server.
[0019] To address the aforementioned technical problems, this application also provides a server network card operation control system, comprising:
[0020] The first configuration unit is used to obtain the theoretical maximum transmission rate of the network card and allocate the central processing unit resources and memory resources in the server to the network card according to a preset allocation ratio to meet the network card's requirements for the theoretical maximum transmission rate.
[0021] The second configuration unit is used to determine the data transmission rate of the physical link corresponding to the network card, and to limit the actual data transmission rate of the network card to within the data transmission rate of the physical link, wherein the physical link includes the link used by the network card to send and receive data;
[0022] The data transmission unit is used to control the server to receive and send data through the network card after allocating the central processing unit resources and the memory resources to the network card according to the preset allocation ratio and limiting the actual data transmission rate of the network card to within the data transmission rate of the physical link.
[0023] On the one hand, the first configuration unit includes:
[0024] Theoretical maximum transmission rate acquisition unit, used to obtain the theoretical maximum transmission rate of the network card;
[0025] The resource allocation unit is used to allocate the central processing unit resources and memory resources in the server to the network card according to a preset allocation ratio, so as to meet the network card's requirements for the theoretical maximum transmission rate.
[0026] On the other hand, it also includes:
[0027] The data packet splitting unit is used to store the portion of data exceeding the preset data transmission amount on the data receiving link in a buffer before controlling the server to receive data through the network card, when it is detected that the actual data transmission amount on the data receiving link is greater than the preset data transmission amount, so that the data receiving link can send the remaining data to the network card.
[0028] On the other hand, it also includes:
[0029] A buffered data transmission unit is used to transmit the data stored in the buffer to the network card through the data receiving link after storing a portion of the data exceeding the preset data transmission amount in a buffer. When the amount of data stored in the buffer reaches the preset data transmission amount, the data stored in the buffer is then transmitted to the network card.
[0030] On the other hand, the preset data transmission volume is the maximum data transmission volume of the network card under a preset stable state.
[0031] On the other hand, it also includes:
[0032] The data volume acquisition unit is used to acquire the data reception volume and the data transmission volume of the network card after controlling the server to receive and send data through the network card;
[0033] A data aggregation processing unit is used to adjust the data processing performance of the hardware in the server when it is determined, based on the data received volume and the data sent volume, that the current data throughput of the network card exceeds a preset data throughput. The hardware includes any one or more combinations of memory, central processing unit and hard disk in the server.
[0034] To address the aforementioned technical problems, this application also provides a server network card operation control device, comprising:
[0035] Memory, used to store computer programs;
[0036] A processor is used to implement the steps of any of the above-described server network card operation control methods when executing the computer program.
[0037] To address the aforementioned technical problems, this application also provides a server, including the aforementioned server network card operation control device.
[0038] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described server network card operation control methods.
[0039] In summary, this invention discloses a server network interface card (NIC) operation control method and related components. First, the theoretical maximum transmission rate of the NIC is obtained, and then the CPU and memory resources of the server are allocated to the NIC according to a preset allocation ratio to ensure that the NIC's theoretical maximum transmission rate requirement is met, thereby improving the NIC's transmission rate. Furthermore, after determining the data transmission rate of the physical link corresponding to the NIC, the actual data transmission rate of the NIC is limited within the data transmission rate of the physical link, thus ensuring that data sent by the NIC is not lost and improving the reliability of data transmission. After completing the above configuration, the server is controlled to receive and send data through the NIC, ensuring both the NIC's transmission rate and the reliability of data transmission. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A flowchart of a server network card operation control method provided by the present invention;
[0042] Figure 2 This invention provides a schematic diagram of the structure of a server network card operation control system;
[0043] Figure 3 This is a schematic diagram of the structure of a server network card operation control device provided by the present invention;
[0044] Figure 4This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. Detailed Implementation
[0045] The core of this invention is to provide a method for regulating the operation of a server network interface card (NIC) and related components, which can ensure the transmission rate of the NIC and the reliability of data transmission.
[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] Please refer to Figure 1 , Figure 1 This invention provides a flowchart of a server network interface card (NIC) operation control method, which includes:
[0048] S1: Obtain the theoretical maximum transmission rate of the network card, and allocate the central processing unit resources and memory resources in the server to the network card according to the preset allocation ratio to meet the network card's requirements for the theoretical maximum transmission rate;
[0049] S2: Determine the data transmission rate of the physical link corresponding to the network card, and limit the actual data transmission rate of the network card to within the data transmission rate of the physical link. The physical link includes the link used by the network card to send and receive data.
[0050] S3: After allocating central processing unit resources and memory resources to the network card according to a preset allocation ratio and limiting the actual data transmission rate of the network card to within the data transmission rate of the physical link, the control server receives and sends data through the network card.
[0051] As the fundamental carrier of information services, servers place high demands on network transmission speeds. This means ensuring the data transmission rate through the network interface card (NIC) and preventing the loss of data received or sent by the server. Loss of either received or sent data can cause irreparable damage to customers.
[0052] Furthermore, related technologies involve performing bandwidth testing on servers. This includes connecting the server to a switch to test the bidirectional data transmission rate between them and to detect data loss during transmission. If the server's data transmission rate via its network interface card (NIC) does not meet the requirements, it will fail the bandwidth test and may even experience data loss. Therefore, properly configuring the NIC in the server to ensure sufficient bandwidth and reliable data transmission and reception is crucial.
[0053] It should be noted that the execution subject of the server operation control method provided in this application is the processor running BIOS (Basic Input Output System) firmware in the server. The BIOS provides the lowest level and most direct hardware control for the server.
[0054] For servers, resolving the issue of insufficient data transfer rates from network interface cards (NICs) requires optimizing NIC performance settings in the server firmware (BIOS) to match the NIC configuration with the server's overall configuration. NIC performance is typically fixed; to achieve this, server hardware resources, including CPU and memory resources, need adjustment. Ideally, CPU and memory resources should be allocated towards the NIC to maximize its theoretical maximum data transfer rate. Normally, CPU and memory resources are distributed evenly across server components. However, this application allocates CPU and memory resources to the NIC according to a preset ratio. The specific value of this preset ratio is not limited and can be adjusted based on actual usage scenarios, ensuring that the NIC's theoretical maximum data transfer rate is achieved. Furthermore, in practical applications, network cards plugged into servers are configured via PCIe (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard), thus allowing the network card to achieve its theoretical maximum transmission rate.
[0055] Furthermore, when allocating CPU and memory resources in the server to the network interface card (NIC) according to a preset ratio, it is sufficient to meet the maximum requirements of the NIC; excessive resources should not be allocated to the NIC, which could negatively impact the overall server operation. While ensuring the NIC is used at its optimal state, the server's own performance must also be guaranteed.
[0056] On the other hand, while ensuring the server's data transmission rate, it's also crucial to guarantee data transmission reliability. The network interface card (NIC) sends and receives data to external devices via physical links. When the NIC's actual data transmission rate exceeds the physical link's transmission rate, the physical link cannot transmit all the data sent by the NIC completely to the external device, resulting in data loss. Theoretically, a higher NIC data transmission rate translates to higher server bandwidth when transferring data and parameters from the server. However, this ignores the potential for data loss and significantly consumes server hardware resources, hindering optimal server performance. Therefore, the NIC's data transmission rate needs to be matched to the physical link's transmission rate. Limiting the NIC's actual data transmission rate prevents it from exceeding the capacity of the physical link used for sending and receiving data, thus avoiding wasting server hardware resources.
[0057] After allocating the server's CPU and memory resources to the network interface card (NIC) according to a preset ratio, and limiting the NIC's actual data transmission rate to within the physical link's data transmission rate, the NIC is configured. This ensures both the NIC's data transmission rate and the security and reliability of its data transmission. At this point, the server can be controlled to receive and send data normally through the NIC.
[0058] Because this application can guarantee the data transmission rate and reliability of the server's network card, when the server network card operation control method provided in this application is applied to a scenario of performing bandwidth testing on a server, it can reduce the possibility of the server bandwidth test failing. Furthermore, even when the server has a high load requirement, it can reduce the possibility of resource contention, low network resource utilization, severe data packet loss, and unstable network performance. When performing bandwidth testing on a server, once the server has been powered on, the steps of the server network card operation control method provided in this application can be executed.
[0059] This application primarily utilizes firmware BIOS to perform a series of configuration operations on the network card, thereby improving the server's data transmission performance and preventing issues such as the server failing bandwidth tests. Through the efficient prevention and protection mechanisms of firmware BIOS, it ensures that the server maintains the high efficiency and stability of the network card in big data usage environments, helping the server provide customers with a better user experience.
[0060] In summary, this invention discloses a method for regulating the operation of a server network interface card (NIC). First, the theoretical maximum transmission rate of the NIC is obtained, and then the CPU and memory resources of the server are allocated to the NIC according to a preset ratio to ensure that the NIC's theoretical maximum transmission rate requirement is met, thereby improving the NIC's transmission rate. Furthermore, after determining the data transmission rate of the physical link corresponding to the NIC, the actual data transmission rate of the NIC is limited to within the data transmission rate of the physical link, thus ensuring that data sent by the NIC is not lost and improving the reliability of data transmission. After completing the above configuration, the server is controlled to receive and send data through the NIC, ensuring both the NIC's transmission rate and the reliability of data transmission.
[0061] Based on the above embodiments:
[0062] In other embodiments, the central processing unit resources and memory resources in the server are allocated to the network interface card according to a preset allocation ratio, including:
[0063] The memory resources in the server are allocated to the network card according to the preset allocation ratio and the priority of the physical link between the memory and the network card from near to far.
[0064] The interrupt settings of the network card are bound to the central processing unit according to the preset allocation ratio and the priority of the physical link between the central processing unit and the network card from near to far.
[0065] In this embodiment, when allocating CPU and memory resources in the server to the network interface card (NIC), in addition to allocating CPU and memory resources to the NIC according to a preset allocation ratio, the physical link distances between the NIC and memory, as well as between the CPU and the NIC, are also considered. The closer the physical link between the NIC and memory, the less data transmission loss and latency there is; similarly, the closer the physical link between the NIC and the CPU, the less data transmission loss and latency there is. Therefore, memory and CPU resources closer to the NIC should be allocated to it as much as possible. Furthermore, the NIC itself has hardware interrupts; allocating CPU resources to the server's NIC mainly involves binding the NIC's interrupt settings to CPU resources. Therefore, in this embodiment, the NIC's interrupt settings need to be bound to CPU resources relatively close to the NIC.
[0066] When allocating CPU and network interface card (NIC) resources in the server, the actual usage requirements of the NIC are fully considered. Different forms of core binding operations are performed on the CPU to ensure that these operations are dependent on the server system. Based on the different system performance, the network performance strategy is adjusted accordingly to meet the server's configuration requirements.
[0067] In summary, this embodiment allocates central processing unit resources and memory resources to the network card according to a preset allocation ratio based on the principle of proximity, which can reduce data transmission loss and latency, and further improve the data transmission performance of the server.
[0068] In other embodiments, before the control server receives data via the network interface card, the following is also included:
[0069] When the actual data transmission volume on the data receiving link is detected to be greater than the preset data transmission volume, the portion of data exceeding the preset data transmission volume on the data receiving link is stored in a buffer so that the data receiving link can send the remaining data to the network card.
[0070] Considering that when the actual data transmission volume on the data receiving link used by the network card exceeds a certain value, data loss may occur on the data receiving link due to the limited receiving capacity of the network card, this embodiment will also detect the actual data transmission volume on the data receiving link. When it is determined that the actual data transmission volume on the data receiving link is greater than the preset data transmission volume, data packetization will be used to avoid data loss.
[0071] Specifically, when the actual data transmission volume on the data receiving link exceeds the preset data transmission volume (which can be adjusted according to actual needs, for example, setting the preset data transmission volume to the maximum data transmission volume under the preset stable state of the network card, thus ensuring the data transmission rate of the network card), the portion of data exceeding the preset data transmission volume on the data receiving link is stored in a buffer. In this way, the amount of data on the data receiving link will be reduced to the preset data transmission volume. When the network card normally receives data sent from the data receiving link, it can fully receive the data on the data receiving link without data loss, thus avoiding the loss of customer data and potential losses.
[0072] Furthermore, the amount of data stored in the buffer can be detected. When the amount of data accumulated in the buffer reaches the preset data transmission volume, the data in the buffer can be sent to the network card through the data receiving link, ensuring that the data that the data receiving link was originally going to send can be completely transmitted to the network card.
[0073] In summary, this embodiment utilizes the hardware buffer in the server to perform packet segmentation on the data received by the network card according to the actual usage scenario of the network card, ensuring that the network card can completely receive the data sent to the server by the external device through the data receiving link, thus ensuring the security and reliability of server data transmission.
[0074] In other embodiments, after the control server receives and sends data via the network interface card, the system further includes:
[0075] Get the data receiving volume and data sending volume of the network interface card (NIC);
[0076] When the current data throughput of the network card exceeds the preset data throughput based on the data reception and data transmission volume, the data processing performance of the hardware in the server is adjusted. The hardware includes any one or more combinations of the server's memory, central processing unit, and hard disk.
[0077] In addition to limiting the amount of data sent from the data receiving link to the network card, it is also necessary to consider whether the data received by the network card can be processed in a timely manner by the processor in the server. If the network card's data receiving capacity exceeds the server's own data processing capacity, it will still have an adverse impact on the server's performance.
[0078] Therefore, in this embodiment, after the control server receives and sends data through the network card, it automatically obtains the data reception and transmission volume of the network card, and determines the current data throughput of the network card based on the data reception and transmission volume. This application does not provide a detailed description of how the data reception, transmission, and throughput of the network card are obtained. The data throughput of the network card refers to the amount of data transmitted by the network card per unit time. When the current data throughput of the network card is high, the data processing capability of the server should be increased. Therefore, in this embodiment, when the current data throughput of the network card exceeds the preset data throughput, the data processing performance of the hardware in the server is actively adjusted. The hardware in this embodiment refers to hardware that affects the data processing performance of the server, such as the server's memory, central processing unit, and hard disk. In practical applications, adjustments can be made according to requirements, and this application does not impose any special limitations. By performing packet processing on the data received by the network card, the server hardware parameters are adjusted after the network card receives a large amount of data to improve hardware performance, thereby maximizing the processing efficiency of the data received by the network card and optimizing the entire data reception and processing process of the server.
[0079] In summary, in this embodiment, when the current data throughput of the network card exceeds the preset data throughput, the data processing performance of the server hardware is actively increased, enabling the server to process the data received by the network card in a timely manner, thereby further improving the server's data processing performance.
[0080] Please refer to Figure 2 , Figure 2 This is a schematic diagram of a server network card operation control system provided by the present invention. The server network card operation control system includes:
[0081] The first configuration unit 11 is used to obtain the theoretical maximum transmission rate of the network card and allocate the central processing unit resources and memory resources in the server to the network card according to a preset allocation ratio to meet the network card's requirements for the theoretical maximum transmission rate.
[0082] The second configuration unit 12 is used to determine the data transmission rate of the physical link corresponding to the network card and limit the actual data transmission rate of the network card to within the data transmission rate of the physical link. The physical link includes the link used by the network card to send and receive data.
[0083] The data transmission unit 13 is used to control the server to receive and send data through the network card after allocating the central processing unit resources and memory resources to the network card according to a preset allocation ratio and limiting the actual data transmission rate of the network card to within the data transmission rate of the physical link.
[0084] The server network interface card (NIC) operation control system provided by this invention includes a first configuration unit 11, a second configuration unit 12, and a data transmission unit 13. First, the first configuration unit 11 obtains the theoretical maximum transmission rate of the NIC and allocates the CPU and memory resources of the server to the NIC according to a preset allocation ratio to ensure that the NIC's theoretical maximum transmission rate requirement is met, thereby improving the NIC's transmission rate. Then, after determining the data transmission rate of the physical link corresponding to the NIC, the second configuration unit 12 limits the actual data transmission rate of the NIC to within the data transmission rate of the physical link, thereby ensuring that data sent by the NIC is not lost and improving the reliability of data transmission. Finally, after completing the above configuration, the data transmission unit 13 controls the server to receive and send data through the NIC, ensuring both the NIC's transmission rate and the reliability of data transmission.
[0085] Based on the above embodiments:
[0086] In other embodiments, the first configuration unit 11 includes:
[0087] Theoretical maximum transmission rate acquisition unit, used to obtain the theoretical maximum transmission rate of the network card;
[0088] The resource allocation unit is used to allocate the central processing unit resources and memory resources in the server to the network interface card (NIC) according to a preset allocation ratio, so as to meet the NIC's requirements for the theoretical maximum transmission rate.
[0089] In other embodiments, it also includes:
[0090] The data packet unit is used to store the portion of data exceeding the preset data transmission amount in a buffer before the control server receives data through the network card. This buffer is used when the actual data transmission amount on the data receiving link is detected to be greater than the preset data transmission amount, so that the data receiving link can send the remaining data to the network card.
[0091] In other embodiments, it also includes:
[0092] The buffered data transmission unit is used to transmit the data stored in the buffer to the network card through the data receiving link after storing the portion of data exceeding the preset data transmission amount on the data receiving link in the buffer. When the amount of data stored in the buffer reaches the preset data transmission amount, the data stored in the buffer is transmitted to the network card.
[0093] In other embodiments, the preset data transmission volume is the maximum data transmission volume of the network card under a preset stable state.
[0094] In other embodiments, it also includes:
[0095] The data volume acquisition unit is used to acquire the data received volume and data sent volume of the network card after the control server receives and sends data through the network card;
[0096] The data aggregation processing unit is used to adjust the data processing performance of the hardware in the server when it is determined that the current data throughput of the network card exceeds the preset data throughput based on the data received volume and the data sent volume. The hardware includes any one or more combinations of memory, central processing unit and hard disk in the server.
[0097] Please refer to Figure 3 , Figure 3 This is a schematic diagram of a server network card operation control device provided by the present invention. The server network card operation control device includes:
[0098] Memory 21 is used to store computer programs;
[0099] The processor 22 is used to implement the steps of any of the above-described server network card operation control methods when executing computer programs.
[0100] The processor 22 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 22 may be implemented using at least one of the following hardware forms: DSP (Digital Signal Processor), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 22 may also include a main processor and a coprocessor. The main processor, also known as the central processing unit, is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.
[0101] The memory 21 may include one or more computer-readable storage media, which may be non-transitory. The memory 21 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 21 is used to store at least the following computer program, which, after being loaded and executed by the processor 22, is capable of implementing the relevant steps of the server network card operation control method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 21 may also include operating systems and data, and the storage method may be temporary or permanent storage. The operating system may include Windows, Unix, Linux, etc. The data may include, but is not limited to, data related to the server network card operation control method.
[0102] The server network card (NIC) operation control device provided by this invention, when its processor 22 runs the server NIC operation control method stored in memory 21, performs the following functions: First, it obtains the theoretical maximum transmission rate of the NIC and allocates the central processing unit (CPU) resources and memory resources of the server to the NIC according to a preset allocation ratio to ensure that the NIC's requirement for the theoretical maximum transmission rate is met, thereby improving the NIC's transmission rate. Furthermore, after determining the data transmission rate of the physical link corresponding to the NIC, it limits the actual data transmission rate of the NIC to within the data transmission rate of the physical link, thereby ensuring that the data sent by the NIC is not lost and improving the reliability of data transmission. After completing the above configuration, the server is controlled to receive and send data through the NIC, ensuring both the NIC's transmission rate and the reliability of data transmission.
[0103] For a detailed description of the server network card operation control device provided by the present invention, please refer to the embodiments of the server network card operation control method described above. The present invention will not be described again here.
[0104] This application also provides a server, including the aforementioned server network card operation control device.
[0105] For a detailed description of the server provided by this invention, please refer to the embodiments of the server network card operation control method described above; this application will not repeat the details here.
[0106] This application does not specifically limit the type of server; for example, it can be an AMD (Advanced Micro Devices) server, etc.
[0107] Please refer to Figure 4 , Figure 4The present invention provides a schematic diagram of the structure of a computer-readable storage medium. This application also provides a computer-readable storage medium 31, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of any of the above-described server network card operation control methods.
[0108] It is understood that if the server network card operation control method in the above embodiments is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application. Specifically, the computer-readable storage medium 31 can include, but is not limited to, any type of disk, including floppy disks, optical disks, and portable hard drives, or any type of media or device suitable for storing instructions and data, etc., and this application does not make any special limitations here.
[0109] When the computer program in the computer-readable storage medium 31 provided by this invention is executed, it performs the following steps: First, it obtains the theoretical maximum transmission rate of the network card and allocates the central processing unit resources and memory resources in the server to the network card according to a preset allocation ratio to ensure that the network card's requirement for the theoretical maximum transmission rate can be met, thereby improving the network card's transmission rate. Furthermore, after determining the data transmission rate of the physical link corresponding to the network card, it limits the actual data transmission rate of the network card to within the data transmission rate of the physical link, thereby ensuring that the data sent by the network card is not lost and improving the reliability of data transmission. After completing the above configuration, it controls the server to receive and send data through the network card, ensuring both the network card's transmission rate and the reliability of data transmission. For a description of the computer-readable storage medium 31 provided by this invention, please refer to the above-described embodiment of the server network card operation control method; further details are omitted here.
[0110] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0111] It should also be noted that, in this specification, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for controlling the operation of a server network interface card (NIC), characterized in that, include: The theoretical maximum transmission rate of the network interface card (NIC) is obtained, and the CPU and memory resources of the server are allocated to the NIC according to a preset allocation ratio to meet the NIC's requirement for the theoretical maximum transmission rate. The theoretical maximum transmission rate is obtained through a PCIe link. Allocating the CPU and memory resources of the server to the NIC according to the preset allocation ratio includes: allocating memory resources of the server to the NIC according to the preset allocation ratio and the priority of the physical link between the memory and the NIC from closest to furthest; and binding the interrupt settings of the NIC to the CPU according to the preset allocation ratio and the priority of the physical link between the CPU and the NIC from closest to furthest. Determine the data transmission rate of the physical link corresponding to the network card, and limit the actual data transmission rate of the network card to within the data transmission rate of the physical link, wherein the physical link includes the link used by the network card to send and receive data; After allocating the central processing unit resources and the memory resources to the network card according to the preset allocation ratio and limiting the actual data transmission rate of the network card to within the data transmission rate of the physical link, the server is controlled to receive and send data through the network card.
2. The server network card operation control method as described in claim 1, characterized in that, Before controlling the server to receive data through the network card, the following steps are also included: When the actual data transmission volume on the data receiving link is detected to be greater than the preset data transmission volume, the portion of data exceeding the preset data transmission volume on the data receiving link is stored in a buffer so that the data receiving link can send the remaining data to the network card.
3. The server network card operation control method as described in claim 2, characterized in that, After storing the portion of data exceeding the preset data transmission amount on the data receiving link in a buffer, the method further includes: When the amount of data stored in the buffer reaches the preset data transmission volume, the data stored in the buffer is sent to the network card through the data receiving link.
4. The server network card operation control method as described in claim 2, characterized in that, The preset data transmission volume is the maximum data transmission volume of the network card under a preset stable state.
5. The server network card operation control method according to any one of claims 1 to 4, characterized in that, After controlling the server to receive and send data through the network card, the system further includes: Obtain the data reception volume and data transmission volume of the network interface card (NIC); When it is determined, based on the data received volume and the data sent volume, that the current data throughput of the network card exceeds the preset data throughput, the data processing performance of the hardware in the server is adjusted, wherein the hardware includes any one or more combinations of memory, central processing unit and hard disk in the server.
6. A server network card operation control system, characterized in that, include: The first configuration unit is used to obtain the theoretical maximum transmission rate of the network card and allocate the CPU resources and memory resources in the server to the network card according to a preset allocation ratio to meet the network card's requirement for the theoretical maximum transmission rate; wherein, the theoretical maximum transmission rate is obtained through a PCIe link; the step of allocating the CPU resources and memory resources in the server to the network card according to the preset allocation ratio includes: allocating the memory resources in the server to the network card according to the preset allocation ratio and according to the priority of the physical link between the memory and the network card from near to far; binding the interrupt settings of the network card to the CPU according to the preset allocation ratio and according to the priority of the physical link between the CPU and the network card from near to far. The second configuration unit is used to determine the data transmission rate of the physical link corresponding to the network card, and to limit the actual data transmission rate of the network card to within the data transmission rate of the physical link, wherein the physical link includes the link used by the network card to send data and receive data; The data transmission unit is used to control the server to receive and send data through the network card after allocating the central processing unit resources and the memory resources to the network card according to the preset allocation ratio and limiting the actual data transmission rate of the network card to within the data transmission rate of the physical link.
7. A server network card operation control device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the server network card operation control method as described in any one of claims 1 to 5 when executing the computer program.
8. A server, characterized in that, Includes the server network card operation control device as described in claim 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the server network card operation control method as described in any one of claims 1 to 5.