Network card performance optimization method, device and storage medium
By comparing and modifying the variable values in the network card driver to make it consistent with the high-performance benchmarking system driver, the problem of limitations in the existing technology of network card performance optimization is solved and more accurate network card performance improvement is achieved.
Patent Information
- Application Number
- CN202411697802.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-26
AI Technical Summary
The existing technology has limitations when improving network card performance. It is impossible to improve network card performance for all applications, and the improved network card performance is relatively limited. The third method is only applicable to multi-queue situations. It cannot be applied to PC network cards, and the application is relatively limited.
When determining that the driver has an impact on the performance of the network card, compare all data segments and code segments of the new driver kernel file of the benchmark system and the original driver kernel file of the benchmark system; find different variables; record the corresponding variable values of different variables; find the variable names corresponding to the variable values of the variable values of the driver on the own driver; modify the variable values of the corresponding variable names in the system driver according to the variable names, so that their drivers are consistent with the high-performance benchmark system driver.
By comparing and modifying the variable values in the driver, accurately find configuration items that affect the performance of the network card, reducing the workload of Linux system engineers, kernel engineers and performance optimization engineers, and improving the optimization effect of the network card performance.
Smart Images

Figure CN119201215B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network card technology, and in particular to a network card performance optimization method, device and storage medium. Background Art
[0002] With the rise of Linux systems, there are more and more distributions, such as open source systems Ubuntu 14, 16, 18, 20, CentOS 6.X, 7.X, 8.X, Debian 9, 10, 11, etc., as well as domestic commercial systems such as Kylin and UOS. The performance of each Linux system is also different. Equipment buyers want to find an operating system with better performance in certain application scenarios. This requires adjusting Linux performance, among which network card performance is an important indicator.
[0003] At present, the optimization of network card performance is mainly achieved through the following methods: binding interrupts, bottom halves and network card applications on the same kernel to reduce the delay of scheduling and output transmission; using multiple CPUs and NUMA features to bind interrupts, bottom halves and network card applications to different CPUs under the same NUMA node, so that the network card can use more CPUs to the maximum extent when receiving data, thereby improving the network card throughput; using network card multi-queues to improve the network card throughput. However, the above methods all have certain problems: the first two methods cannot improve the network card performance for all applications through the Linux features of NUMA and affinity, and secondly, the improved network card performance is relatively limited. The third method is only applicable to the case of multiple queues, and is not applicable to the network card on the PC side, and its application is relatively limited. Summary of the invention
[0004] The embodiments of the present invention provide a network card performance optimization method, device and storage medium to solve the technical problem that the network card performance optimization technology in the prior art has limitations.
[0005] In a first aspect, an embodiment of the present invention provides a method for optimizing network card performance, including:
[0006] When determining the impact of the driver on the performance of the network card, compare all data segments and code segments of the new driver kernel file of the benchmark system and the original driver kernel file of the benchmark system;
[0007] When determining that the data segments are different, look for different variables;
[0008] Record the variable values corresponding to different variables;
[0009] Find the variable name corresponding to the variable value driven by the user;
[0010] According to the variable name, the variable value of the corresponding variable name in the system driver of the own party is modified.
[0011] In a second aspect, an embodiment of the present invention further provides a network card performance optimization device, including:
[0012] The first comparison module is used to compare all data segments and code segments of the new driver kernel file of the benchmark system and the original driver kernel file of the benchmark system when determining the impact of the driver on the performance of the network card;
[0013] A variable search module is used to search for different variables when it is determined that the data segments are different;
[0014] Recording module, used to record the variable values corresponding to different variables;
[0015] A variable name search module is used to search for the variable name corresponding to the variable value driven by the user;
[0016] The modification module is used to modify the variable value of the corresponding variable name in the own system driver according to the variable name.
[0017] In a third aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the network card performance optimization method provided in the above embodiment.
[0018] The network card performance optimization method, device and storage medium provided by the embodiment of the present invention, when determining that the driver affects the network card performance, compares all data segments and code segments of the new driver kernel file of the benchmarking system and the original driver kernel file of the benchmarking system; when determining that the data segments are different, find different variables; record the variable values corresponding to different variables; find the variable name corresponding to the variable value of the own driver; modify the variable value of the corresponding variable name in the driver of the own system according to the variable name. Use the network performance measurement tool to measure the same parameters in the own system and the benchmarking system. When it is determined that the performance is affected by the driver, compare the driver kernel files between the two systems to determine different variables, and modify the variables of the own system according to the variables of the benchmarking system, so that its driver is consistent with the high-performance benchmarking system driver. It is convenient to accurately find the configuration items that affect performance and reduce the workload of Linux system engineers, kernel engineers and performance optimization engineers. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0020] Figure 1 It is a flowchart of a method for optimizing network card performance provided by Embodiment 1 of the present invention;
[0021] Figure 2It is a flowchart of a method for optimizing network card performance provided by Embodiment 2 of the present invention;
[0022] Figure 3 It is a flowchart of a method for optimizing network card performance provided by Embodiment 3 of the present invention;
[0023] Figure 4 It is a structural diagram of a network card performance optimization device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0024] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0025] Embodiment 1
[0026] Figure 1 : is a flow chart of a network card performance optimization method provided by Embodiment 1 of the present invention. This embodiment is applicable to the case of optimizing the network card performance of a Linux system. The method can be executed by a network card performance optimization device, and specifically includes the following steps:
[0027] Step 110, when determining the impact of the driver on the performance of the network card, compare all data segments and code segments of the new driver kernel file of the benchmark system and the original driver kernel file of the benchmark system.
[0028] The performance of the network card is relative, and it is meaningful only when the two systems are compared horizontally. Therefore, in this embodiment, the network performance measurement tool is used in the own system and the benchmarking system to measure the same parameters, thereby narrowing the performance impact search range. Exemplarily, by comparison and analysis, it can be determined that the performance of the network card is affected by the driver. Therefore, it is necessary to find the performance influencing factors in the driver and optimize it. Exemplarily, a gcc tool that views the composition of the target file or executable target file, such as bjdump, is used to compare the new driver kernel file of the benchmarking system and the original driver kernel file of the benchmarking system. Among them, the new driver kernel file is a driver formed by copying the driver of the own system to the benchmarking system. For example: all data segments and code segments of r8168_new.ko and r8168.ko are compared by the objdump tool. The r8168_new.ko is the new driver kernel file of the benchmarking system, and r8168.ko is the original driver kernel file of the benchmarking system. And the data segments and code segments are compared respectively.
[0029] Step 120, when it is determined that the data segments are different, searching for different variables.
[0030] Exemplarily, it may include: using an ELF display tool to find the specific location of each variable in the data segment; determining the variable name and the corresponding variable value according to the specific location, and determining different variables. Optionally, sysctl may be used to find the specific location of each variable in the data segment. Sysctl contains some advanced options for the TCP / IP stack and virtual memory system. Sysctl can be used to read and set more than five hundred system variables. Using the above method, different variables can be quickly found. In this embodiment, all data segments and code segments of r8168_new.ko and r8168.ko can be compared through the objdump tool, and it is found that the code segments are the same, and only three variables in the data segment are different, and the values of the three variables are recorded, which are 0, 0, 0 respectively.
[0031] Step 130, recording variable values corresponding to different variables.
[0032] In this embodiment, the different variable values found above are recorded. Still taking the above three variables as an example, the corresponding three variables found and recorded are eee, aspm, and timer.
[0033] Step 140, searching for the variable name corresponding to the variable value driven by the own party.
[0034] For example, in the own driver, search for the source code corresponding to the driver of the own system R8168, and find three variables: eee = 1; aspm = 1; timer = 2600.
[0035] Step 150, modify the variable value of the corresponding variable name in the own system driver according to the variable name.
[0036] Exemplarily, it may include: searching the data segment of the driver of the network card of the system to obtain the original variable value corresponding to the variable name; modifying the original variable value to the corresponding variable value in the original driver. For example, the three variables eee = 1; aspm = 1; timer = 2600 found above may be modified to eee = 0; aspm = 0; timer = 0.
[0037] Compile the modified R8168 driver to get r8168_profile.ko, replace the R8168 driver (r8168.ko) that comes with the system, and then use the network performance measurement tool to measure again, and get the average system delay of 36us and the throughput of 2400MB / S. Through the above measurement results, it can be determined that the above optimization measures have achieved the corresponding optimization effect.
[0038] This embodiment compares all data segments and code segments of the new driver kernel file of the benchmarking system and the original driver kernel file of the benchmarking system when determining that the driver affects the performance of the network card; when determining that the data segments are different, searching for different variables; recording the variable values corresponding to the different variables; searching for the variable names corresponding to the variable values of the own driver; and modifying the variable values of the corresponding variable names in the driver of the own system according to the variable names. Use the network performance measurement tool to measure the same parameters in the own system and the benchmarking system. When it is determined that the performance is affected by the driver, compare the driver kernel files between the two systems to determine the different variables, and modify the variables of the own system accordingly according to the variables of the benchmarking system, so that its driver is consistent with the high-performance benchmarking system driver. It is convenient to accurately find the configuration items that affect performance, and reduce the workload of Linux system engineers, kernel engineers and performance optimization engineers.
[0039] Embodiment 2
[0040] Figure 2 It is a flow chart of the network card performance optimization method provided in the second embodiment of the present invention. This embodiment is optimized based on the above embodiment, and the method can also add the following steps: when determining that the kernel or driver in the own system affects the network card performance, use the kernel operation parameter viewing tool to obtain the whole set of own kernel parameters; set the whole set of own kernel parameters to the benchmark system; use the network performance measurement tool to measure the network card performance of the benchmark system after setting, and determine the impact of the driver on the network card performance according to the measurement results.
[0041] See also Figure 2 , the network card performance optimization method comprises:
[0042] Step 210: When it is determined that the kernel or driver in the own system has an impact on the performance of the network card, a kernel running parameter viewing tool is used to obtain a set of all own kernel parameters.
[0043] Exemplarily, the network performance measurement tool can be used to measure the network card performance of the own system and the benchmark system, and some technical means can be used to eliminate other influences to determine whether the kernel or driver in the own system affects the network card performance.
[0044] When determining whether the kernel or driver affects the performance of the network card, it is necessary to determine which specific factors of the kernel or driver affect the performance of the network card. Optionally, you can use a tool to view kernel operating parameters, such as the sysctl tool, to query the kernel parameters of your system using query instructions. And create the corresponding kernel parameter set set1 based on all the kernel parameters found.
[0045] Step 220: setting the entire own kernel parameter set into the benchmarking system.
[0046] All parameters in the kernel parameter set 1 of the own system are set in the benchmark system, so that the kernel parameters of the comparison system and the own system are consistent.
[0047] Step 230, using a network performance measurement tool to measure the network card performance of the benchmark system after setting, and determining the impact of the driver on the network card performance based on the measurement result.
[0048] Use the network performance measurement tool to measure the NIC performance of the benchmark system after the kernel parameters are replaced. If the NIC performance of the benchmark system decreases, for example, it is close to the same as the NIC performance of the own system, it means that the kernel has an impact on the NIC performance. Otherwise, the impact of the kernel on the NIC performance is excluded. For example: if the average system delay of the benchmark system with replaced kernel parameters is 36us and the throughput is 2400MB / S, which is consistent with the performance before replacement, it can be said that the driver has an impact on the NIC performance.
[0049] Step 240, when determining the impact of the driver on the performance of the network card, compare all data segments and code segments of the new driver kernel file of the benchmark system and the original driver kernel file of the benchmark system.
[0050] Step 250, when it is determined that the data segments are different, searching for different variables.
[0051] Step 260, recording variable values corresponding to different variables.
[0052] Step 270, searching for the variable name corresponding to the variable value driven by the user.
[0053] Step 280, modify the variable value of the corresponding variable name in the own system driver according to the variable name.
[0054] This embodiment adds the following steps: when determining that the kernel or driver in one's own system affects the performance of the network card, use the kernel operation parameter viewing tool to obtain the set of all one's own kernel parameters; set the set of all one's own kernel parameters to the benchmarking system; use the network performance measurement tool to measure the performance of the network card in the benchmarking system after setting, and determine the impact of the driver on the performance of the network card based on the measurement results. By combining the ideas of replacement and exclusion, the factors affecting the performance of the network card can be effectively checked, and then targeted optimization can be performed. It is easy to accurately find the configuration items that affect the performance, reducing the workload of Linux system engineers, kernel engineers, and performance optimization engineers.
[0055] In a preferred implementation of this embodiment, after judging whether the kernel or driver in the own system has an impact on the performance of the network card according to the measurement results, before determining that the driver has an impact on the performance of the network card, the method can also add the following steps: downloading the open source driver corresponding to the network card, compiling to obtain the open source driver kernel file, and installing the open source driver kernel file in the benchmarking system to replace the original driver kernel file of the benchmarking system; using the network performance measurement tool to measure the performance of the replaced benchmarking system network card, and determining the impact of the network card driver on the network card performance according to the measurement results. Through the above steps, the accuracy of judging the network card driver on the network card performance is further improved.
[0056] Embodiment 3
[0057] Figure 3 This is a flow chart of the network card performance optimization method provided by the third embodiment of the present invention. This embodiment is optimized based on the above embodiment, and the method can also add the following steps: select a network card performance evaluation benchmark system that is the same as the system where the network card is located; measure the measured performance on the own system and the benchmark system respectively, and judge whether the network card performance of the own system is lower than the network card performance of the benchmark system. When the network card performance of the own system is lower than the network card performance of the benchmark system, completely copy the kernel and driver of the own system to the benchmark system; use the network performance measurement tool to measure the own system and the benchmark system respectively; judge whether the kernel or driver in the own system has an impact on the network card performance based on the measurement results.
[0058] See also Figure 3 , the network card performance optimization method comprises:
[0059] Step 310, select a network card performance evaluation benchmark system of the system where the network card is located, measure the measured performance on the own system and the benchmark system respectively, and determine whether the network card performance of the own system is lower than the network card performance of the benchmark system.
[0060] Performance is relative, and it only makes sense when two systems are compared horizontally. Therefore, in this embodiment, a benchmark system is selected, and a horizontal comparison is made between the comparison system and the own system. For example, a Linux system with the same network card can be used as a benchmark system. For example, the system uses a domestic Zhaoxin KX6000 and Realtek8168 Gigabit network card desktop computer as hardware, and the device is installed with its own system (Galaxy Kylin Desktop Operating System V10 SP3) and the benchmark system (Ubuntu 24.04 dual system).
[0061] Use network performance measurement tools, such as netperf, to measure the network card performance of your own system and the benchmark system respectively. Optionally, it can include: downloading netperf, compiling a binary executable program netperf on your own system, and using the compiled netperf to measure on your own system and the benchmark system respectively. The compiled netperf can eliminate the influence of small differences in the measurement tool on the measurement results. And judge whether the network card performance of your own system is lower than that of the benchmark system based on the measurement results. Optionally, the measurement results are that the average delay of your own system is 60us, the throughput is 980MB / S, and the average delay of the benchmark system is 36us, and the throughput is 2400MB / S. Then the performance of your own system is lower than that of the benchmark system.
[0062] Step 320 , when the network card performance of the own system is lower than that of the benchmark system, the kernel and driver of the own system are completely copied to the benchmark system.
[0063] Completely copy the kernel and driver of your own system to the benchmark system to eliminate the impact of hardware on network card performance.
[0064] Step 330, using a network performance measurement tool to measure the own system and the benchmark system respectively, and judging whether the kernel or driver in the own system has an impact on the network card performance according to the measurement results.
[0065] Using netperf to test, we found that the average latency of the benchmark system was 60us and the throughput was 980MB / S, indicating that the Linux kernel and driver had an impact on the performance.
[0066] Step 340, when it is determined that the kernel or driver in the own system affects the performance of the network card, a tool for viewing kernel operating parameters is used to obtain a set of all own kernel parameters, and the set of all own kernel parameters is set in the benchmark system.
[0067] Step 350, using a network performance measurement tool to measure the network card performance of the benchmark system after setting, and determining the impact of the driver on the network card performance based on the measurement result.
[0068] Step 360, when determining the impact of the driver on the performance of the network card, compare all data segments and code segments of the new driver kernel file of the benchmark system and the original driver kernel file of the benchmark system.
[0069] Step 370, when it is determined that the data segments are different, different variables are searched and the variable values corresponding to the different variables are recorded.
[0070] Step 380, searching for the variable name corresponding to the variable value of the own driver; and modifying the variable value of the corresponding variable name in the own system driver according to the variable name.
[0071] This embodiment adds the following steps: selecting a benchmark system for evaluating the performance of the network card of the system where the network card is located; measuring the performance on the own system and the benchmark system respectively, and judging whether the network card performance of the own system is lower than that of the benchmark system. When the network card performance of the own system is lower than that of the benchmark system, the kernel and driver of the own system are completely copied to the benchmark system; the network performance measurement tool is used to measure the own system and the benchmark system respectively; and according to the measurement results, it is judged whether the kernel or driver in the own system has an impact on the performance of the network card. By selecting a suitable benchmark system, through horizontal comparison, it is determined whether there is room for optimization of the network card performance, and through the replacement method, the core factors affecting the performance of the network card are gradually determined. It is convenient to accurately find the configuration items that affect the performance, and reduce the workload of Linux system engineers, kernel engineers and performance optimization engineers.
[0072] Embodiment 4
[0073] Figure 4 is a schematic diagram of the structure of the network card performance optimization device provided by the fourth embodiment of the present invention, see Figure 3 , the network card performance optimization device comprises:
[0074] The first comparison module 410 is used to compare all data segments and code segments of the new driver kernel file of the benchmark system and the original driver kernel file of the benchmark system when determining that the driver has an impact on the performance of the network card;
[0075] A variable search module 420, for searching for different variables when it is determined that the data segments are different;
[0076] A recording module 430, used to record variable values corresponding to different variables;
[0077] The variable name search module 440 is used to search for the variable name corresponding to the variable value driven by the own party;
[0078] The modification module 450 is used to modify the variable value of the corresponding variable name in the own system driver according to the variable name.
[0079] The network card performance optimization device provided in this embodiment compares all data segments and code segments of the new driver kernel file of the benchmarking system and the original driver kernel file of the benchmarking system when determining that the driver affects the performance of the network card; when determining that the data segments are different, find different variables; record the variable values corresponding to different variables; find the variable name corresponding to the variable value of the own driver; and modify the variable value of the corresponding variable name in the driver of the own system according to the variable name. Use the network performance measurement tool to measure the same parameters in the own system and the benchmarking system. When it is determined that the performance is affected by the driver, compare the driver kernel files between the two systems to determine the different variables, and modify the variables of the own system according to the variables of the benchmarking system, so that its driver is consistent with the high-performance benchmarking system driver. It is convenient to accurately find the configuration items that affect performance and reduce the workload of Linux system engineers, kernel engineers and performance optimization engineers.
[0080] Based on the above embodiments, the modification module includes:
[0081] A search unit, used to search the data segment of the driver of the network card of the own system, and obtain the original variable value corresponding to the variable name;
[0082] The modification unit is used to modify the original variable value to the corresponding variable value in the original driver.
[0083] Based on the above embodiments, the variable name search module includes:
[0084] A search unit is used to use the ELF display tool to find the specific location of each variable in the data segment;
[0085] The variable determination unit is used to determine the variable name and the corresponding variable value according to the specific position, and determine different variables.
[0086] Based on the above embodiments, the device further includes:
[0087] The collection acquisition module is used to use the kernel running parameter viewing tool to obtain all the kernel parameter sets of the own party when determining that the kernel or driver in the own party system affects the performance of the network card;
[0088] A setting module, used for setting all the own kernel parameter sets into the benchmarking system;
[0089] The driver impact determination module is used to use the network performance measurement tool to measure the network card performance of the benchmark system after setting, and determine the impact of the driver on the network card performance based on the measurement results.
[0090] Based on the above embodiments, the device further includes:
[0091] The complete copy module is used to completely copy the kernel and driver of the own system to the benchmark system when the network card performance of the own system is lower than that of the benchmark system;
[0092] Separate measurement module: users use network performance measurement tools to measure their own system and benchmark system separately;
[0093] The performance impact judgment module is used to judge whether the kernel or driver in the own system has an impact on the network card performance based on the measurement results.
[0094] Based on the above embodiments, the device further includes:
[0095] A selection module is used to select a network card performance evaluation benchmark system that is the same as the system where the network card is located;
[0096] The network card performance comparison module is used to measure the performance on the own system and the benchmark system respectively, and determine whether the network card performance of the own system is lower than that of the benchmark system.
[0097] Based on the above embodiments, the network card performance comparison module includes:
[0098] Compilation unit, used to download netperf and compile the binary executable program netperf on your system.
[0099] The measurement unit is used to use the compiled netperf to perform measurements on the own system and the benchmark system respectively.
[0100] The network card performance optimization device provided in the embodiment of the present invention can execute the network card performance optimization method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0101] Embodiment 5
[0102] Embodiment 5 of the present invention further provides a storage medium containing computer executable instructions, and when the computer executable instructions are executed by a computer processor, they are used to execute any of the network card performance optimization methods provided in the above embodiments.
[0103] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device.
[0104] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0105] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0106] Computer program code for performing the operation of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or device. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0107] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A network card performance optimization method, characterized in that: include: Select a network card performance evaluation benchmark system that matches the system where the network card is located; Measure the performance of the own system and the benchmark system respectively, and determine whether the network card performance of the own system is lower than that of the benchmark system; When the network card performance of your own system is lower than that of the benchmark system, completely copy the kernel and driver of your own system to the benchmark system; Use network performance measurement tools to measure your own system and the benchmark system respectively; Determine whether the kernel or driver in your system affects the performance of the network card based on the measurement results; When determining that the kernel or driver in your system affects the performance of the network card, use the kernel running parameter viewing tool to obtain the complete kernel parameter set of your system. Setting all the own kernel parameter sets into the benchmarking system; Use the network performance measurement tool to measure the network card performance of the benchmark system after setting up, and determine the impact of the driver on the network card performance based on the measurement results; When determining the impact of the driver on the performance of the network card, compare all data segments and code segments of the new driver kernel file of the benchmark system and the original driver kernel file of the benchmark system; When determining that the data segments are different, look for different variables; Record the variable values corresponding to different variables; Find the variable name corresponding to the variable value driven by the user; According to the variable name, the variable value of the corresponding variable name in the system driver of the own party is modified.
2. The method according to claim 1, characterized in that: The step of modifying the variable value of the corresponding variable name in the system driver according to the variable name includes: Search the data segment of the driver of the network card of the own system to obtain the original variable value corresponding to the variable name; The original variable value is modified to the corresponding variable value in the original driver.
3. The method according to claim 1, characterized in that When determining that the data segments are different, searching for different variables includes: Use the ELF display tool to find the specific location of each variable in the data segment; According to the specific position, the variable name and the corresponding variable value are determined, and different variables are determined.
4. The method according to claim 1, characterized in that: The measurement performance is obtained by measuring the own system and the benchmark system respectively, including: Download netperf and compile the binary executable program netperf on your system. Use the compiled netperf to perform measurements on your own system and the benchmark system respectively.
5. A network card performance optimization device, characterized in that: include: A selection module is used to select a network card performance evaluation benchmark system that is the same as the system where the network card is located; The network card performance comparison module is used to measure the performance on the own system and the benchmark system respectively, and determine whether the network card performance of the own system is lower than that of the benchmark system; The complete copy module is used to completely copy the kernel and driver of the own system to the benchmark system when the network card performance of the own system is lower than that of the benchmark system; Separate measurement module: users use network performance measurement tools to measure their own system and benchmark system separately; The performance impact judgment module is used to judge whether the kernel or driver in the own system has an impact on the network card performance based on the measurement results; The collection acquisition module is used to use the kernel running parameter viewing tool to obtain all the kernel parameter sets of the own party when determining that the kernel or driver in the own party system affects the performance of the network card; A setting module, used for setting all the own kernel parameter sets into the benchmarking system; The driver impact determination module is used to measure the network card performance of the benchmark system after setting by using the network performance measurement tool, and determine the impact of the driver on the network card performance according to the measurement result; The first comparison module is used to compare all data segments and code segments of the new driver kernel file of the benchmark system and the original driver kernel file of the benchmark system when determining the impact of the driver on the performance of the network card; A variable search module is used to search for different variables when it is determined that the data segments are different; Recording module, used to record the variable values corresponding to different variables; A variable name search module is used to search for the variable name corresponding to the variable value driven by the user; The modification module is used to modify the variable value of the corresponding variable name in the own system driver according to the variable name.
6. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the network card performance optimization method as described in any one of claims 1-4 when executed by a computer processor.
Citation Information
Patent Citations
Web container automatic optimization method and device, storage medium and electronic equipment
CN110716763A