Method and system for adjusting and optimizing network performance after upgrading of operating system

By obtaining the latency value range of the network card chip, detecting the network connection status, screening and writing the optimal latency value, the problem of network anomalies after the operating system upgrade is solved, automatic tuning of network performance is achieved, and the customer experience is improved.

CN120658602APending Publication Date: 2025-09-16KYLIN CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510826149.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

After the operating system upgrade, MAC/PHY driver incompatibility leads to abnormal network connectivity, decreased throughput, or increased error packets. The existing solution is cumbersome and labor-intensive, affecting the customer experience.

Method used

By obtaining the latency value range of the network card chip, detecting the network connection status, traversing the latency value range to perform single-machine loopback or multi-machine network connectivity tests, screening out the optimal latency value and writing it into the register, associating link connection events, and achieving network performance tuning.

Benefits of technology

Without relying on external testing tools, network anomaly recovery and performance tuning after system upgrades can be completed through pure software means, reducing the adaptation workload of BIOS and operating system manufacturers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658602A_ABST
    Figure CN120658602A_ABST
Patent Text Reader

Abstract

The invention discloses a network performance adjusting and optimizing method and system after an operating system is upgraded, the method is applied to stock equipment after the operating system is upgraded, and the method comprises the following steps: acquiring a time delay value interval of a network card chip, and detecting a network connection state; if the network is connected, traversing all the time delay values in the time delay value interval to detect the network connectivity, adding the time delay values with normal network connectivity into an available time delay value set, and calculating network performance scores of all the time delay values in the available time delay value set; selecting the time delay value with the highest network performance score, writing the time delay value into a corresponding register, and associating the time delay value with a corresponding link connection event; and if the network is not connected, performing a single-machine loopback test on the time delay values with abnormal network connectivity, adding the time delay values with normal single-machine loopback test into an available time delay value set, selecting an intermediate value in the available time delay value set, writing the intermediate value into a corresponding register, and associating the intermediate value with a corresponding link connection event. According to the method and the device, network abnormity recovery or performance optimization after system upgrading can be completed without depending on an external test tool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to network optimization technology, and in particular to a method and system for optimizing network performance after an operating system upgrade. Background Art

[0002] Before a new machine leaves the factory, the motherboard and operating system are adapted and optimized, and generally, network performance issues should not occur during use. However, when operating system manufacturers push system upgrades, the network (MAC / PHY) driver is also upgraded simultaneously. The send or receive delay parameters between the physical layer (PHY) and the data link layer (MAC) in the BIOS firmware that was originally debugged before the machine's factory delivery may no longer apply to the new MAC / PHY driver. As a result, some existing devices may experience performance degradation after the upgrade, such as abnormal network connectivity, decreased throughput, or increased error packets.

[0003] There are currently two solutions to the above problems in the industry: (1) The customer contacts the operating system manufacturer and proposes customization requirements; the operating system manufacturer makes targeted modifications and provides a customized system; (2) The customer contacts the machine manufacturer, who then re-adapts and updates the BIOS firmware.

[0004] The processes involved in the above two methods are relatively cumbersome, typically requiring multi-party evaluation before executing the update plan. In practice, because the driver parameters set in the operating system are universal and generally not modified for a specific system manufacturer or motherboard design, if a customized upgrade is performed once, subsequent upgrades will require a customized process, increasing the workload for both parties and particularly impacting the customer experience.

[0005] For the whole machine manufacturer, the workload of re-adaptation is large, and some old equipment or products of small manufacturers may no longer be maintained. Therefore, they ultimately have to rely on the system side to complete network tuning without changing the universal driver. Summary of the Invention

[0006] The technical problem to be solved by the present invention is: In response to the above-mentioned problems in the prior art, a method and system for network performance tuning after an operating system upgrade are provided, which can complete network anomaly recovery or performance tuning after system upgrade without relying on external testing tools.

[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is: A method for optimizing network performance after an operating system upgrade is provided, the method being applied to existing devices after an operating system upgrade, the method comprising the following steps: Obtaining a delay value interval of the network card chip, wherein the delay value is the sending or receiving delay between the physical layer and the data link layer, and detecting the network connection status; If the network is connected, all delay values ​​in the delay value range are traversed to detect network connectivity, delay values ​​with normal network connectivity are added to the available delay value set, network performance scores of all delay values ​​in the available delay value set are calculated, and the delay value with the highest network performance score is selected as the optimal value, written into the corresponding register, and associated with the corresponding link connection event; If the network is not connected, all delay values ​​in the delay value range are traversed to perform a single-machine loopback test, and the normal delay value of the single-machine loopback test is added to the available delay value set. The middle value of all delay values ​​in the available delay value set is selected as the optimal value and written into the corresponding register and associated with the corresponding link connection event.

[0008] Furthermore, when traversing all delay values ​​in the delay value interval to detect network connectivity, it specifically includes: writing the current delay value into the corresponding register, and then measuring the delay from the local IP address to the gateway IP address or other host IP addresses in the local area network multiple times. If the average value or minimum value of all delays is greater than the preset threshold, the network connectivity is abnormal; if the average value or maximum value of all delays is less than the preset threshold, the network connectivity is normal.

[0009] Furthermore, when traversing all delay values ​​in the delay value interval to perform a single-machine loopback test, it specifically includes: writing the current delay value into the corresponding register, then using the physical layer of the network card chip to capture the test data packet sent by the link data layer and returning the test data packet to the link data layer, and counting the round-trip time of each test data packet. If the average value or minimum value of all round-trip times is greater than the preset threshold, the single-machine loopback test is abnormal; if the average value or maximum value of all round-trip times is less than the preset threshold, the single-machine loopback test is normal.

[0010] Furthermore, when calculating the network performance scores of all delay values ​​in the available delay value set respectively, the network performance indicators corresponding to each delay value in the available delay value set are specifically counted, and all network performance indicators corresponding to the same delay value are normalized and then the weighted sum is calculated to obtain the network performance score corresponding to each delay value.

[0011] Furthermore, the network performance indicator includes data throughput, and the calculation formula for normalizing the data throughput is as follows:

[0012] in, represents the normalized data throughput corresponding to the i-th delay value in the available delay value set, represents the raw data throughput corresponding to the i-th delay value in the available delay value set, Indicates the maximum raw data throughput corresponding to all delay values ​​in the available delay value set. Indicates the minimum raw data throughput corresponding to all delay values ​​in the available delay value set.

[0013] Furthermore, the network performance indicator includes a packet loss rate, and the calculation formula for normalizing the packet loss rate is as follows:

[0014] in, represents the normalized packet loss rate corresponding to the i-th delay value in the available delay value set, represents the original packet loss rate corresponding to the i-th delay value in the available delay value set, Indicates the maximum raw packet loss rate corresponding to all delay values ​​in the available delay value set. Indicates the minimum raw packet loss rate corresponding to all delay values ​​in the available delay value set.

[0015] Furthermore, the network performance indicator includes an error count, and the calculation formula for normalizing the error count is as follows:

[0016] in, represents the normalized error count corresponding to the i-th delay value in the available delay value set, represents the raw error count corresponding to the i-th delay value in the set of available delay values, Indicates the maximum raw error count corresponding to all delay values ​​in the available delay value set. Indicates the minimum raw error count corresponding to all delay values ​​in the available delay value set.

[0017] The present invention also proposes a network performance tuning system after an operating system upgrade, comprising a processor and a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the network performance tuning method after an operating system upgrade.

[0018] The present invention also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the method for optimizing network performance after an operating system upgrade are implemented.

[0019] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method for optimizing network performance after an operating system upgrade.

[0020] Compared with the prior art, the advantages of the present invention are: The present invention uses a single-machine loopback test or a multi-machine network connectivity test under different network connection states to filter available delay values ​​from a given delay value range, then selects the optimal value from the set of available delay values ​​and associates the optimal value with the corresponding network card link up event. This allows network anomaly recovery or performance tuning after system upgrades to be completed purely through software without relying on external testing tools such as oscilloscopes, reducing the adaptation workload for BIOS and operating system manufacturers. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram showing the locations of effective delay values ​​between the physical layer and data link layer of a network card chip.

[0022] Figure 2 Schematic diagram of a method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The present invention will be further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the scope of protection of the present invention is not limited thereby.

[0024] Example 1 like Figure 1 As shown, the transmit (TX_CLK) and receive (RX_CLK) clock signal lines in the RGMII (Reduced Media Independent Interface) of the physical layer (PHY) and data link layer (MAC) are the effective delay values. Some existing technical solutions for network tuning use the PID algorithm to adjust the RGMII delay to achieve the purpose of debugging, which requires external equipment for testing. After debugging, it still depends on modifying the BIOS firmware to take effect, which cannot solve the network problems of existing equipment after system upgrades. Other technical solutions implement tuning in the network protocol stack (ISO network layer, transport layer), which cannot solve the problem that the transmit or receive delay parameters between MAC and PHY may no longer be applicable to the new MAC / PHY driver.

[0025] This embodiment proposes a method for optimizing network performance after an operating system upgrade to address the aforementioned issues. This method, applied to existing devices after an operating system upgrade, does not rely on testing tools such as oscilloscopes. It performs traversal testing on network interface card (NIC) chip latency values ​​to obtain a set of latency values ​​that ensure normal basic network communication functions. Based on different test scenarios, the method selects an intermediate latency value from the available latency value set, or a latency value that combines the best evaluation metrics such as performance, packet loss, and error packets. The method then associates the optimal parameter configuration action with the NIC link up event to ensure the effectiveness of the optimization results.

[0026] like Figure 2 As shown, the method of this embodiment includes the following steps: S1) Get the local gateway.

[0027] Step S1 of this embodiment is intended to obtain the local gateway IP or the reachable IP in the local area network for subsequent connectivity detection. Usually the network is set to automatically obtain the IP and gateway. In some cases, system upgrades may cause the network to be unusable, resulting in the inability to obtain the IP and gateway through protocols such as DHCP. Therefore, the local IP and gateway IP addresses can be manually configured.

[0028] S2) Obtain the latency value range of the network card chip.

[0029] Step S2 of this embodiment is intended to obtain a configurable delay value set consisting of the transmission or reception delay between the physical layer (PHY) and the data link layer (MAC) of the network card chip. The MAC and PHY chip models can be automatically obtained from the CPU information and the kernel dmesg information. The given delay discrete interval can be obtained by searching the chip manual based on the chip signal, thereby obtaining the configurable delay value set R0. After obtaining the configurable delay value set R0, convert it into the corresponding register bit description S3) Check the network connection status. If the network is connected, perform a multi-machine network connectivity test. If the network is not connected, perform a single-machine loopback test.

[0030] Step S3 of this embodiment is to select the delay value that makes the single-machine loopback test normal or the multi-machine network connectivity normal, and select the optimal value from them. The following is a detailed description of the two tests: The multi-machine network connectivity test includes the following steps: S101) Traversing all delay values ​​in the delay value range to detect network connectivity.

[0031] When traversing all delay values ​​in the delay value range to detect network connectivity, it specifically includes: writing the current delay value into the corresponding MAC or PHY register, and then measuring the delay from the local IP address to the gateway IP address or other host IP addresses in the local area network multiple times through a PING tool or other tool. If the average value or minimum value of all delays is greater than a preset threshold, the network connectivity is abnormal; if the average value or maximum value of all delays is less than the preset threshold, the network connectivity is normal.

[0032] S102) Filter available delay values ​​according to network connectivity.

[0033] The delay value of normal network connectivity is added to the available delay value set R1, which is a subset of the configurable delay value set R0. .

[0034] S103) Traverse the available delay values ​​to select the optimal value.

[0035] Traverse the available delay value set R1, calculate the network performance scores of all delay values ​​in the available delay value set, select the delay value with the highest network performance score as the optimal value, write it into the corresponding register, and associate it with the corresponding link connection event.

[0036] In this embodiment, when calculating the network performance scores of all delay values ​​in the available delay value set respectively, the test is started through iperf or other flow testing tools, and the network performance indicators corresponding to each delay value in the available delay value set after being written into the register are counted. All network performance indicators corresponding to the same delay value are normalized to eliminate the differences in dimension and order of magnitude, and then the weighted sum is calculated to obtain the network performance score corresponding to each delay value.

[0037] In this embodiment, the network performance indicators include data throughput, packet loss rate drop, error count error, etc. The network performance indicators are normalized as follows: (1) For data throughput, a linear transformation is used to map it to the interval [0, 1], and the calculation formula is as follows:

[0038] in, represents the normalized data throughput corresponding to the i-th delay value in the available delay value set, represents the raw data throughput corresponding to the i-th delay value in the available delay value set, Indicates the maximum raw data throughput corresponding to all delay values ​​in the available delay value set. Indicates the minimum raw data throughput corresponding to all delay values ​​in the available delay value set.

[0039] (2) For the packet loss rate drop and error count error, the lower the two indicators, the better. Therefore, they need to be negated during normalization. The calculation formula for normalization is as follows:

[0040] in, represents the normalized packet loss rate corresponding to the i-th delay value in the available delay value set, represents the original packet loss rate corresponding to the i-th delay value in the available delay value set, Indicates the maximum raw packet loss rate corresponding to all delay values ​​in the available delay value set. Indicates the minimum raw packet loss rate corresponding to all delay values ​​in the available delay value set.

[0041]

[0042] in, represents the normalized error count corresponding to the i-th delay value in the available delay value set, represents the raw error count corresponding to the i-th delay value in the set of available delay values, Indicates the maximum raw error count corresponding to all delay values ​​in the available delay value set. Indicates the minimum raw error count corresponding to all delay values ​​in the available delay value set.

[0043] In this embodiment, when calculating the weighted sum, it is first stipulated that the weights of the n indicators should satisfy the following conditions:

[0044] in, In this embodiment, the weights of throughput, packet loss rate, and error count are set to 0.3, 0.4, and 0.3 respectively based on their importance.

[0045] Then the parameter p after normalization of each indicator is i and the corresponding weight w i Multiply and add them together to get the performance score corresponding to the latency value. .

[0046] The single-machine loopback test includes the following steps: S201) Traversing all delay values ​​in the delay value range to perform a single-machine loopback test.

[0047] When traversing all delay values ​​in the delay value range to perform a single-machine loopback test, the following steps are specifically performed: writing the current delay value to the corresponding MAC or PHY register, then generating a test data packet through the MAC chip and sending it to the PHY chip; the PHY chip captures the test data packet and returns the test data packet to the MAC chip; and calculating the round-trip time (RTT) of each test data packet, where RTT = receiving time − sending time. If the average or minimum value of all round-trip times is greater than a preset threshold, the single-machine loopback test is abnormal; if the average or maximum value of all round-trip times is less than the preset threshold, the single-machine loopback test is normal.

[0048] S202) Filter available delay values ​​according to the single-machine loopback test result.

[0049] Add the normal delay value of the single-machine loopback test to the available delay value set R1, .

[0050] S303 selects the optimal value from the available delay values.

[0051] The available delay is generally a continuous distribution. Currently, the average value is generally used as the optimal value for the test results. The average value may be calculated as a non-integer or cannot be configured after being converted to binary, and a new judgment is required. In order to avoid the situation where the average value obtained is not in the available delay value set and a new judgment is required, this embodiment selects the middle value of all delay values ​​in the available delay value set as the optimal value R X Write to the corresponding register and associate it with the corresponding link connection event. .

[0052] Through the multi-machine network connectivity test and single-machine loopback test in step S3, the action of configuring the MAC / PHY register is associated with the network card Link up event. Subsequently, the optimal value of the delay value is obtained from the register each time the network card Link up is detected to configure the parameters, which can ensure that the network connection remains in the optimal state after each change.

[0053] Example 2 This embodiment proposes a network performance tuning system after an operating system upgrade, including a processor and a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the network performance tuning method after an operating system upgrade described in Example 1.

[0054] This embodiment further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the method for optimizing network performance after an operating system upgrade described in the first embodiment are implemented.

[0055] This embodiment further provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the method for optimizing network performance after an operating system upgrade described in the first embodiment are implemented.

[0056] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiment. All technical solutions based on the concept of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for optimizing network performance after an operating system upgrade, characterized in that: The method is applied to existing devices after the operating system is upgraded, and the method includes the following steps: Obtaining a delay value interval of the network card chip, wherein the delay value is the sending or receiving delay between the physical layer and the data link layer, and detecting the network connection status; If the network is connected, all delay values ​​in the delay value range are traversed to detect network connectivity, delay values ​​with normal network connectivity are added to the available delay value set, network performance scores of all delay values ​​in the available delay value set are calculated, and the delay value with the highest network performance score is selected as the optimal value, written into the corresponding register, and associated with the corresponding link connection event; If the network is not connected, all delay values ​​in the delay value range are traversed to perform a single-machine loopback test, and the normal delay value of the single-machine loopback test is added to the available delay value set. The middle value of all delay values ​​in the available delay value set is selected as the optimal value and written into the corresponding register and associated with the corresponding link connection event.

2. The method for optimizing network performance after an operating system upgrade according to claim 1, wherein: When traversing all delay values ​​in the delay value interval to detect network connectivity, it specifically includes: writing the current delay value into the corresponding register, and then measuring the delay from the local IP address to the gateway IP address or other host IP addresses in the local area network multiple times. If the average value or minimum value of all delays is greater than the preset threshold, the network connectivity is abnormal; if the average value or maximum value of all delays is less than the preset threshold, the network connectivity is normal.

3. The method for optimizing network performance after an operating system upgrade according to claim 1, wherein: When traversing all delay values ​​in the delay value interval to perform a single-machine loopback test, it specifically includes: writing the current delay value into the corresponding register, then using the physical layer of the network card chip to capture the test data packet sent by the link data layer and returning the test data packet to the link data layer, and counting the round-trip time of each test data packet. If the average value or minimum value of all round-trip times is greater than the preset threshold, the single-machine loopback test is abnormal; if the average value or maximum value of all round-trip times is less than the preset threshold, the single-machine loopback test is normal.

4. The method for optimizing network performance after an operating system upgrade according to claim 1, wherein: When calculating the network performance scores of all delay values ​​in the available delay value set separately, the network performance indicators corresponding to each delay value in the available delay value set are specifically counted, and all network performance indicators corresponding to the same delay value are normalized and then the weighted sum is calculated to obtain the network performance score corresponding to each delay value.

5. The method for optimizing network performance after an operating system upgrade according to claim 4, wherein: The network performance indicator includes data throughput, and the calculation formula for normalizing data throughput is as follows: in, represents the normalized data throughput corresponding to the i-th delay value in the available delay value set, represents the raw data throughput corresponding to the i-th delay value in the available delay value set, Indicates the maximum raw data throughput corresponding to all delay values ​​in the available delay value set. Indicates the minimum raw data throughput corresponding to all delay values ​​in the available delay value set.

6. The method for optimizing network performance after an operating system upgrade according to claim 4, wherein: The network performance indicator includes the packet loss rate. The calculation formula for normalizing the packet loss rate is as follows: in, represents the normalized packet loss rate corresponding to the i-th delay value in the available delay value set, represents the original packet loss rate corresponding to the i-th delay value in the available delay value set, Indicates the maximum raw packet loss rate corresponding to all delay values ​​in the available delay value set. Indicates the minimum raw packet loss rate corresponding to all delay values ​​in the available delay value set.

7. The method for optimizing network performance after an operating system upgrade according to claim 4, wherein: The network performance indicator includes error counts, and the calculation formula for normalizing the error counts is as follows: in, represents the normalized error count corresponding to the i-th delay value in the available delay value set, represents the raw error count corresponding to the i-th delay value in the set of available delay values, Indicates the maximum raw error count corresponding to all delay values ​​in the available delay value set. Indicates the minimum raw error count corresponding to all delay values ​​in the available delay value set.

8. A network performance tuning system after an operating system upgrade, comprising a processor and a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, characterized in that: The computer program is executed by a processor to implement the steps of the method for optimizing network performance after an operating system upgrade according to any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program, wherein: When the computer program is executed by a processor, the steps of the method for optimizing network performance after an operating system upgrade according to any one of claims 1 to 7 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for optimizing network performance after an operating system upgrade according to any one of claims 1 to 7 are implemented.