Method and apparatus for adjusting dynamic link bandwidth
Patent Information
- Application Number
- CN202511373837.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-24
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2045-09-24
AI Technical Summary
[0003]比如,在人工智能(Artificial Intelligence,AI)模型训练中,图形处理器(Graphics Processing Unit,GPU)需要通过PCIe链路访问内存数据,PCIe链路宽度经过预先配置,在GPU访问内存数据的过程中,PCIe链路宽度固定不变,以至于难以满足访问需求
[0038]上述动态链路带宽的调整方法及装置,基于将当前时刻PCIe链路的实时吞吐量、历史时间段内的流量信息和当前业务场景信息中的至少一个,输入至LSTM模型中进行处理,以对PCIe链路的带宽进行预测,并基于PCIe链路的带宽预测值调整PCIe链路的链路带宽,能够根据PCIe链路的链路参数,预测的PCIe链路的带宽预测值,及时对PCIe链路的链路带宽进行调整,从而能够避免业务高峰期时数据拥塞,提高PCIe链路上的数据传输效率,进而提高处理器的数据处理效率,同时,避免业务低谷期时内存资源浪费,提高PCIe链路资源的使用率。
Smart Images

Figure CN120935029B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network and communication technology, and in particular to a method and apparatus for adjusting dynamic link bandwidth. Background Technology
[0002] In Peripheral Component Interconnect Express (PCIe) link optimization, adjusting PCIe link bandwidth can significantly improve data transmission bandwidth, reduce transmission latency, and optimize energy efficiency, making it a key means to unleash the performance potential of hardware.
[0003] For example, in the training of artificial intelligence (AI) models, the graphics processing unit (GPU) needs to access memory data through the PCIe link. The PCIe link width is pre-configured, and during the process of the GPU accessing memory data, the PCIe link width remains unchanged, making it difficult to meet the access requirements.
[0004] Therefore, improving the flexibility of adjusting PCIe link bandwidth has become an urgent problem to be solved. Summary of the Invention
[0005] Therefore, it is necessary to provide a method and apparatus for adjusting dynamic link bandwidth that can improve the flexibility of PCIe link bandwidth adjustment, in order to address the above-mentioned technical problems.
[0006] Firstly, this application provides a method for adjusting dynamic link bandwidth, comprising:
[0007] Obtain the link parameters of the PCIe high-speed interface link for peripheral component interconnection; the link parameters include at least one of the following: the real-time throughput of the PCIe link at the current moment, the traffic information within the historical time period, and the current business scenario information;
[0008] The link parameters are input into the Long Short-Term Memory (LSTM) network model for processing to determine the predicted bandwidth of the PCIe link.
[0009] Adjust the link bandwidth of the PCIe link based on the bandwidth forecast.
[0010] In one embodiment, adjusting the PCIe link bandwidth based on the bandwidth prediction value includes:
[0011] Get the current link width and link speed of the PCIe link;
[0012] The bandwidth adjustment factor is determined based on the bandwidth forecast, current link width, and link rate.
[0013] Adjust the link bandwidth of the PCIe link according to the bandwidth adjustment factor.
[0014] In one embodiment, adjusting the link bandwidth of the PCIe link according to the bandwidth adjustment factor includes:
[0015] If the bandwidth adjustment factor is greater than the first preset threshold, the PCIe link width at the current moment will be adjusted to the first link width; the first link width is greater than the PCIe link width at the current moment.
[0016] If the bandwidth adjustment factor is less than the second preset threshold, the PCIe link width at the current moment will be adjusted to the second link width; if the second preset threshold is less than the first preset threshold, the second link width will be less than the PCIe link width at the current moment.
[0017] If the bandwidth adjustment factor is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, then the PCIe link width at the current moment will not be adjusted.
[0018] In one embodiment, determining the bandwidth adjustment factor based on the bandwidth prediction value, PCIe link width, and PCIe link rate includes:
[0019] The first influencing factor is determined based on the bandwidth prediction and the current link configuration; the current link configuration is the product of the current link width and the link rate.
[0020] The second influencing factor is determined based on the rate of change of bandwidth prediction over time and link speed;
[0021] The bandwidth adjustment factor is determined based on the first and second impact factors.
[0022] In one embodiment, the method for determining the real-time throughput includes:
[0023] Obtain the effective data transmission volume and corresponding sampling time information of the PCIe link;
[0024] The real-time throughput is determined based on the effective data transmission volume and sampling time information.
[0025] In one embodiment, the method for determining the traffic information within the aforementioned historical time period includes:
[0026] At the start of a historical time period, the real-time throughput at the start of the time period is determined as the traffic information within the historical time period.
[0027] At time t in the historical time period, the traffic information within the historical time period is determined based on the real-time throughput collected at time t and the traffic information within the target time period; the target time period is the time period between the start time and time t-1; where time t represents any other time in the historical time period other than the start time.
[0028] Secondly, this application also provides a device for adjusting dynamic link bandwidth, comprising:
[0029] The acquisition module is used to acquire the link parameters of the PCIe high-speed interface link of the peripheral component interconnection at the current moment; the link parameters include at least one of the following: real-time throughput, traffic information within a historical time period, and current business scenario information;
[0030] The determination module is used to input link parameters into the Long Short-Term Memory (LSTM) network model for processing in order to determine the bandwidth prediction value of the PCIe link;
[0031] The adjustment module is used to adjust the link bandwidth of the PCIe link based on the bandwidth prediction value.
[0032] In one embodiment, the adjustment module includes:
[0033] The acquisition unit is specifically used to acquire the current link width and link speed of the PCIe link;
[0034] The determining unit is specifically used to determine the bandwidth adjustment factor based on the bandwidth prediction value, the current link width, and the link rate;
[0035] The adjustment unit is specifically used to adjust the link bandwidth of the PCIe link according to the bandwidth adjustment factor.
[0036] In one embodiment, the adjustment unit is further configured to adjust the current PCIe link width to a first link width when the bandwidth adjustment factor is greater than a first preset threshold; the first link width is greater than the current PCIe link width; when the bandwidth adjustment factor is less than a second preset threshold, the current PCIe link width is adjusted to a second link width; the second preset threshold is less than the first preset threshold, and the second link width is less than the current PCIe link width; and when the bandwidth adjustment factor is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, the current PCIe link width is not adjusted.
[0037] In one embodiment, the determining unit is further configured to determine a first influencing factor based on the bandwidth prediction value and the current link configuration value; the current link configuration value is the product of the current link width and the link rate; determine a second influencing factor based on the rate of change of the bandwidth prediction value over time and the link rate; and determine a bandwidth adjustment factor based on the first influencing factor and the second influencing factor.
[0038] The aforementioned method and apparatus for adjusting dynamic link bandwidth are based on inputting at least one of the following into an LSTM model for processing: the real-time throughput of the PCIe link at the current moment, traffic information within a historical time period, and current business scenario information. This process predicts the bandwidth of the PCIe link and adjusts the link bandwidth based on the predicted bandwidth value. By adjusting the predicted bandwidth value of the PCIe link according to its parameters, the method can promptly adjust the link bandwidth, thereby avoiding data congestion during peak business periods, improving data transmission efficiency on the PCIe link, and consequently improving the processor's data processing efficiency. Simultaneously, it avoids wasting memory resources during off-peak business periods, improving the utilization rate of PCIe link resources. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a diagram illustrating the application environment of a dynamic link bandwidth adjustment method in one embodiment.
[0041] Figure 2 This is a flowchart illustrating a method for adjusting dynamic link bandwidth in one embodiment;
[0042] Figure 3 This is a flowchart illustrating a method for adjusting dynamic link bandwidth in another embodiment;
[0043] Figure 4 This is a flowchart illustrating a method for adjusting dynamic link bandwidth in another embodiment;
[0044] Figure 5 This is a flowchart illustrating a method for adjusting dynamic link bandwidth in another embodiment;
[0045] Figure 6 This is a flowchart illustrating a method for adjusting dynamic link bandwidth in another embodiment;
[0046] Figure 7 This is a flowchart illustrating a method for adjusting dynamic link bandwidth in another embodiment;
[0047] Figure 8 This is a flowchart illustrating a method for adjusting dynamic link bandwidth in another embodiment;
[0048] Figure 9 This is a structural block diagram of a dynamic link bandwidth adjustment device in one embodiment;
[0049] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] In Peripheral Component Interconnect Express (PCIe) link optimization, adjusting PCIe link bandwidth can significantly improve data transmission bandwidth, reduce transmission latency, and optimize energy efficiency, making it a key means to unleash the performance potential of hardware.
[0052] For example, in the training of artificial intelligence (AI) models, the graphics processing unit (GPU) needs to access memory data through the PCIe link. The PCIe link width is pre-configured. During the process of the GPU accessing memory data, the business load varies greatly at different times. During peak business periods, large-scale data demand will cause a sudden increase in traffic, while during off-peak business periods, traffic will drop significantly. Since the current PCIe link width is fixed, it will cause data congestion during peak business periods, resulting in data transmission delays, and memory resources will be idle during off-peak business periods.
[0053] Therefore, improving the flexibility of PCIe link bandwidth adjustment to avoid data congestion during peak business periods and to prevent memory resource idleness during off-peak periods has become an urgent problem to be solved. This application provides a method for dynamically adjusting link bandwidth, aiming to improve the flexibility of PCIe link bandwidth adjustment and avoid data congestion during peak business periods and to prevent memory resource idleness during off-peak periods.
[0054] Having described the background of the dynamic link bandwidth adjustment method provided in this application, we can also introduce the implementation environment of the dynamic link bandwidth adjustment method provided in this application. The dynamic link bandwidth adjustment method provided in this embodiment can be applied to, for example, Figure 1 In the implementation environment shown, the environment includes server 104, which can be implemented as a standalone server or a server cluster composed of multiple servers 104. Data storage system 102 can store the data that server 104 needs to process. Data storage system 102 can be integrated onto server 104 or placed in the cloud or on other network servers. Server 104 can obtain the real-time throughput, historical traffic information, and current business scenario information of the PCIe high-speed interface link. Then, based on the real-time throughput, historical traffic information, and current business scenario information of the PCIe link, it determines the predicted bandwidth value of the PCIe link and adjusts the link bandwidth based on the predicted bandwidth value.
[0055] In other possible implementations, the dynamic link bandwidth adjustment method provided in this application embodiment can also be applied to a terminal. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc.
[0056] In one embodiment, such as Figure 2 As shown, a method for adjusting dynamic link bandwidth is provided, which can be applied to... Figure 1 Taking the server in the example, the following steps are included:
[0057] S201. Obtain the link parameters of the PCIe high-speed interface link for peripheral component interconnection; the link parameters include at least one of the following: the real-time throughput of the PCIe link at the current moment, the traffic information within the historical time period, and the current business scenario information.
[0058] The real-time throughput of a PCIe link refers to the rate at which effective data is actually transmitted in the PCIe link at a specific moment, usually measured in Gbps (gigabits per second) or GB / s (gigabytes per second). For example, the real-time throughput of a PCIe link can be the rate at which effective data is actually transmitted when the GPU obtains memory data through the PCIe link.
[0059] The traffic information within the historical time period includes the traffic value of the PCIe link at each moment within the historical time period and / or the traffic change trend of the PCIe link within the historical time period, etc.
[0060] It should be noted that the real-time throughput and traffic information of the PCIe link over a historical period can be directly obtained from the link information monitoring module set up in the server.
[0061] The current business scenario information refers to the scenario type of the business being executed on the server, which may include AI training scenario, data storage scenario, and video rendering scenario, etc. Different current business scenario information corresponds to different encoding information. For example, the encoding information corresponding to the AI training scenario is 100, the encoding information corresponding to the data storage scenario is 010, and the encoding information corresponding to the video rendering scenario is 001.
[0062] It should be noted that the current business scenario information can be obtained by acquiring the operating information of the processors (e.g., CPU and GPU) (e.g., utilization, video memory usage, power consumption), analyzing the operating information of these processors, and thus obtaining the current business scenario information.
[0063] In this embodiment, when it is necessary to adjust the link bandwidth, at least one of the following can be obtained: the real-time throughput of the PCIe link at the current moment, the traffic information within the historical time period, and the current business scenario information. The link bandwidth of the PCIe link can then be adjusted based on the analysis of at least one of the following: the real-time throughput of the PCIe link at the current moment, the traffic information within the historical time period, and the current business scenario information.
[0064] Optionally, only the real-time throughput of the PCIe link at the current moment can be obtained, and the link bandwidth of the PCIe link can be adjusted based on the analysis of the real-time throughput of the PCIe link at the current moment; alternatively, only the traffic information within a historical time period can be obtained, and the link bandwidth of the PCIe link can be adjusted based on the analysis of the traffic information within the historical time period; alternatively, only the current business scenario information can be obtained, and the link bandwidth of the PCIe link can be adjusted based on the analysis of the current business scenario information.
[0065] Optionally, the system can also acquire the real-time throughput and traffic information of the PCIe link within a historical time period, analyze the real-time throughput and traffic information of the PCIe link within a historical time period, and adjust the link bandwidth of the PCIe link accordingly; alternatively, the system can also acquire the real-time throughput and current business scenario information of the PCIe link, analyze the real-time throughput and current business scenario information of the PCIe link, and adjust the link bandwidth of the PCIe link accordingly; alternatively, the system can also acquire the traffic information and current business scenario information within a historical time period, analyze the traffic information and current business scenario information within a historical time period, and adjust the link bandwidth of the PCIe link accordingly.
[0066] Optionally, it can also obtain the real-time throughput of the PCIe link at the current moment, the traffic information within the historical time period, and the current business scenario information, and analyze the real-time throughput of the PCIe link at the current moment, the traffic information within the historical time period, and the current business scenario information to adjust the link bandwidth of the PCIe link.
[0067] S202. Input the link parameters into the Long Short-Term Memory (LSTM) network model for processing to determine the predicted bandwidth value of the PCIe link.
[0068] In this embodiment, after obtaining the PCIe link parameters, these parameters can be input into a preset Long Short-Term Memory (LSTM) model for prediction to obtain the predicted bandwidth value of the PCIe link. For example, the real-time throughput of the PCIe link at the current moment, traffic information within a historical time period, and current service scenario information are input into a preset LSTM neural network for prediction to obtain the predicted bandwidth value of the PCIe link. It should be noted that the preset LSTM model can be pre-trained based on the real-time throughput of the PCIe link at historical moments, traffic information within historical time periods, historical service scenario information, and a basic LSTM model.
[0069] Optionally, after obtaining the real-time throughput of the PCIe link at the current moment, the traffic information within the historical time period, and the current service scenario information, the traffic information within the historical time period can be input into the LSTM model for processing to determine the traffic information of the PCIe link at the next moment. Then, the real-time throughput of the PCIe link at the current moment can be input into the LSTM model for processing to determine the throughput of the PCIe link at the next moment. Finally, the traffic information of the PCIe link at the next moment, the throughput of the PCIe link at the next moment, and the current service scenario information can be input into the LSTM model for processing to determine the bandwidth prediction value of the PCIe link at the next moment.
[0070] Optionally, after obtaining the real-time throughput of the PCIe link at the current moment, it can be determined whether the real-time throughput of the PCIe link at the current moment is greater than a preset throughput threshold. If the real-time throughput of the PCIe link at the current moment is greater than the preset throughput threshold, the bandwidth prediction value of the PCIe link is determined to be a larger value than the current bandwidth value of the PCIe link. If the real-time throughput of the PCIe link at the current moment is less than the preset throughput threshold, the bandwidth prediction value of the PCIe link is determined to be a smaller value than the current bandwidth value of the PCIe link.
[0071] S203. Adjust the link bandwidth of the PCIe link based on the bandwidth prediction value.
[0072] In this embodiment, after determining the bandwidth prediction value, the link bandwidth of the PCIe link can be adjusted according to the bandwidth prediction value.
[0073] Optionally, after determining the bandwidth prediction value, it can be determined whether the bandwidth prediction value is greater than the preset bandwidth threshold. If the bandwidth prediction value is greater than the preset bandwidth threshold, it means that the current PCIe link bandwidth cannot meet the service requirements. The PCIe link bandwidth can be adjusted to be greater than the current link bandwidth. For example, the x4 width link can be restored to the x8 width link without loss, thereby improving the data transmission capability of the PCIe link, ensuring the data transmission efficiency on the PCIe link, and improving the data processing speed of the processor. If the bandwidth prediction value is less than the preset bandwidth threshold, it means that the current PCIe link bandwidth can meet the service requirements, but there is still some idle PCIe link bandwidth. Therefore, the PCIe link bandwidth can be adjusted to be less than the current link bandwidth. For example, the x6 width link can be restored to the x4 width link without loss, thereby reducing the waste of link bandwidth resources.
[0074] In this embodiment, at least one of the following is input into the LSTM model for processing: the real-time throughput of the PCIe link at the current moment, traffic information within a historical time period, and current business scenario information. This allows for the prediction of the PCIe link bandwidth, and the adjustment of the PCIe link bandwidth based on the predicted bandwidth value. This enables timely adjustment of the PCIe link bandwidth according to the link parameters and the predicted bandwidth value, thereby avoiding data congestion during peak business periods, improving data transmission efficiency on the PCIe link, and consequently improving the processor's data processing efficiency. At the same time, it avoids wasting memory resources during off-peak business periods, improving the utilization rate of PCIe link resources.
[0075] In this embodiment, after determining the predicted bandwidth value of the PCIe link, the detailed process of adjusting the link bandwidth of the PCIe link based on the predicted bandwidth value can be explained. In an exemplary embodiment, such as... Figure 3 As shown, the above S203 includes:
[0076] S301. Obtain the current link width and link speed of the PCIe link.
[0077] The current link width of a PCIe link refers to the number of channels that can transmit data at the current moment, which can be represented by x1, x4, x8, x16, x32. Here, x1 means that one channel can transmit data, x4 means that four channels can transmit data, and so on. It should be noted that the higher the link width, the faster the data transmission speed.
[0078] Link rate refers to the data transmission rate on each channel. The product of link rate and link width is the total bandwidth. It should be noted that the higher the link rate, the faster the data transmission speed.
[0079] In this embodiment, the current link width and link rate of the PCIe link can be pre-configured and stored in the database before data transmission, so that the current link width and link rate of the PCIe link can be directly obtained from the database when needed.
[0080] S302. Determine the bandwidth adjustment factor based on the bandwidth prediction, current link width, and link rate.
[0081] In this embodiment, after obtaining the current link width and link speed, and determining the bandwidth prediction value, the bandwidth prediction value, the current link width and link speed can be calculated to obtain the bandwidth adjustment influence factor.
[0082] Optionally, the following provides a specific implementation method for determining the bandwidth adjustment factor based on the bandwidth prediction value, the current link width, and the link rate. See [link to implementation details]. Figure 4 The aforementioned S302 includes:
[0083] S3021. Determine the first influencing factor based on the bandwidth prediction value and the current link configuration value; the current link configuration value is the product of the current link width and the link rate.
[0084] In this embodiment, after obtaining the current link width and link rate, the product of the current link width and link rate can be used as the current link configuration value, and the first influencing factor can be determined based on the current link configuration value and the bandwidth prediction value.
[0085] Optionally, after determining the current link configuration value, the ratio of the bandwidth prediction value to the bandwidth prediction value can be used as the first influencing factor. Alternatively, after determining the current link configuration value, the ratio of the bandwidth prediction value to the bandwidth prediction value can be determined first, and then the product of this ratio and the first weighting coefficient can be used as the first influencing factor. For example, the following formula (1) provides a method for determining the first influencing factor:
[0086]
[0087] In the formula, As the number one impact factor, This is the bandwidth prediction value. This represents the current link width. For link speed, As the primary weighting factor, in stable business scenarios, if more emphasis is placed on bandwidth utilization, it can improve... The value, The value range is between 0 and 1.
[0088] It should be noted that if the calculated result of the first influence factor is close to the value of 1, it means that the current link configuration matches the predicted bandwidth demand. If the calculated result of the first influence factor is much less than 1, it means that there may be redundancy in link resources.
[0089] S3022. Determine the second influencing factor based on the rate of change of the bandwidth prediction over time and the link rate.
[0090] In this embodiment, after obtaining the bandwidth prediction value and link rate, the rate of change of the bandwidth prediction value over time can be determined, and the first influencing factor can be determined based on the rate of change of the bandwidth prediction value over time and the link rate.
[0091] Optionally, after determining the rate of change of the bandwidth prediction over time, the ratio of the rate of change of the bandwidth prediction over time to the link rate can be used as the second influencing factor. Alternatively, after determining the rate of change of the bandwidth prediction over time, the ratio of the rate of change of the bandwidth prediction over time to the link rate can be determined first, and then the product of this ratio and the second weighting coefficient can be used as the second influencing factor. For example, the following formula (2) provides a method for determining the second influencing factor:
[0092]
[0093] In the formula, It is the second most influential factor. This is the bandwidth prediction value. For link speed, This represents the rate of change of bandwidth forecasts over time, reflecting the dynamic growth or decline trend of bandwidth demand. As the second weighting factor, when business operations change frequently and the focus needs to be on real-time bandwidth demand changes, it can be increased. The value, The value range is between 0 and 1. The link system time constant is expressed in seconds (s).
[0094] It should be noted that if the result of the second influencing factor is positive, it indicates that the bandwidth demand is increasing and the link width needs to be planned in advance. If the result of the second influencing factor is negative, it indicates that the bandwidth demand is decreasing and the link width can be appropriately reduced to save power consumption.
[0095] S3023. Determine the bandwidth adjustment factor based on the first and second impact factors.
[0096] In this embodiment, after determining the first influence factor and the second influence factor, the first influence factor and the second influence factor can be summed to obtain the bandwidth adjustment factor. For example, the following formula (3) provides a method for determining the bandwidth adjustment factor:
[0097]
[0098] In the formula, This refers to the bandwidth adjustment factor. As the number one impact factor, It is the second most influential factor.
[0099] This concludes the explanation of how to determine the bandwidth adjustment factor based on the bandwidth prediction, PCIe link width, and PCIe link rate. The following section will explain the specific implementation method for adjusting the link bandwidth of the PCIe link based on the bandwidth adjustment factor.
[0100] S303. Adjust the link bandwidth of the PCIe link according to the bandwidth adjustment factor.
[0101] In this embodiment, after determining the bandwidth adjustment factor, the link bandwidth of the PCIe link can be adjusted according to the bandwidth adjustment factor.
[0102] Optionally, if the bandwidth adjustment factor is greater than the preset adjustment threshold, it indicates that the current PCIe link bandwidth cannot meet the service requirements. The PCIe link bandwidth can be adjusted to be greater than the current link bandwidth. For example, a x4 width link can be losslessly restored to an x8 width link, thereby improving the data transmission capability of the PCIe link, ensuring the data transmission efficiency on the PCIe link, and improving the processor's data processing speed. If the bandwidth adjustment factor is less than the preset adjustment threshold, it indicates that while the current PCIe link bandwidth can meet the service requirements, there is still some idle PCIe link bandwidth. Therefore, the PCIe link bandwidth can be adjusted to be less than the current link bandwidth. For example, a x6 width link can be losslessly restored to an x4 width link, thereby reducing the waste of link bandwidth resources.
[0103] Optionally, the following provides a specific implementation method for adjusting the link bandwidth of a PCIe link based on a bandwidth adjustment factor. See [link to implementation details]. Figure 5 The aforementioned S303 includes:
[0104] S3031. If the bandwidth adjustment factor is greater than the first preset threshold, the PCIe link width at the current moment is adjusted to the first link width; the first link width is greater than the PCIe link width at the current moment.
[0105] The first preset threshold is a value set in advance according to the adjustment conditions of the link width. The first preset threshold can be one or more. For example, the first preset threshold can be 1.2.
[0106] In this embodiment, if the bandwidth adjustment factor is greater than the first preset threshold when the first preset threshold is one, the current PCIe link width is adjusted to the first link width, and the first link width needs to be greater than the current PCIe link width. For example, the x4 width link is restored to the x8 width link without loss, thereby improving the data transmission capability of the PCIe link, ensuring the data transmission efficiency on the PCIe link, and improving the data processing speed of the processor.
[0107] In this embodiment, when there are at least two first preset thresholds, for example, the first preset thresholds include a first value and a second value, and the second value is greater than the first value, then when the bandwidth adjustment factor is greater than the first value, the x4 width link is losslessly restored to the x8 width link, and when the bandwidth adjustment factor is greater than the second value, the x4 width link is losslessly restored to the x16 width link. It should be noted that the above example is not the only case with multiple first preset thresholds; other link width adjustment methods are also within the scope of protection of this application.
[0108] For example, when a PCIe Gen6 X8 device is operating in X4 mode: = 4 * 128 = 512Gbps, when working in X8 mode: = 8 * 128 = 1024 Gbps =0.7, =0.3. EMA=900Gbps, = 950Gbps, = +50Gbps / ms, = 1000Gbps; U = 0.7*1000 / 512 + 0.3*(+50) / 128 ≈ 1.484; At this point, the lane needs to be upgraded to restore the x4 width link to the x8 width link without loss.
[0109] S3032. If the bandwidth adjustment factor is less than the second preset threshold, the PCIe link width at the current moment is adjusted to the second link width; the second preset threshold is less than the first preset threshold, and the second link width is less than the PCIe link width at the current moment.
[0110] The second preset threshold is a value set in advance according to the adjustment conditions of the link width. The second preset threshold can be one or more. For example, the first preset threshold can be 0.5.
[0111] In this embodiment, if the bandwidth adjustment factor is less than the second preset threshold when the second preset threshold is one, the current PCIe link width is adjusted to the second link width, and the second link width needs to be less than the current PCIe link width. For example, the 84-width link is restored to the x4-width link without loss, thereby reducing the waste of link bandwidth resources.
[0112] In this embodiment, when there are at least two second preset thresholds, for example, if the second preset thresholds include a third value and a fourth value, and the fourth value is less than the third value, then when the bandwidth adjustment factor is less than the third value, the x8 width link is losslessly restored to the x4 width link, and when the bandwidth adjustment factor is less than the fourth value, the x8 width link is losslessly restored to the x2 width link. It should be noted that the above example is not the only case with multiple second preset thresholds; other link width adjustment methods are also within the scope of this application.
[0113] For example, when a PCIe Gen6 X8 device is operating in X4 mode: = 4 * 128 = 512Gbps, when working in X8 mode: = 8 * 128 = 1024 Gbps =0.7, =0.3. EMA=300Gbps, = 310Gbps, = -5Gbps / ms = 280Gbps; at this point, the lane needs to be reduced to restore the x8 width link to the x4 width link without loss.
[0114] S3033. If the bandwidth adjustment factor is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, then the PCIe link width at the current moment will not be adjusted.
[0115] In this embodiment, if the bandwidth adjustment factor is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, the PCIe link width at the current moment will not be adjusted, and the current link width will be maintained to avoid link instability caused by frequent switching of link width.
[0116] For example, when a PCIe Gen6 X8 device is operating in X4 mode: = 4 * 128 = 512Gbps, when working in X8 mode: = 8 * 128 = 1024 Gbps =0.7, =0.3. EMA=700Gbps, = 720Gbps, = +2Gbps / ms, = 750Gbps; no link bandwidth adjustment is needed at this time.
[0117] In this embodiment, a bandwidth adjustment factor is determined based on the bandwidth prediction value, the current link width, and the link rate. Based on the bandwidth adjustment factor, the link bandwidth of the PCIe link is adjusted. This allows for timely adjustment of the PCIe link bandwidth, thereby avoiding data congestion during peak business periods, improving data transmission efficiency on the PCIe link, and consequently improving the processor's data processing efficiency. At the same time, it avoids wasting memory resources during off-peak business periods and improves the utilization rate of PCIe link resources.
[0118] In this embodiment, the method for determining real-time throughput can also be explained. In an exemplary embodiment, such as... Figure 6 As shown, the above method also includes:
[0119] S401. Obtain the effective data transmission volume and corresponding sampling time information of the PCIe link.
[0120] In this embodiment, to determine the real-time throughput, the effective data transmission volume of the PCIe link and the sampling time information corresponding to the effective data transmission volume can be obtained first.
[0121] Optionally, a preset monitoring plugin can be invoked to monitor the amount of data transmitted on the PCIe link, and obtain the effective data transmission volume of the PCIe link and the sampling time information corresponding to the effective data transmission volume.
[0122] S402. Determine the real-time throughput based on the effective data transmission volume and sampling time information.
[0123] In this embodiment, after obtaining the effective data transmission volume and sampling time information, the ratio of the effective data transmission volume to the sampling time information can be determined as the real-time throughput.
[0124] In this embodiment, the method for determining real-time throughput provides a data foundation for subsequently adjusting the link bandwidth of the PCIe link based on real-time throughput.
[0125] In this embodiment, the method for determining traffic information within a historical time period can also be explained. In an exemplary embodiment, such as... Figure 7 As shown, the above method also includes:
[0126] S501. At the start time of a historical time period, the real-time throughput at the start time is determined as the traffic information within the historical time period.
[0127] In this embodiment, for the start time in a historical time period, the real-time throughput at the start time is obtained, and the real-time throughput at the start time is determined as the traffic information within the historical time period. For example, the traffic information corresponding to the start time in a historical time period can be represented by the following formula (4):
[0128]
[0129] in, This refers to the traffic information corresponding to the start time within a historical time period. This represents the real-time throughput at the start time.
[0130] S502. At time t in the historical time period, determine the traffic information within the historical time period based on the real-time throughput collected at time t and the traffic information within the target time period; the target time period is the time period between the start time and time t-1; where time t represents any other time in the historical time period other than the start time.
[0131] In this embodiment, for any time other than the start time (i.e., time t) in the historical time period, the real-time throughput corresponding to time t can be obtained, and the traffic information in the historical time period can be determined based on the real-time throughput at time t and the traffic information in the time period between the start time and time t-1. For example, at time t in the historical time period, the traffic information corresponding to the historical time period can be expressed by the following formula (5):
[0132]
[0133] in, This refers to the traffic information at time t within a historical time period. As the current data weight, 0.2 can be taken. For historical data weights, it should be noted that different weights can be controlled. Values that adapt to different work scenarios. The larger the value, the faster the response to sudden traffic spikes (but the more prone to jitter), and vice versa. The smaller the value, the higher the response delay to sudden traffic surges and the stronger the noise immunity. Let be the real-time throughput at time t. This refers to the flow information during the time period between the start time and time t-1.
[0134] For example, if t=1, then the above formula (5) can be expressed as the following formula (6):
[0135]
[0136] For example, if t=2, then the above formula (5) can be expressed as the following formula (7):
[0137]
[0138] For example, if t=3, then the above formula (5) can be expressed as the following formula (8):
[0139]
[0140] The method for determining traffic information within a historical time period provided in this embodiment provides a data foundation for adjusting the link bandwidth of the PCIe link based on the traffic information within the historical time period.
[0141] In one embodiment, see Figure 8 It also provides a method for adjusting dynamic link bandwidth, including:
[0142] T1. Obtain the link parameters of the PCIe high-speed interface link for peripheral component interconnection; the link parameters include at least one of the following: the real-time throughput of the PCIe link at the current moment, the traffic information within the historical time period, and the current business scenario information;
[0143] T2. Input the PCIe link parameters into the Long Short-Term Memory (LSTM) network model for processing to determine the predicted bandwidth value of the PCIe link.
[0144] T3. Obtain the current link width and link speed of the PCIe link;
[0145] T4. Determine the first influencing factor based on the bandwidth prediction value and the current link configuration value; the current link configuration value is the product of the current link width and the link rate.
[0146] T5. Determine the second influencing factor based on the rate of change of the bandwidth prediction over time and the link rate;
[0147] T6. Determine the bandwidth adjustment factor based on the first and second impact factors;
[0148] T7. If the bandwidth adjustment factor is greater than the first preset threshold, the PCIe link width at the current moment will be adjusted to the first link width; the first link width is greater than the PCIe link width at the current moment.
[0149] T8. If the bandwidth adjustment factor is less than the second preset threshold, the PCIe link width at the current moment will be adjusted to the second link width; if the second preset threshold is less than the first preset threshold, the second link width will be less than the PCIe link width at the current moment.
[0150] T9. If the bandwidth adjustment factor is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, then the PCIe link width at the current moment will not be adjusted.
[0151] It should be noted that the descriptions of T1-T9 above can be found in the relevant descriptions in the above embodiments, and their effects are similar, so they will not be repeated here.
[0152] The following table, as shown below, provides a comparative analysis of the effects of a traditional method for pre-configuring PCIe link width and the link width adjustment method provided in this application.
[0153] Table 1 Theoretical Analysis Comparison
[0154]
[0155] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0156] Based on the same inventive concept, this application also provides a dynamic link bandwidth adjustment device for implementing the dynamic link bandwidth adjustment method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the dynamic link bandwidth adjustment device provided below can be found in the limitations of the dynamic link bandwidth adjustment method described above, and will not be repeated here.
[0157] In one exemplary embodiment, such as Figure 9 As shown, a dynamic link bandwidth adjustment device is provided, comprising: an acquisition module 10, a determination module 11, and an adjustment module 12, wherein:
[0158] The acquisition module 10 is used to acquire the link parameters of the PCIe high-speed interface link for interconnecting peripheral components; the link parameters include at least one of the following: the real-time throughput of the PCIe link at the current moment, the traffic information within the historical time period, and the current business scenario information.
[0159] The determination module 11 is used to input the link parameters into the Long Short-Term Memory (LSTM) network model for processing in order to determine the bandwidth prediction value of the PCIe link.
[0160] Adjustment module 12 is used to adjust the link bandwidth of the PCIe link based on the bandwidth prediction value.
[0161] In an exemplary embodiment, the adjustment module 12 includes:
[0162] The acquisition unit is specifically used to acquire the current link width and link speed of the PCIe link;
[0163] The determining unit is specifically used to determine the bandwidth adjustment factor based on the bandwidth prediction value, the current link width, and the link rate;
[0164] The adjustment unit is specifically used to adjust the link bandwidth of the PCIe link according to the bandwidth adjustment factor.
[0165] In an exemplary embodiment, the adjustment unit is further configured to adjust the current PCIe link width to a first link width when the bandwidth adjustment factor is greater than a first preset threshold; the first link width is greater than the current PCIe link width; when the bandwidth adjustment factor is less than a second preset threshold, the current PCIe link width is adjusted to a second link width; the second preset threshold is less than the first preset threshold, and the second link width is less than the current PCIe link width; and when the bandwidth adjustment factor is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, the current PCIe link width is not adjusted.
[0166] In an exemplary embodiment, the determining unit determines a first influencing factor based on the bandwidth prediction value and the current link configuration value; the current link configuration value is the product of the current link width and the link rate; a second influencing factor is determined based on the rate of change of the bandwidth prediction value over time and the link rate; and a bandwidth adjustment factor is determined based on the first influencing factor and the second influencing factor.
[0167] In an exemplary embodiment, the method for determining the real-time throughput includes: obtaining the effective data transmission volume of the PCIe link and the corresponding sampling time information; and determining the real-time throughput based on the effective data transmission volume and the sampling time information.
[0168] In an exemplary embodiment, the method for determining the traffic information within the aforementioned historical time period includes: at the start time of the historical time period, determining the real-time throughput at the start time as the traffic information within the historical time period; at time t in the historical time period, determining the traffic information within the historical time period based on the real-time throughput collected at time t and the traffic information within the target time period; the target time period is the time period between the start time and time t-1; wherein time t represents any other time within the historical time period other than the start time.
[0169] Each module in the aforementioned dynamic link bandwidth adjustment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0170] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores PCIe link parameter data. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for dynamically adjusting link bandwidth.
[0171] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0172] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0173] Obtain the link parameters of the PCIe high-speed interface link for peripheral component interconnection; the link parameters include at least one of the following: the real-time throughput of the PCIe link at the current moment, the traffic information within the historical time period, and the current business scenario information;
[0174] The link parameters are input into the Long Short-Term Memory (LSTM) network model for processing to determine the predicted bandwidth of the PCIe link.
[0175] Adjust the link bandwidth of the PCIe link based on the bandwidth forecast.
[0176] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0177] Get the current link width and link speed of the PCIe link;
[0178] The bandwidth adjustment factor is determined based on the bandwidth forecast, current link width, and link rate.
[0179] Adjust the link bandwidth of the PCIe link according to the bandwidth adjustment factor.
[0180] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0181] If the bandwidth adjustment factor is greater than the first preset threshold, the PCIe link width at the current moment will be adjusted to the first link width; the first link width is greater than the PCIe link width at the current moment.
[0182] If the bandwidth adjustment factor is less than the second preset threshold, the PCIe link width at the current moment will be adjusted to the second link width; if the second preset threshold is less than the first preset threshold, the second link width will be less than the PCIe link width at the current moment.
[0183] If the bandwidth adjustment factor is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, then the PCIe link width at the current moment will not be adjusted.
[0184] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0185] The first influencing factor is determined based on the bandwidth prediction and the current link configuration; the current link configuration is the product of the current link width and the link rate.
[0186] The second influencing factor is determined based on the rate of change of bandwidth prediction over time and link speed;
[0187] The bandwidth adjustment factor is determined based on the first and second impact factors.
[0188] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0189] Obtain the effective data transmission volume and corresponding sampling time information of the PCIe link;
[0190] The real-time throughput is determined based on the effective data transmission volume and sampling time information.
[0191] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0192] At the start of a historical time period, the real-time throughput at the start of the time period is determined as the traffic information within the historical time period.
[0193] At time t in the historical time period, the traffic information within the historical time period is determined based on the real-time throughput collected at time t and the traffic information within the target time period; the target time period is the time period between the start time and time t-1; where time t represents any other time in the historical time period other than the start time.
[0194] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0195] Obtain the link parameters of the PCIe high-speed interface link for peripheral component interconnection; the link parameters include at least one of the following: the real-time throughput of the PCIe link at the current moment, the traffic information within the historical time period, and the current business scenario information;
[0196] The link parameters are input into the Long Short-Term Memory (LSTM) network model for processing to determine the predicted bandwidth of the PCIe link.
[0197] Adjust the link bandwidth of the PCIe link based on the bandwidth forecast.
[0198] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0199] Get the current link width and link speed of the PCIe link;
[0200] The bandwidth adjustment factor is determined based on the bandwidth forecast, current link width, and link rate.
[0201] Adjust the link bandwidth of the PCIe link according to the bandwidth adjustment factor.
[0202] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0203] If the bandwidth adjustment factor is greater than the first preset threshold, the PCIe link width at the current moment will be adjusted to the first link width; the first link width is greater than the PCIe link width at the current moment.
[0204] If the bandwidth adjustment factor is less than the second preset threshold, the PCIe link width at the current moment will be adjusted to the second link width; if the second preset threshold is less than the first preset threshold, the second link width will be less than the PCIe link width at the current moment.
[0205] If the bandwidth adjustment factor is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, then the PCIe link width at the current moment will not be adjusted.
[0206] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0207] The first influencing factor is determined based on the bandwidth prediction and the current link configuration; the current link configuration is the product of the current link width and the link rate.
[0208] The second influencing factor is determined based on the rate of change of bandwidth prediction over time and link speed;
[0209] The bandwidth adjustment factor is determined based on the first and second impact factors.
[0210] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0211] Obtain the effective data transmission volume and corresponding sampling time information of the PCIe link;
[0212] The real-time throughput is determined based on the effective data transmission volume and sampling time information.
[0213] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0214] At the start of a historical time period, the real-time throughput at the start of the time period is determined as the traffic information within the historical time period.
[0215] At time t in the historical time period, the traffic information within the historical time period is determined based on the real-time throughput collected at time t and the traffic information within the target time period; the target time period is the time period between the start time and time t-1; where time t represents any other time in the historical time period other than the start time.
[0216] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0217] Obtain the link parameters of the PCIe high-speed interface link for peripheral component interconnection; the link parameters include at least one of the following: the real-time throughput of the PCIe link at the current moment, the traffic information within the historical time period, and the current business scenario information;
[0218] The link parameters are input into the Long Short-Term Memory (LSTM) network model for processing to determine the predicted bandwidth of the PCIe link.
[0219] Adjust the PCIe link bandwidth based on the bandwidth forecast.
[0220] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0221] Get the current link width and link speed of the PCIe link;
[0222] The bandwidth adjustment factor is determined based on the bandwidth forecast, current link width, and link rate.
[0223] Adjust the link bandwidth of the PCIe link according to the bandwidth adjustment factor.
[0224] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0225] If the bandwidth adjustment factor is greater than the first preset threshold, the PCIe link width at the current moment will be adjusted to the first link width; the first link width is greater than the PCIe link width at the current moment.
[0226] If the bandwidth adjustment factor is less than the second preset threshold, the PCIe link width at the current moment will be adjusted to the second link width; if the second preset threshold is less than the first preset threshold, the second link width will be less than the PCIe link width at the current moment.
[0227] If the bandwidth adjustment factor is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, then the PCIe link width at the current moment will not be adjusted.
[0228] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0229] The first influencing factor is determined based on the bandwidth prediction and the current link configuration; the current link configuration is the product of the current link width and the link rate.
[0230] The second influencing factor is determined based on the rate of change of bandwidth prediction over time and the link rate;
[0231] The bandwidth adjustment factor is determined based on the first and second impact factors.
[0232] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0233] Obtain the effective data transmission volume and corresponding sampling time information of the PCIe link;
[0234] The real-time throughput is determined based on the effective data transmission volume and sampling time information.
[0235] In one embodiment, when the computer program is executed by a processor, it further performs the following steps:
[0236] At the start of a historical time period, the real-time throughput at the start of the time period is determined as the traffic information within the historical time period.
[0237] At time t in the historical time period, the traffic information within the historical time period is determined based on the real-time throughput collected at time t and the traffic information within the target time period; the target time period is the time period between the start time and time t-1; where time t represents any other time in the historical time period other than the start time.
[0238] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0239] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0240] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for adjusting dynamic link bandwidth, characterized in that, The method includes: Obtain the link parameters of the PCIe high-speed interface link for peripheral component interconnection; the link parameters include at least one of the following: the real-time throughput of the PCIe link at the current moment, traffic information within a historical time period, and current service scenario information; The link parameters are input into a Long Short-Term Memory (LSTM) network model for processing to determine the predicted bandwidth value of the PCIe link. Obtain the current link width and link rate of the PCIe link; The bandwidth adjustment factor is determined based on the bandwidth prediction value, the current link width, and the link rate; Adjust the link bandwidth of the PCIe link according to the bandwidth adjustment factor; The bandwidth adjustment factor is determined according to the following formula (1): In the formula, This refers to the bandwidth adjustment factor. As the number one impact factor, It is the second most influential factor; Among them, the first influence factor Determined according to the following formula (2): In the formula, This is the bandwidth prediction value. This represents the current link width. For link speed, This is the first weighting coefficient, and its value ranges from 0 to 1. Among them, the second influence factor Determined according to the following formula (3): In the formula, The rate of change of the bandwidth prediction over time. This is the second weighting coefficient, with a value between 0 and 1. The link system time constant is expressed in seconds (s).
2. The method according to claim 1, characterized in that, Adjusting the link bandwidth of the PCIe link according to the bandwidth adjustment factor includes: If the bandwidth adjustment factor is greater than the first preset threshold, then the PCIe link width at the current moment is adjusted to the first link width; the first link width is greater than the PCIe link width at the current moment. If the bandwidth adjustment factor is less than the second preset threshold, the PCIe link width at the current moment is adjusted to the second link width; the second preset threshold is less than the first preset threshold, and the second link width is less than the PCIe link width at the current moment. If the bandwidth adjustment factor is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, then the PCIe link width at the current moment will not be adjusted.
3. The method according to claim 1 or 2, characterized in that, The method for determining the real-time throughput includes: Obtain the effective data transmission volume and corresponding sampling time information of the PCIe link; The real-time throughput is determined based on the effective data transmission volume and the sampling time information.
4. The method according to claim 1 or 2, characterized in that, The methods for determining traffic information within the historical time period include: At the start time of the historical time period, the real-time throughput at the start time is determined as the traffic information within the historical time period; At time t within the historical time period, the traffic information within the historical time period is determined based on the real-time throughput collected at time t and the traffic information within the target time period; the target time period is the time period between the start time and time t-1; wherein, time t represents any other time within the historical time period other than the start time.
5. A device for adjusting dynamic link bandwidth, characterized in that, The device includes: The acquisition module is used to acquire the link parameters of the PCIe high-speed interface link of the peripheral component interconnection at the current moment; the link parameters include at least one of real-time throughput, traffic information within a historical time period, and current business scenario information; The determination module is used to input the link parameters into the Long Short-Term Memory (LSTM) network model for processing in order to determine the bandwidth prediction value of the PCIe link; An adjustment module is used to obtain the current link width and link rate of the PCIe link; determine a bandwidth adjustment factor based on the bandwidth prediction value, the current link width, and the link rate; and adjust the link bandwidth of the PCIe link based on the bandwidth adjustment factor. The bandwidth adjustment factor is determined according to the following formula (1): In the formula, This refers to the bandwidth adjustment factor. As the number one impact factor, It is the second most influential factor; Among them, the first influence factor Determined according to the following formula (2): In the formula, This is the bandwidth prediction value. This represents the current link width. For link speed, This is the first weighting coefficient, and its value ranges from 0 to 1. Among them, the second influence factor Determined according to the following formula (3): In the formula, The rate of change of the bandwidth prediction over time. This is the second weighting coefficient, with a value between 0 and 1. is the link system time constant, in seconds.
6. The apparatus according to claim 5, characterized in that, The adjustment unit is further configured to adjust the PCIe link width at the current moment to the first link width when the bandwidth adjustment factor is greater than the first preset threshold. The first link width is greater than the PCIe link width at the current moment; If the bandwidth adjustment factor is less than the second preset threshold, the PCIe link width at the current moment will be adjusted to the second link width. The second preset threshold is less than the first preset threshold, and the second link width is less than the PCIe link width at the current moment; if the bandwidth adjustment factor is greater than or equal to the second preset threshold and less than or equal to the first preset threshold, the PCIe link width at the current moment is not adjusted.
7. The apparatus according to claim 5 or 6, characterized in that, The acquisition module includes: The acquisition unit is specifically used to acquire the effective data transmission volume and corresponding sampling time information of the PCIe link; The first determining unit is specifically used to determine the real-time throughput based on the effective data transmission volume and the sampling time information.
8. The apparatus according to claim 5 or 6, characterized in that, The acquisition module includes: The second determining unit is specifically used to determine the real-time throughput at the starting time in the historical time period as the traffic information within the historical time period. The third determining unit is specifically used to determine the traffic information within the historical time period at time t based on the real-time throughput collected at time t and the traffic information within the target time period; the target time period is the time period between the start time and time t-1; wherein, time t represents any other time within the historical time period other than the start time.
9. A computer device, characterized in that, The method includes a memory and a processor, the memory storing a computer program, characterized in that the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 4.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Transparent window interaction method, system and device based on DirectX and storage medium
CN119937873A