WO2013185480A1 - 吞吐率的获取方法和装置 - Google Patents

吞吐率的获取方法和装置 Download PDF

Info

Publication number
WO2013185480A1
WO2013185480A1 PCT/CN2013/070192 CN2013070192W WO2013185480A1 WO 2013185480 A1 WO2013185480 A1 WO 2013185480A1 CN 2013070192 W CN2013070192 W CN 2013070192W WO 2013185480 A1 WO2013185480 A1 WO 2013185480A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet loss
packet
obtaining
period
total
Prior art date
Application number
PCT/CN2013/070192
Other languages
English (en)
French (fr)
Inventor
邱凌
麦传哲
郑炜
王靳
向绍勇
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2013185480A1 publication Critical patent/WO2013185480A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0888Throughput

Definitions

  • the present invention relates to the field of the Internet, and in particular, to a method and an apparatus for acquiring a throughput rate, and a background art
  • Fig. 1 The prior art provides a RENO algorithm, and the transmission process of the application is as shown in Fig. 1.
  • the vertical axis represents the congestion window CWND, and the horizontal axis represents the round trip delay RTT. Then, assuming that the random packet loss rate is p, the number of consecutively transmitted packets in a packet loss practice is equivalent to l/p.
  • the maximum congestion window of H ⁇ TCP is W
  • the initial congestion window of TCP is usually W/2. It is assumed that the receiving terminal confirms each received message, that is, sends an ACK.
  • the congestion window of the TCP sender increases by 1
  • the time required for each round of TCP congestion window to grow to the maximum congestion window W is W/2
  • the maximum congestion window of TCP can be reached after the RTT round.
  • the total number of messages sent is:
  • the TCP congestion window will be reduced to W/2; therefore, the packets sent in each round are reversed by packet loss: 1/p ( 2 ), and 1 and 2 are connected to each other to obtain:
  • C values are different.
  • the algorithm is based on the RENO-based TCP congestion avoidance algorithm and is a purely theoretical derivation. In the actual network environment, there are many factors affecting TCP throughput. How to calculate the TCP throughput rate, taking into account the impact of the actual network environment, is a problem that the present invention needs to solve. Summary of the invention
  • the embodiment of the invention provides a method for calculating the throughput rate, so as to solve the problem that the existing TCP throughput calculation method has a large error caused by not considering the actual network condition.
  • the embodiment of the present invention provides a method for obtaining a throughput rate, where the method includes: acquiring a number of packets that a transmission network sends a packet in a plurality of packet loss periods;
  • the ratio of the number of packets to the total length of the packet is the throughput of the transport network in the current network state.
  • an embodiment of the present invention provides an apparatus for acquiring a throughput rate, where the apparatus includes: a packet number obtaining unit, configured to acquire a number of packets that a transmission network sends a packet in a plurality of packet loss periods;
  • a total duration acquisition unit configured to acquire a total time of sending a packet in the plurality of packet loss periods Long
  • the ratio obtaining unit is configured to obtain a ratio of the number of the packets to the total length of the packet, as a throughput rate of the transmission network in a current network state.
  • the embodiment of the invention provides a method for obtaining a throughput rate, which divides a plurality of packet loss periods according to a time point at which a packet loss event occurs in the entire transmission period of the transmission network, and then thins the packet loss period according to the packet transmission characteristic of the transmission network. Divided into multiple packet sub-periods, accumulating the throughput of different packet loss periods, and accumulating the packet sub-period duration to calculate the TCP throughput rate in the actual network environment, thereby avoiding the purely theoretical derivation calculation method and reducing the throughput rate. Calculation error. DRAWINGS
  • FIG. 1 is a schematic diagram of a network in which the Reno algorithm is used to calculate the throughput rate in the prior art
  • FIG. 2 is an application network architecture of a method for obtaining a throughput rate according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for acquiring a throughput rate according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a method for acquiring a throughput rate according to another embodiment of the present invention.
  • FIG. 5 is a specific flowchart of a method for acquiring throughput rate S401 according to an embodiment of the present invention
  • FIG. 5A is a detailed flowchart of a method S503 for acquiring a throughput rate according to an embodiment of the present invention
  • FIG. 5B is a schematic diagram of a transmission process of an RTT for each packet sending period according to an acquisition method of the throughput rate according to an embodiment of the present invention
  • FIG. 6 is a detailed flowchart of a method for acquiring a throughput rate S501 according to an embodiment of the present invention
  • FIG. 7 is a flowchart of obtaining the total number of packets sent in N packet loss periods in the method for obtaining throughput rate according to an embodiment of the present invention
  • FIG. 8 is a flowchart of another implementation state of obtaining a total number of packets sent by a server in an N packet loss period according to an acquisition method of a throughput rate according to an embodiment of the present invention
  • FIG. 9 is a flowchart of obtaining a total duration of an outgoing sub-period in a single packet loss period in an N packet loss period according to an acquisition method of the throughput rate according to an embodiment of the present invention
  • FIG. 10 is a flowchart of obtaining a total time length of a packet transmission period in an N packet loss period according to an acquisition method of a throughput rate according to an embodiment of the present invention
  • 11 is a flowchart of another embodiment for acquiring the length of each of the packet sub-periods in a single packet loss period in the method for obtaining the throughput rate according to the embodiment of the present invention
  • FIG. 12 is a flowchart of obtaining a total time length of a packet sending period in an N packet loss period according to an acquisition method of a throughput rate according to an embodiment of the present invention
  • FIG. 13 is a general flowchart of obtaining a throughput rate by a method for obtaining a throughput rate according to an embodiment of the present invention
  • FIG. 14 is a schematic diagram of an apparatus for obtaining a TCP throughput rate according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a network architecture of a method for acquiring a throughput rate according to an embodiment of the present invention.
  • the server 10 and the receiver 20 are specifically included.
  • the sender server 10 is configured to send a message, the sender server 10 accesses the Internet, and the Internet also accesses at least one receiving server 20.
  • the sender server 10 transmits the media data as a media server through the TCP protocol, and the receiver server 20 receives the media data sent by the sender server 10 from the Internet as a client.
  • Throughput in the performance test refers to the amount of data transmitted over the network per unit time, which is the main indicator to measure network performance.
  • the embodiment of the present invention provides that a packet loss period is divided according to the time when the packet loss event occurs, and the packet loss period is determined according to the packet sending characteristic of the TCP. Divide into multiple delivery periods, accumulate the throughput of different packet loss periods, and accumulate the packet transmission period to calculate the TCP throughput in the actual network environment, thereby avoiding pure Theoretically derived calculation method to reduce the calculation error of throughput.
  • FIG. 3 is a flowchart of a method for obtaining a throughput rate according to an embodiment of the present invention. As shown in the figure, the method includes the following steps:
  • step S301 the number of packets sent by the transport network in a plurality of packet loss periods is obtained. Specifically, the packet loss period is divided according to a time point at which two packet loss events occur, and two The time difference between the second packet loss events is a packet loss period, which can also be called a packet loss event interval.
  • the server will count the number of packet loss events. Therefore, the total number of packets sent by the server in the N packet loss period is to adopt as many methods as possible to achieve accuracy.
  • N is greater than 1 and is a natural number less than the limit. The larger the value, the more accurate the calculation.
  • each packet loss period may be divided into multiple packet sending periods according to the TCP packet sending characteristic, which may also be called RTT.
  • the transmission delay period that is, the length of time a group of messages are sent from the server to the receiving server ACK.
  • the duration of each RTT period in the N packet loss periods is counted by the limit, and the total duration of the packet sending period in the N packet loss periods is obtained.
  • step S303 the ratio of the number of packets to the total length of the packet is the throughput of the transmission network in the current network state.
  • the two are divided, and the obtained ratio is the throughput rate of the transmission network per unit time.
  • step S301 and step S302 can be performed simultaneously at the same time, without affecting the effect of the embodiment.
  • the throughput rate is calculated in the actual transmission network, because it is considered The distribution of TCP packet loss intervals, so the results obtained are more accurate than pure theory.
  • FIG. 4 is a flow chart of a method for calculating a TCP throughput rate according to another embodiment of the present invention. As shown in FIG. 4, the method includes:
  • Step S401 Acquire a total number of packets sent by the transport network in each packet loss period in multiple packet loss periods
  • step S402 the total number of packets sent in each of the multiple packet loss periods is added to the number of packets sent by the transport network in multiple packet loss periods.
  • the server sends multiple packet loss periods. Each packet is sent in the packet loss period. After the number of sent packets in multiple packet loss periods is added, Total number of packets sent by the server during multiple packet loss periods.
  • Step S403 Acquire a total duration of the sending sub-period in each of the plurality of packet loss periods
  • Step S404 Accumulate the total length of the packet sub-period in each of the plurality of packet loss periods as the total packet transmission period in the plurality of packet loss periods.
  • the multiple packet loss periods take a limit of N to facilitate calculation.
  • N packet loss periods For the sake of convenience, the following are all described by N packet loss periods.
  • the above two steps can be performed simultaneously in the process of obtaining the total number of packets sent by the transport network in N packet loss periods.
  • packets are sent in a packet sub-period, that is, RTT. Therefore, after the total length of the packets sent in each packet loss period is accumulated, it is the total duration of the packet sending period in the N packet loss periods.
  • step S405 the throughput rate of the transmission network in the actual network state is obtained according to the number of packets sent by the transmission network in a plurality of packet loss periods and the total length of the packet transmission period.
  • Step S405 is the same as step S303 in the previous embodiment, and therefore will not be described too much, as will be understood by those skilled in the art.
  • 5 is a specific flowchart of S401 in FIG. 4, as shown in FIG. 5, the total number of packets sent by the acquisition transmission network in each packet loss period in a plurality of packet loss periods includes:
  • S503 Obtain a threshold value of a total number of sent packets in a packet loss period, as a reference value for determining whether to enter a next packet loss period;
  • FIG. 5A is a schematic diagram of obtaining a threshold for sending a total number of packets in a packet loss period.
  • the packet loss interval model can be arbitrarily selected, such as Poisson distribution, average distribution or Gaussian distribution model.
  • the packet loss rate PLR can be a specific value of a packet capture process, or it can be an average value after multiple statistics.
  • the PLR and the packet loss model are used to calculate the reference value P (n) of the total number of messages sent between two packet loss periods. P (n) varies with the value of N.
  • the reference value P (n) is It is used to determine whether to enter the next packet loss period (the next packet loss period) when calculating the total number of packets sent in each packet loss period.
  • S504 Compare ⁇ CWND and P(n). If ⁇ CWND > ⁇ ( ⁇ ), enter the next packet loss period to calculate the total number of sent messages in the first M packet sub-periods in the next packet loss period. Then, the total number of sent packets of one more packet sub-period in the current packet loss period is continuously calculated.
  • next packet loss period is to add N to 1, and step S505 is performed to obtain the total number of packets sent by the first M packet sub-cycles in the next packet loss period.
  • the total number of sent packets of one packet sub-period in the current packet loss period is calculated by adding M to the total number of packets sent by one packet sub-period in the current packet loss period, CWND M+1 , and N is not Change, ⁇ CWND M+1 and ⁇ ( ⁇ ), and so on, until the condition for entering the next packet loss period is satisfied.
  • FIG. 5B is a reference diagram of a transmission process of each packet sub-period RTT.
  • FIG. 6 is a detailed diagram of obtaining a total number of CWNDs sent by M sub-packets in a single packet loss period in the N packet loss periods. Cheng, as seen in Figure 6:
  • the total number of packets sent by each of the M packet sub-periods is calculated by the avoidance algorithm by the total number of lost packets, the number of lost packets, and the maximum value of the congestion window.
  • the congestion avoidance algorithm calculates the number of packets sent at different stages of each packet sub-cycle, that is, CWND. These phases can be divided into: slow start phase, congestion avoidance phase, retransmission phase, and smoothness. During the transmission phase, packet loss may occur at these phases, so it needs to be considered separately.
  • the transmission process of the RTT for each packet sub-period can refer to FIG. 5B.
  • the congestion avoidance algorithm performs different retransmission actions, which can be divided into: fast retransmission and retransmission that is subject to delay.
  • the Linux kernel and CUBIC algorithm are taken as an example to describe the process of TCP throughput acquisition.
  • the CUBIC algorithm is consistent with the RENO algorithm, that is, the CWND grows linearly from 1 to 16 and then enters the startup.
  • the CUBIC algorithm is consistent with the RENO algorithm, that is, S ACKs are received in the last packet sub-period RTT, and the number of packets sent by the next packet sub-period RTT is sent in the previous period.
  • the RTT When the number of packets sent by the RTT is not less than CWND_MAX, it enters the smooth transmission phase.
  • the CWND of each RTT In the smooth transmission phase, the CWND of each RTT is equal to CWND_MAX.
  • CWND_MAX is the maximum number of packets that TCP can achieve when transmitting, that is, the maximum value of CWND.
  • Congestion Window throughout the TCP transfer (Congestion Window, CWND) does not grow indefinitely. When it reaches a certain stage, TCP enters a stationary transmission period.
  • the congestion window size CWND of the TCP is limited by the user side receiving window Window Size, the service side application layer rate limiting Rate_Limit, and the physical bandwidth Bandwidth.
  • the value of CWND_MAX is the minimum of the three, that is, by taking the minimum The value function min is obtained.
  • Maximum CWND_MAX is used to limit the maximum number of packets in the RTT within a packet sub-cycle.
  • the congestion avoidance algorithm uses different speed reduction and retransmission strategies according to the number b(n) of packets lost during the packet loss event. Taking the CUBIC algorithm as an example, a fast retransmission is performed after receiving three repeated ACKs.
  • is the multiplicative reduction factor after the packet loss event occurs.
  • C takes a value of 0.4 and ⁇ takes a value of 0.3.
  • the number of retransmitted packets is sent in the following RTT period according to the following formula:
  • the RTT calculation is obtained every time the packet is sent.
  • the CWND it compares the sum of all CWNDs in the current packet loss period, CWND, and the expected total value of packets sent by the current packet loss period, ⁇ ( ⁇ ):
  • the acquisition of the TCP throughput rate takes into account the retransmission strategy and the transmission window growth rule at different stages of the TCP transmission, which improves the combination of the TCP throughput calculation and the actual network, and helps to reduce the error.
  • FIG. 7 is a flowchart of obtaining the number of packets sent in the N packet loss period of the transmission network according to the foregoing embodiment, and accumulating the total number of packets sent in each packet loss period, and obtaining the server transmission report in the N packet loss period.
  • the total number of texts which can be converted to bytes, and then used to calculate TCP throughput.
  • FIG. 8 is a flowchart of another embodiment for obtaining the total number of packets sent by the server in the N packet loss period according to the above embodiment.
  • the difference between the foregoing embodiment and the foregoing embodiment is that, in the embodiment, when the number of packets sent by the transmission network in the N packet loss period is obtained, different protocols of different operating systems for data packet encapsulation are considered. Therefore, before the total number of packets sent in each packet loss period is accumulated, the number of packets is divided into the number of bytes according to the encapsulation processing protocol of the operating system, and then accumulated for each packet loss period. The total number of bytes in the text.
  • the operating system handles the processing of TCP Payload. Take the Linux kernel version 2.6.32 as an example.
  • the application layer sends data to the protocol stack at the same speed as the TCP transmission data, that is, the protocol stack sends.
  • the buffer is received and sent the same.
  • Payload is packaged according to the size of the MSS.
  • TCP Payload is encapsulated according to 8192/ceil (8192/MSS) [Note: ceil is rounded up], and the final test result proves the error of such processing. It is acceptable.
  • the total number of bytes sent in all RTT packets is the total throughput of TCP during the entire operation phase.
  • the flow chart as shown in the figure, includes:
  • S901 Obtain a length of each sub-sub-period in a single packet loss period
  • calculating the RTT length of each packet sub-period in a single packet loss period is calculated by using the RTT duration expectation value and the RTT distribution model of each packet sub-period, and the RTT distribution model is usually retransmitted in each sub-period. The number of times the delay and the time delay are experienced.
  • S902 Accumulate the length of each of the packet sub-periods in a single packet loss period to obtain a total duration of the packet-issuing period in each packet loss period.
  • the length of each sub-packet period in a single packet loss period is calculated, and the total duration of the sub-packet period in a single packet loss period is calculated, and finally the method of superimposing the total lengths obtained by N is calculated. Calculate the total length of the packet sending period in the N packet loss period to calculate
  • FIG. 10 is a flowchart of calculating the total duration of a packet sending period in N packet loss periods according to the foregoing embodiment.
  • the method includes:
  • Steps S1001 and S1002 are the same as S901 and S902 in Fig. 9, so that the foregoing steps can be referred to, and no more praise is given.
  • the total length of the packet transmission sub-period in a single packet loss period in the N packet loss periods is accumulated, and the total packet transmission period in the N packet loss periods is obtained, which is used to calculate the throughput rate.
  • An advantage of this embodiment is that the step of calculating the total duration of the delivery period is clear and independent of the process parameters for calculating the total number of transmitted messages.
  • 11 is a flow diagram of another embodiment of calculating the total length of each of the packet sub-periods in a single packet loss period.
  • the unified accumulation method is used to calculate the function, and the function RTT (k) is obtained for the packet sending period.
  • the flow chart is shown in Figure 8.
  • the delay t until the end of the lost message retransmission, usually takes a time delay t of 200 ms.
  • the CWND m l at this time, enter the slow start phase (the process of TCP re-entry to start transmitting data).
  • the CWND grows according to the slow start phase and the congestion avoidance phase at startup, until the loss occurs.
  • the packet either reaches CWND_MAX, and the total duration of the delay, h*t (h is the number experienced by the delay), is counted in the total duration of the TCP transmission.
  • FIG. 12 is a flowchart of calculating the total length of the packet delivery period in the N packet loss periods according to the above embodiment shown in FIG.
  • each packet sub-period is a function of RTT (k)
  • the value of k starts from the first packet-sending period of the first packet loss period, and counts up to the last N-th packet loss period.
  • the total duration is obtained by accumulating all k RTT durations when the total duration is finally calculated.
  • the value of k starts from the first sub-sub-period of the first packet loss period, it counts up to the M-th sub-sub-period of the last N-th packet loss period, so the number of times that is subject to delay and withstand delay , may not be separately calculated in each packet sub-period, but is delayed from the first packet sub-cycle to the last one of the M-th packet sub-period in the N-th packet loss period, so that The calculation is more convenient.
  • the time delay can also be calculated separately, not as a limitation.
  • the total duration of the packet sending period in the N packet loss periods can be conveniently obtained, which is more convenient for software implementation.
  • Figure 13 is a general flow diagram for performing TCP throughput calculations in conjunction with the embodiment shown in Figures 12 and 9. It can be seen from FIG. 13 that the length of the packet sent in each of the single packet loss periods in the N packet loss periods calculated by the CUBIC congestion avoidance algorithm is counted, and then the operation is performed according to the operation. The encapsulation rules of the system are converted into the number of bytes, and the total number of bytes of the packets sent in the N packet loss periods of the transmission network is obtained.
  • the TCP throughput rate calculation method provided by the present invention can effectively calculate the TCP throughput rate, and can partially replace the method of using the tester/simulation scenario to obtain the TCP throughput rate in the network optimization field, compared with the prior art.
  • the tester builds a test environment flow test method in the live network environment, reducing test cycle and cost, reducing technical difficulty and reducing calculation error.
  • the present invention further provides a throughput rate obtaining device 140, the device comprising:
  • the packet number obtaining unit 141 is configured to obtain the number of packets sent by the transport network in multiple packet loss periods
  • the total duration acquisition unit 142 is configured to obtain a total length of the delivery period of the delivery period in the multiple packet loss periods
  • the ratio obtaining unit 143 is configured to obtain a ratio of the number of the packets to the total length of the packet as the throughput rate of the transmission network in the current network state.
  • RAM random access memory
  • ROM read only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other form of storage known in the art. In the medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明涉及一种吞吐率的获取方法和装置,所述方法包括:获取传输网络在多个丟包周期中发送报文的报文数;获取所述多个丟包周期中的发包周期的发包总时长;所述报文数与所述发包总时长的比值为所述传输网给在当前网络状态下的吞吐率。本发明实施例提供了一种吞吐率的获取方法,以计算实际网络环境下传输网络的吞吐率,从而避免纯理论推导的计算方法,减少吞吐率的计算误差。

Description

吞吐率的获取方法和装置 技术领域
本发明涉及互联网领域, 尤其涉及到一种吞吐率的获取方法和装置 , 背景技术
在网络传输数据的过程中, 通常需要对网络的传输效率, 也就是 TCP吞 吐率进行计算。
现有技术提供了一种 RENO算法, 其应用的传输过程如图 1所示, 图 1 中纵轴表示拥塞窗口 CWND, 横轴为往返时延 RTT。 那么假设随机丟包率为 p, 则在一次丟包实践中连续发送的报文个数相当于 l/p。
在图 1中, H殳 TCP的最大拥塞窗口为 W, 通常 TCP的初始拥塞窗口 为 W/2。 假设接收终端对接收到的每个报文都进行确认, 也就是发送 ACK。 TCP发送端的拥塞窗口每次增长 1 , 则每一轮 TCP拥塞窗口增长达最大拥塞 窗口 W所需的时间为 W/2, 经过 RTT轮才能达到 TCP最大拥塞窗口。 在此 轮过程中, 总共发送的报文数为:
Figure imgf000003_0001
每一轮出现丟包后, TCP拥塞窗口将降为 W/2; 因而每一轮所发送的报 文通过丟包 反推出: 1/p ( 2 ) , 将 1和 2联立, 得到:
Figure imgf000003_0002
将上述 TCP拥塞窗口公式代入 TCP吞吐率公式进行推导:
Figure imgf000004_0001
将上述公式中常数筒化为变量, 即 C= 。则上述 TCP吞吐率公式化筒 为如下:
Figure imgf000004_0002
根据不同的 ACK回应策和丟包模型, C取值不同。
该算法以基于 RENO的 TCP拥塞避免算法为基础进行分析,是一种纯理 论的推导方式, 在实际的网络环境中, 影响 TCP吞吐率的因素非常多。 如何 在计算 TCP吞吐率的时候, 更多考虑到实际网络环境的影响, 是本发明需要 解决的问题。 发明内容
本发明实施例提供一种吞吐率的计算方法,以解决现有 TCP吞吐率计算 方法因不考虑实际网络状况, 造成的误差较大的问题。
一方面, 本发明实施例提供了一种吞吐率的获取方法, 该方法包括: 获取传输网络在多个丟包周期中发送报文的报文数;
获取所述多个丟包周期中的发包周期的发包总时长;
所述报文数与所述发包总时长的比值为所述传输网络在当前网络状态下 的吞吐率。
另一方面, 本发明实施例提供一种吞吐率的获取装置, 该装置包括: 报文数获取单元, 用以获取传输网络在多个丟包周期中发送报文的报文 数;
总时长获取单元, 用以获取所述多个丟包周期中的发包周期的发包总时 长;
比值获取单元, 用以获取所述报文数与所述发包总时长的比值, 作为所 述传输网络在当前网络状态下的吞吐率。
本发明实施例提供了一种吞吐率的获取方法, 其对传输网络的整个传输 周期根据丟包事件发生的时间点划分多个丟包周期, 再根据传输网络的发包 特性将丟包周期进行细分为多个发包子周期,将不同丟包周期的吞吐量累加, 同时将发包子周期时长累加, 以计算实际网络环境下 TCP的吞吐率, 从而避 免纯理论推导的计算方法, 减少吞吐率的计算误差。 附图说明
图 1为现有技术采用 Reno算法计算吞吐率的网络示意图;
图 2为本发明实施例吞吐率获取方法的应用网络架构;
图 3是本发明实施例吞吐率的获取方法的流程图;
图 4是本发明另一实施例吞吐率的获取方法的流程图;
图 5是本发明实施例吞吐率的获取方法 S401的具体流程图;
图 5A是本发明实施例吞吐率的获取方法 S503的详细流程图;
图 5B是本发明实施例吞吐率的获取方法每个发包周期 RTT的传输过程 示意图;
图 6是本发明实施例吞吐率的获取方法 S501的详细流程图;
图 7是本发明实施例吞吐率的获取方法中获取 N次丟包周期中发送报文 的总数的流程图;
图 8是本发明实施例吞吐率的获取方法获取 N次丟包周期中服务器发送 报文的总数的另一实施状态的流程图;
图 9是本发明实施例吞吐率的获取方法获取 N个丟包周期中的单个丟包 周期中的发包子周期总时长的流程图; 图 10是本发明实施例吞吐率的获取方法获取 N个丟包周期中发包周期 的发包总时长的流程图;
图 11是本发明实施例吞吐率的获取方法中获取单个丟包周期中每个发包 子周期的长度的另一实施例的流程图;
图 12是本发明实施例吞吐率的获取方法获取 N个丟包周期中发包周期的 发包总时长的流程图;
图 13是本发明实施例吞吐率的获取方法获取吞吐率的总流程图; 图 14是本发明实施例获取 TCP吞吐率的装置的示意图。 具体实施方式
下面通过附图和实施例, 对本发明的技术方案做进一步的详细描述。 图 2是本发明实施例提供的吞吐率的获取方法的网络架构示意图。
如图所示, 具体包括发送端服务器 10和接收端服务器 20。
具体的, 发送端服务器 10用于发送报文, 该发送端服务器 10接入到互 联网中, 互联网中还接入至少一个接收服务器 20。 发送端服务器 10作为媒 体服务器通过 TCP协议发送媒体数据, 而接收端服务器 20则作为客户端从 互联网中接收发送端服务器 10发送的媒体数据。 在媒体服务的网络优化中, 通常需要测试网络的吞吐率, 也就是计算该网络每秒能处理的数据位数或分 组的数目。 吞吐率在性能测试中指单位时间内在网络上传输的数据量, 是衡 量网络性能的主要指标。 在图 2所示的应用架构中, 就是获取单位时间从发 送端服务器 10发送到任意一个接收端服务器 20的报文总数。 本发明提供的 实施例就是将从发送端服务器 10通过 TCP协议发送媒体数据报文的整个传 输周期根据丟包事件发生的时间点划分多个丟包周期, 再根据 TCP的发包特 性将丟包周期进行细分为多个发包周期, 将不同丟包周期的吞吐量累加, 同 时将发包周期时长累加, 以计算实际网络环境下 TCP的吞吐量, 从而避免纯 理论推导的计算方法, 减少吞吐率的计算误差。
上述架构是以 TCP传输协议为例, 但是实际应用中, 不应作为本发明实 施例提供的吞吐率获取方法的限制, 所属领域的技术人员应该理解, 本发明 实施例提供的吞吐率计算方法, 也能够应用在其他传输协议网络中。
图 3是本发明实施例提供的一种吞吐率的获取方法的流程图,由图可见, 该方法包括以下步骤:
在步骤 S301中, 获取传输网络在多个丟包周期中发送报文的报文数; 具体而言,所述的丟包周期是以两次丟包事件发生的时间点进行划分的, 发生两次丟包事件之间的时间差就是一个丟包周期, 也可以被称之为丟包事 件间隔。 在服务器发送报文的过程中会发生无数次丟包事件, 因此取 N个丟 包周期中服务器发送报文总数的目的就是采取尽可能多的方式,达到精确度。 N大于 1 , 为小于极限值的自然数, 取值越大, 则计算越精确。
在步骤 S302中, 获取所述多个丟包周期中的发包周期的发包总时长; 具体而言, 每个丟包周期又可以根据 TCP发包特性划分为多个发包周 期, 也可以称之为 RTT传输时延周期, 也就是一组报文从服务器发出到收到 接收服务器 ACK确认的时长。 将 N个丟包周期中每个 RTT周期的时长以极 限统计, 得出 N个丟包周期中发包周期的总时长。
之后,在步骤 S303中,所述报文数与所述发包总时长的比值为所述传输 网络在当前网络状态下的吞吐率。
具体而言, 在获取到出 N次丟包周期中服务器发送报文的总数和所述发 包周期的发包总时长之后, 将两者做除法, 所得的比值就是单位时间内此传 输网络的吞吐率。
在本实施例中, 步骤 S301和步骤 S302可以交叉同时进行计算, 并不影 响本实施例的效果。
通过上述实施例, 在实际的传输网络中对吞吐率进行计算, 因为考虑到 TCP丟包间隔的分布状况, 因此所得的结果比纯理论更精确。
图 4是本发明另一实施例进行 TCP吞吐率计算的方法流程图, 由图 4可 见, 该方法包括:
步骤 S401 , 获取传输网络在多个丟包周期中每个丟包周期中发送报文的 总数;
步骤 S402 , 将所述多个丟包周期中每个丟包周期中发送报文的总数累加 为传输网络在多个丟包周期中发送报文的报文数。
具体而言, 在服务器发送报文的过程中, 会有多个丟包周期, 每个丟包 周期中均会发送报文, 将多个丟包周期中的发送报文数目相加之后, 作为多 个丟包周期中服务器发送报文的总数。
步骤 S403, 获取所述多个丟包周期中的每个丟包周期中的发包子周期总 时长;
步骤 S404 , 将所述多个丟包周期中的每个丟包周期中的发包子周期总时 长累加为所述多个丟包周期中发包周期的发包总时长。
具体的, 在本实施例中, 所述的多个丟包周期取极限 N个, 以便于计算。 为求筒便, 以下均以 N个丟包周期作为描述之用。
上述的两个步骤, 可以在获取传输网络在 N个丟包周期中发送报文的总 数的过程同时进行。 也就是说在服务器发送报文的过程中, 会有多个丟包周 期, 每个丟包周期中均会发送报文, 每个丟包周期中发送报文必然耗费发包 子周期, 也就是 RTT, 因此将每个丟包周期中发送报文的总时长累加之后, 即为 N个丟包周期中发包周期的总时长。
步骤 S405 ,依据得到的传输网络在多个丟包周期中发送报文的报文数和 所述发包周期的发包总时长, 获取实际网络状态下该传输网络的吞吐率。
步骤 S405和前一实施例中步骤 S303相同, 因此不做过多描述, 所属领 域技术人员应该理解。 图 5是图 4中 S401的具体流程图, 由图 5可见, 所述获取传输网络在多 个丟包周期中每个丟包周期中发送报文的总数具体包括:
S501:计算 N个丟包周期中单个个丟包周期中 M个发包周期发送"¾文总 数 CWND;
S502:将单个丟包周期中的 M个发包子周期发送的报文总数 CWND求和, 得到∑ CWND;
S503: 获取一丟包周期中的发送报文总数阈值, 以作为判断是否进入下 一个丟包周期的参考值;
具体地, 可参考图 5A, 其为获取丟包周期中发送报文总数阈值的示意图。 其中, 丟包间隔模型可以任意选取, 例如泊松分布、 平均分布或者高斯分布 模型。 而丟包率 PLR可以是一次抓包过程的具体值, 也可以是统计多次之后 的平均值。 通过 PLR和丟包讲个模型计算出一个两次丟包周期之间发送报文 总数的参考值 P (n) , P (n) 随 N取值不同而不同, 该参考值 P (n)是用 来判断, 在计算每个丟包周期中发送报文总数时, 判断是否进入下个丟包周 期(下个丟包周期) 。
S504:将∑CWND和 P (n)做比较, 如果∑ CWND > Ρ (η) , 那么进入 下一个丟包周期, 以计算下一个丟包周期中的前 M个发包子周期发送 文总 数, 反之则继续计算当前丟包周期中多一个发包子周期的发送报文总数。
具体而言, 进入下一个丟包周期就是将 N加 1, 进行步骤 S505, 获取下 一个丟包周期中的前 M个发包子周期发送报文总数。 而计算当前丟包周期中 多一个发包子周期的发送报文总数, 则是将 M加 1, 计算当前丟包周期中多 一个发包子周期的发送报文总数∑CWNDM+1, 而 N不变, ∑CWNDM+1再与 Ρ (η) , 如此循环, 直到满足进入下个丟包周期的条件为止。
图 5B为每个发包子周期 RTT的传输过程参考图。 图 6为获取所述 N个 丟包周期中单个丟包周期中 M个发包子周期发送报文总数 CWND的详细过 程, 由图 6可见:
获取 N个丟包周期中单个丟包周期中 M个发包周期发送报文总数 CWND 的详细过程具体包括:
通过一次丟包事件的丟包总数、 丟包个数分布模型、 拥塞窗口最大值通过 避免算法计算所述 M 个发包子周期中每一个所述发包子周期的发送报文总 数。
根据 TCP拥塞避免算法的意义, 拥塞避免算法会计算每个发包子周期在 不同阶段的发送报文的个数即 CWND, 这些阶段可以分为: 慢启动阶段、 拥 塞避免阶段、 重传阶段、 平稳发送阶段, 在这些阶段都可能发生的丟包, 因 此需要分开考虑, 每个发包子周期 RTT的传输过程可参考图 5B。 根据不同 的阶段发生丟包数的不同, 拥塞避免算法会进行不同的重传动作, 可分为: 快速重传和考虑经受时延的重传。
下面以 Linux内核、 CUBIC算法为例,描述 TCP吞吐率获取方法的过程, 在慢启动阶段中, CUBIC算法和 RENO算法一致, 即 CWND从 1开始 增长到 16时是线性增长, 然后进入启动时的拥塞避免阶段;
在启动时的拥塞避免阶段中, CUBIC算法和 RENO算法一致, 即在上一 个发包子周期 RTT中收到 S个 ACK, 则下一个发包子周期 RTT发送的报文 数在上一个周期发送报文数的基础上加 S,这里是 Linux内核实现的方式, 因 为在计算时无法进行这样过程量的统计, 所以这里取一个定值便于计算, 即: 本次 RTT发送的报文数 CWND = 前一次 RTT发送报文总数 CWND,+ 前一次 RTT发送艮文总数 CWND73
当 RTT发送的报文数不小于 CWND_MAX时, 进入平稳发送阶段; 平稳发送阶段, 每个 RTT的 CWND等于 CWND_MAX。
以下筒单介绍一下 CWND_MAX, CWND_MAX是 TCP在传输时可以达 到的最大发包数即 CWND 的最大值。 在整个 TCP 传输过程中拥塞窗口 ( Congestion Window, CWND ) 不会无限增长, 到增长到一定阶段时, TCP 就进入平稳传输期。
在实际使用中, TCP的拥塞窗口大小 CWND受用户侧接收窗口 Window Size, 服务侧应用层限速 Rate_Limit以及物理带宽 Bandwidth的限制, 通常 CWND_MAX的取值为三者中的最小值, 即通过取最小值函数 min获取。
CWND—MAX: min {Window Size Rate—Limit* RTT/MSS Bandwidth * RTT/MSS}
拥塞窗口最大值 CWND_MAX用于对一个发包子周期内 RTT内最大发包 数做限制。
在上述计算中, 如物理带宽 Bandwidth * RTT/MSS是其中的最小值, 那 么当 CWND按照一定规则增长到 CWND_MAX时, 那么就可以判定此时会 因为拥塞而发生丟包事件。
接着介绍在当 RTT发送的报文数不小于 CWND_MAX时,进入平稳发送 阶段的情况。
在前述的三个阶段中发送丟包事件后, 进入重传阶段:
在重传阶段, 根据发生丟包事件时丟失报文的数量 b(n), 拥塞避免算法 会采用不同的降速和重传策略。 以 CUBIC算法为例, 在收到三个重复 ACK 后进行快速重传。
在 CUBIC算法下拥塞窗口增长的公式, 其规定了 TCP拥塞窗口的增长 规则, 公式 (1):
CWND=WT=(W +C*(t-K)3) ( 1 )
其中, C是一个扩展因子, t是自上次拥塞窗口减小(即上次丟包事件发 生)以来消逝的时间, Wmax 是上次拥塞窗口减少之前的拥塞窗口大小, K是 以上函数中 W。增加到 Wmax 的时间周期。 如果在此增长的期间不再丟包, 则 K 由公式 (2)计算:
Figure imgf000012_0001
其中, β是丟包事件发生后的乘性减少因子。 在 Linux内核中 C取值 0.4 , β取值 0.3。
依照 CUBIC算法拥塞窗口变化的公式, 我们可以得到在发生丟包后第 1 个发包周期 RTT进行重传报文的速度为:
W0=(l- β ) W 3 )
如果在这个 RTT 周期中因丟弃的报文过多而使得丟失的报文没有重传 完, 则在下个发包周期 RTT中, 重传报文的数量按照下面公式进行发送:
Wm=(l-P)Wm4 (4)
当在一个发包周期 RTT中的 CWNDm=Wm=l时,此时如果丟弃的报文还 没有重传完, 则之后的发包周期 RTT的 CWND=CWNDm=l, 并且每次发送 报文的时间间隔为一个经受时延 t, 直至丟失报文重传结束,通常一个经受时 延 t取值为 200ms。
在重传阶段, 当丟失的报文重传完毕时, 如果此时的 CWNDm >1, 那么 之后的 RTT的 CWND就按照下面公式增长:
CWNDm+g+1=Wg=(CWNDg+C*(g*RTT-K)3) ( g=>0 ) (5)
κ β^ΝΪ (6)
V c
当丟失报文重传完毕时, 如果此时 CWNDm=l, 那么 TCP重新进入启动 传送数据的流程, 进入慢启动阶段。 CWND按照慢启动阶段、 启动时的拥塞 避免阶段规则增长, 直至发生丟包或者达到 CWND_MAX, 而经受时延的总 时长 h* t ( h为经历经受时延的个数) 计入 TCP传输的总时长 Time。
在慢启动、 重传、 拥塞避免、 平稳传输阶段发生丟包时, 都按照重传阶 段规则进行处理。
在上述过程中, 从一个新的丟包事件开始、 每次发包周期 RTT计算获得 的 CWND之后,都将其计算本次丟包周期中的所有 CWND之和∑ CWND和 本次丟包周期发送报文总数期望值 Ρ(η)做比较:
如果∑CWND > P(n), 则进入下一个丟包周期, n加 1 , 重新计算丟包 间隔的发包总数参考值 P(n+1); m重置为 1 , 重新进行第 n+1个丟包周期中 发包周期 RTT个数的计数。
如果∑CWND < P(n), 则本次丟包周期未结束; m加 1 , 进行本次丟包周 期中 RTT个数的计数。
在上述实施例中,对于 TCP吞吐率的获取考虑到了 TCP传输不同阶段的 重传策略和传输窗口增长规则, 提高了对 TCP吞吐率计算与实际网络的结合 特性, 有助于减少误差。
图 7是依照上述实施例获取传输网络 N次丟包周期中发送报文的报文数 的流程图, 将每个丟包周期中发包总数累加, 即可得到 N次丟包周期中服务 器发送报文的总数,具体可将其转化为字节数之后,再用来计算 TCP吞吐率。
图 8是依据上述实施例获取 N次丟包周期中服务器发送报文的总数的另 一实施方式的流程图。
由图可见与上述实施例的区别是, 在本实施例中, 在获取传输网络 N次 丟包周期中发送报文的报文数时, 考虑到了不同的操作系统对于数据包封装 的协议不同, 因此在将每个丟包周期的发包总数累加之前, 先将其报文数按 照操作系统的封装处理协议将所述报文数分割为字节数, 再累加为每个丟包 周期中发送报文的总字节数。
操作系统对 TCP Payload的封装处理, 以 LINUX内核版本 2.6.32为例, 当 TCP的拥塞窗口达到 CWND_MAX后, 此时应用层向协议栈发送数据的 速度和 TCP发送数据速度相同, 即协议栈发送緩存接收和发送相同, 此时, 内核将以 8192byte大小的数据块为单位将数据送到 TCP协议栈, TCP再根据 MSS 进行分割后进行封装, 这就造成了在平稳发送期间不是每个报文都以 MSS进行封装, 以 MSS=1460为例, 此时的发送数据被分割成 5个 1460字 节和 1个 892字节。
因此在计算发送报文的字节数时需要考虑操作系统对 TCP Payload的封 装处理, 具体处理如下:
通过大量的测试和分析,对于 linux内核,在慢启动和拥塞避免阶段, TCP
Payload按照 MSS为大小进行封装。
当 CWND增长到不小于 CWND_MAX后, 为了筒单运算, 这里近似认 为 TCP Payload按照 8192/ceil(8192/MSS) [注: ceil为向上取整]为大小进行封 装, 最终测试结果证明这样处理的误差是可接受的。
所有 RTT中发送报文的总字节数就是 TCP在整个运算阶段的吞吐总量
Total Size。 的流程图, 由图可见, 其包括:
S901: 获取单个丟包周期中每个发包子周期的长度;
具体的, 计算单个丟包周期中每个发包子周期 RTT长度, 是通过每个发 包子周期 RTT时长期望值和 RTT分布模型计算得到, 通常 RTT分布模型采 虑每次发包子周期中, 因重传发生的经受时延和经受时延的次数。
S902: 将单个丟包周期中每个发包子周期的长度累加, 以得到每个丟包 周期中发包周期总时长。
在该实施例中, 是通过计算单个丟包周期中每个发包子周期的长度, 再 计算单个丟包周期中发包子周期总时长, 最后将 N个得到的总时长叠加的方 法进行计算得到所述 N个丟包周期中发包周期的发包总时长的方式, 来计算
TCP吞吐率。
图 10是依照上述实施例计算 N个丟包周期中发包周期的总时长的流程 图, 由图 8可见, 该方法包括:
步骤 S1001和 S1002与图 9中 S901和 S902相同,因此可参考前述步骤, 不多力口赞述。
在 S1003中,将 N个丟包周期中单个丟包周期中发包子周期总时长累加, 得到 N个丟包周期中发包周期的发包总时长, 用来计算吞吐率。
该实施例的优点是, 计算发包周期的总时长的步骤清晰, 与计算发送报 文总数的过程参数独立。
图 11是计算单个丟包周期中每个发包子周期的总长度的另一实施例的流 程图。 统一累加的方式进行计算, 给发包周期取函数 RTT ( k ) , k值从第一个丟包 周期的第一个发包周期开始计数为 k=l ,一直到第 N个丟包周期中的第 M个 发包周期 k=M1+M2+ ... ... MN, 将总时长计算和发包总数计算结合计算。 其流 程图如图 8所示。
当在一个发包周期 RTT中的 CWND =1时,此时如果丟弃的报文还没有 重传完, 则之后的发包周期 RTT的 CWND =1 , 并且每次发送报文的时间间 隔为一个经受时延 t, 直至丟失报文重传结束,通常一个经受时延 t取值为 200ms。
在重传阶段, 当丟失的报文重传完毕时, 如果此时的 CWNDm>l , 那么 之后的 RTT的 CWND就按照下面公式( 5 )增长:
当丟失报文重传完毕时,如果此时 CWNDm=l ,那么进入慢启动阶段( TCP 重新进入启动传送数据的流程) CWND按照慢启动阶段、 启动时的拥塞避免 阶段规则增长, 直至发生丟包或者达到 CWND_MAX, 而经受时延的总时长 h* t ( h为经历经受时延的个数 ) 计入 TCP传输的总时长 Time。
在慢启动、 重传、 拥塞避免、 平稳传输阶段发生丟包时, 都按照重传阶段 规则进行处理。
从一个新的丟包事件开始、 每次发包周期 RTT计算获得的 CWND后, 计 算本次丟包周期中的所有 CWND之和∑ CWND和本次丟包周期发送报文总 数参考值 P(n)做比较:
如果∑CWND > P(n), 则进入下一个丟包周期, n加 1 , 重新计算丟包周 期的发包总数阈值 P(n+1); k加 1 ,获取新的 RTT值 RTT(k+l); m重置为 1 , 重新进行本次丟包周期中发包周期 RTT个数的计数。
如果∑ CWND < P(n), 则本次丟包周期未结束; k加 1 , 获取新的 RTT 值 RTT(k+l); m加 1 , 进行本次丟包周期中 RTT个数的计数, 其中, RTT(k) 作为统计值, 属于 TCP传输时长的一部分。
图 12是依照图 11所示的上述实施例, 计算 N个丟包周期中发包周期的 发包总时长的流程图.
在图 12中可见, 由于每个发包子周期时长均以 RTT ( k ) 为函数, k取 值自第一个丟包周期的第一个发包周期开始, 一直计数到最后第 N个丟包周 期中的第 M个发包周期, 因此, 在最终计算总时长时, 将全部 k个 RTT时 长累加, 即可得到总时长。
由于 k取值自第一个丟包周期的第一个发包子周期开始, 一直计数到最 后第 N个丟包周期中的第 M个发包子周期,因此对于经受时延和经受时延的 次数, 也可以不再在每个发包子周期中单独计算, 而是从第一个发包子周期 开始累加到第 N个丟包周期中的第 M个发包子周期中的最后一个经受时延, 使得计算更加筒便。 但是, 经受时延也可另外单独计算, 不作为限制。
通过上述实施例, 可以方便的得到 N个丟包周期中发包周期的总时长, 对于软件实现更为筒便。
图 13是通过图 12和图 9所示的实施例结合进行 TCP吞吐率计算的总流 程图。 由图 13可见, 该实施例将用 CUBIC拥塞避免算法计算得到的传输网络 中 N个丟包周期中全部单个丟包周期中的每一个发包子周期发送的报文长度 进行统计之后, 再依据操作系统的封装规则转化为字节数, 求得传输网络 N 个丟包周期中发送的报文总字节数。
同时, 将每个所述丟包周期中的每一个发包子周期的时长, 结合因重传 造成的经受时延长度结合, 对 N个丟包周期中的总发包周期时长统计, 得到 总时长值, 将总字节数与总时长值求商, 即可得到 TCP吞吐率。
通过本发明提供的 TCP吞吐率的计算方法,可以有效的计算 TCP的吞吐 率,在网优领域可以部分替代采用测试仪 /模拟场景的方式获取 TCP吞吐率的 方式, 相比于现有技术采用测试仪在现网环境中搭建测试环境打流测试的方 法, 减少测试周期和成本, 降低技术难度, 减少计算误差。
此外, 如图 14所示, 本发明还提供了一种吞吐率的获取装置 140, 该装 置包括:
报文数获取单元 141 , 用以获取传输网络在多个丟包周期中发送报文的 报文数;
总时长获取单元 142, 用以获取所述多个丟包周期中的发包周期的发包 总时长;
比值获取单元 143, 用以获取所述报文数与所述发包总时长的比值, 作 为所述传输网络在当前网络状态下的吞吐率。
该装置的工作方式, 可参考前述关于方法实施例的描述, 不再做进一步 阐述。
专业人员应该还可以进一步意识到, 结合本文中所公开的实施例描述的 各示例的单元及算法步骤, 能够以电子硬件、 计算机软件或者二者的结合来 实现, 为了清楚地说明硬件和软件的可互换性, 在上述说明中已经按照功能 一般性地描述了各示例的组成及步骤。 这些功能究竟以硬件还是软件方式来 执行, 取决于技术方案的特定应用和设计约束条件。 专业技术人员可以对每 个特定的应用来使用不同方法来实现所描述的功能, 但是这种实现不应认为 超出本发明的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、 处理 器执行的软件模块, 或者二者的结合来实施。 软件模块可以置于随机存储器
( RAM ) 、 内存、 只读存储器(ROM ) 、 电可编程 ROM、 电可擦除可编程 ROM, 寄存器、 硬盘、 可移动磁盘、 CD-ROM, 或技术领域内所公知的任意 其它形式的存储介质中。
以上所述的具体实施方式, 对本发明的目的、 技术方案和有益效果进行 了进一步详细说明, 所应理解的是, 以上所述仅为本发明的具体实施方式而 已, 并不用于限定本发明的保护范围, 凡在本发明的精神和原则之内, 所做 的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1、 一种吞吐率的获取方法, 其特征在于, 所述方法包括:
获取传输网络在多个丟包周期中发送报文的报文数;
获取所述多个丟包周期中的发包周期的发包总时长;
所述报文数与所述发包总时长的比值为所述传输网络在当前网络状态下 的吞吐率。
2、 如权利要求 1所述的吞吐率的获取方法, 其特征在于, 所述获取传输 网络在多个丟包周期中发送报文的报文数具体包括:
获取所述多个丟包周期中每个丟包周期中发送报文的总数;
将所述多个丟包周期中每个丟包周期中发送报文的总数累加为所述传输 网络在多个丟包周期中发送报文的报文数。
3、 如权利要求 2所述的吞吐率的获取方法, 其特征在于, 所述获取所述 多个丟包周期中每个丟包周期中发送报文的总数具体包括: 包子周期发送报文总数;
计算每个丟包周期中的发送报文总数阈值;
当所述部分发包子周期发送报文总数之和不小于所述发送报文总数阈值 时, 进入下一个丟包周期。
4、 如权利要求 3所述的吞吐率的获取方法, 其特征在于, 所述获取所 送报文总数具体包括;
利用一次丟包时间的丟包个数、 拥塞窗口最大值通过拥塞避免算法获取 发送报文总数。
5、 如权利要求 3所述的吞吐率的获取方法, 其特征在于, 所述获取所 送报文总数进一步包括:
将所述部分发包子周期中发送的报文数按照操作系统的封装处理协议将 所述报文数分割为字节数, 再累加为多个丟包周期中每个丟包周期中发送报 文的总字节数。
6、 如权利要求 1所述的吞吐率的获取方法, 其特征在于, 所述获取所述 多个丟包周期中的发包周期的发包总时长具体包括:
获取所述多个丟包周期中的每个丟包周期中的发包子周期总时长; 将所述多个丟包周期中的每个丟包周期中的发包子周期总时长累加为所 述多个丟包周期中发包周期的发包总时长。
7、 如权利要求 6所述的吞吐率的获取方法, 其特征在于, 所述获取所述 多个丟包周期中的每个丟包周期中的发包子周期总时长具体包括:
获取所述每个丟包周期中部分发包子周期中每一个发包子周期时长; 将所述部分发包子周期中每个发包子周期的时长累加为所述多个丟包周 期中的每个丟包周期中的发包子周期总时长。
8、 如权利要求 7所述的吞吐率的获取方法, 其特征在于, 获取所述每个 丟包周期中部分发包子周期中每一个发包子周期时长进一步包括:
依据发包周期时长期望值和发包周期时长分布模型获取单个发包子周期 的时长。
9、 如权利要求 7所述的吞吐率的获取方法, 其特征在于, 所述部分发包 子周期中每一个发包子周期时长还包括在此发包周期中因丟包重传根据协议 产生的时延。
10、 如权利要求 4所述的吞吐率的获取方法, 其特征在于, 在所述利用 一次丟包事件的丟包个数、 拥塞窗口最大值, 通过拥塞避免算法获取所述多 文总数中, 所述拥塞窗口最大值为服务器侧限速值、 物理带宽以及接收窗口 换算后的三者中的最小值。
11、 如权利要求 4所述的吞吐率的获取方法, 其特征在于, 所述用一次 丟包事件的丟包个数依据丟包个数分布模型和一次丟包事件的丟包个数期望 值获得。
12、 如权利要求 10所述的吞吐率的获取方法, 其特征在于, 当拥塞窗口 超过所述物理带宽时, 判断此时发生单个丟包周期内的丟包事件。
13、 一种吞吐率的获取装置, 其特征在于, 所述装置包括:
报文数获取单元, 用以获取传输网络在多个丟包周期中发送报文的报文 数;
总时长获取单元, 用以获取所述多个丟包周期中的发包周期的发包总时 长;
比值获取单元, 用以获取所述报文数与所述发包总时长的比值, 作为所 述传输网络在当前网络状态下的吞吐率。
14、 如权利要求 13所述的吞吐率的获取装置, 其特征在于, 所述报文获 取单元具体用于:
获取所述多个丟包周期中每个丟包周期中发送报文的总数;
将所述多个丟包周期中每个丟包周期中发送报文的总数累加为所述传输 网络在多个丟包周期中发送报文的报文数。
15、 如权利要求 13所述的吞吐率的获取装置, 其特征在于, 所述总时长 获取单元具体用于:
获取所述多个丟包周期中的每个丟包周期中的发包子周期总时长; 将所述多个丟包周期中的每个丟包周期中的发包子周期总时长累加为所 述多个丟包周期中发包周期的发包总时长。
PCT/CN2013/070192 2012-06-15 2013-01-08 吞吐率的获取方法和装置 WO2013185480A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210197594.0 2012-06-15
CN2012101975940A CN102694736A (zh) 2012-06-15 2012-06-15 吞吐率的获取方法和装置

Publications (1)

Publication Number Publication Date
WO2013185480A1 true WO2013185480A1 (zh) 2013-12-19

Family

ID=46860025

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/070192 WO2013185480A1 (zh) 2012-06-15 2013-01-08 吞吐率的获取方法和装置

Country Status (2)

Country Link
CN (1) CN102694736A (zh)
WO (1) WO2013185480A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102694736A (zh) * 2012-06-15 2012-09-26 华为技术有限公司 吞吐率的获取方法和装置
CN103401635A (zh) * 2013-06-28 2013-11-20 国家超级计算深圳中心(深圳云计算中心) 集群存储系统中吞吐量塌陷行为的分析方法及装置
CN104378307B (zh) * 2014-10-27 2017-11-21 北京华夏创新科技有限公司 基于吞吐率和丢包控制cwnd的优化方法和系统
CN105207954B (zh) * 2015-08-25 2018-03-20 东软集团股份有限公司 发送数据包和吞吐量测试方法及装置
CN114793302B (zh) * 2022-03-09 2022-10-14 广州狮威能源技术有限公司 一种即时插拔的无线传输计量分析系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852147A (zh) * 2005-09-19 2006-10-25 华为技术有限公司 一种实现业务吞吐率统计的方法及系统
CN101114982A (zh) * 2006-07-24 2008-01-30 互联天下科技发展(深圳)有限公司 一种基于IP网络的音视频QoS算法
CN101359979A (zh) * 2008-08-01 2009-02-04 中国联合通信有限公司 一种基于终端的链路丢包率控制方法及系统
CN102694736A (zh) * 2012-06-15 2012-09-26 华为技术有限公司 吞吐率的获取方法和装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100841296B1 (ko) * 2001-07-10 2008-06-25 엘지전자 주식회사 무선 패킷 통신 시스템에서의 공유 채널 스케줄러 장치 및그를 이용한 공유채널 스케줄링 방법
CN100448205C (zh) * 2006-05-15 2008-12-31 西安西电捷通无线网络通信有限公司 通过主动式测量和被动式测量共同采集ip网络性能的方法
CN101808016B (zh) * 2010-03-02 2012-12-26 河海大学常州校区 IPv6下DiffServ区域端到端网络性能的快速测量方法及系统
CN101977151B (zh) * 2010-11-09 2012-10-03 中南大学 一种用于高丢包率广域网环境下的拥塞控制方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852147A (zh) * 2005-09-19 2006-10-25 华为技术有限公司 一种实现业务吞吐率统计的方法及系统
CN101114982A (zh) * 2006-07-24 2008-01-30 互联天下科技发展(深圳)有限公司 一种基于IP网络的音视频QoS算法
CN101359979A (zh) * 2008-08-01 2009-02-04 中国联合通信有限公司 一种基于终端的链路丢包率控制方法及系统
CN102694736A (zh) * 2012-06-15 2012-09-26 华为技术有限公司 吞吐率的获取方法和装置

Also Published As

Publication number Publication date
CN102694736A (zh) 2012-09-26

Similar Documents

Publication Publication Date Title
US7908393B2 (en) Network bandwidth detection, distribution and traffic prioritization
US20210203578A1 (en) Round-Trip Time Evaluation System, Method, and Apparatus
Zhang et al. On mitigating TCP incast in data center networks
US9838318B2 (en) TCP congestion control for large latency networks
US9467390B2 (en) Method and device for data transmission
CN108353032B (zh) 用于网络上的基于速率的分组传输的系统和方法
WO2013185480A1 (zh) 吞吐率的获取方法和装置
CN106936730B (zh) 一种报文发送方法、tcp代理以及tcp客户端
Huh et al. RUDP design and implementation using OPNET simulation
CN113438180B (zh) Udp数据包的传输控制方法、装置、设备及可读存储介质
Yaakob et al. Performance analysis of optimal packet size for congestion control in wireless sensor networks
CA2940077C (en) Buffer bloat control
CN111314961A (zh) Tcp传输方法、装置和系统
CN112351049B (zh) 数据传输方法、装置、设备及存储介质
WO2011048740A1 (ja) データ伝送システム、送信速度制御方法、受信端末、送信端末
JP7123194B2 (ja) データ送信方法、送信デバイス、データ受信方法、および受信デバイス
JP5128556B2 (ja) トラヒック情報収集装置、トラヒック情報収集方法およびそのプログラム
JP2004140596A (ja) Tcp上のデータ転送における品質を推定する方法およびシステム
US9882751B2 (en) Communication system, communication controller, communication control method, and medium
WO2024109734A1 (zh) 数据传输方法、装置、电子设备及存储介质
Su et al. RTT estimation with sampled flow data
Zhao Analysis of influencing factors for TCP throughput
Holman et al. The effect of round trip time on competing TCP flows
Lin et al. Modeling multiple TCP connections established between a busy server and many receivers
CN116266826A (zh) 一种分布式机器学习的网络优化系统、方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13803461

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13803461

Country of ref document: EP

Kind code of ref document: A1