CN105591843A - Network performance detection method and system based on receiving end in TCP transmission stream - Google Patents

Network performance detection method and system based on receiving end in TCP transmission stream Download PDF

Info

Publication number
CN105591843A
CN105591843A CN201610083046.3A CN201610083046A CN105591843A CN 105591843 A CN105591843 A CN 105591843A CN 201610083046 A CN201610083046 A CN 201610083046A CN 105591843 A CN105591843 A CN 105591843A
Authority
CN
China
Prior art keywords
window
order
rtt
considered
receiving terminal
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201610083046.3A
Other languages
Chinese (zh)
Other versions
CN105591843B (en
Inventor
魏晓宇
邓茜
武庆华
李振宇
谢高岗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Yinglian Information Technology Co ltd
Original Assignee
Institute of Computing Technology of CAS
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 Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CN201610083046.3A priority Critical patent/CN105591843B/en
Publication of CN105591843A publication Critical patent/CN105591843A/en
Application granted granted Critical
Publication of CN105591843B publication Critical patent/CN105591843B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The invention discloses a network performance detection method and system based on a receiving end in a TCP transmission stream. The method comprises the steps that: 1, the receiving end obtains head information of a data packet when receiving or sending each data packet so as to obtain TCP transmission parameters; 2, the receiving end judges the current state of a TCP according to the TCP transmission parameters, if the state is normal, a step 3 is executed, and if the state is out of order, a step 4 is executed; 3, network performance detection is carried out according to a normal state decision tree; and 4, the network performance detection is carried out according to an out-of-order decision tree. According to the invention, the method can be independently carried out by the receiving end, the performance of a front end server is not influenced, and the performance problem and link state problem of a sending end can be diagnosed; and furthermore, precise reference information can be provided for the optimization of the TCP protocol, and the performance improvement of the reliable transmission protocol is facilitated.

Description

Network performance detection method based on receiving terminal in TCP MPTS and system
Technical field
Technical field of the present invention is computer network, particularly relate to a kind of in TCP MPTS based on connecingReceiving end is carried out the method and system of diagnosis and detection to network performance.
Background technology
For the Internet Content Provider that has moved hundreds and thousands of servers, monitoring and diagnosis TCPPerformance is a problem routinizing. And design realizes an instrument that detects TCP performance and has two challenges greatly:Obtaining of the one, TCP performance indications must be monitored TCP stream, although many TCP variablees canFrom the kernel of front-end server, obtain, but directly from kernel, print relevant parameter can bring unnecessaryExpense, affects server performance; The 2nd, TCP two ends do not have directly visible to the other side's eventProperty.
Nowadays along with popularizing gradually that cloud is applied, the demand of carrying out network diagnosis at receiving terminal is increasing. ExampleAs for cloud dish, user often uses upload function, and now user is exactly as transmitting terminal, and cloud clothesBe engaged in device as receiving terminal, problem when this time, Cloud Server just needed to diagnose out network performance poorPlace. And for receiving terminal, its information that can obtain can be few a lot of than transmitting terminal, because it can notKnow the sending order of packet, thereby can not directly judge the problem of transmitting terminal or network linkProblem, the packet that receives of can only paddling one's own canoe is added up and estimate analysis is inferred problem place.
Summary of the invention
The invention provides network performance detection method and system based on receiving terminal in a kind of TCP MPTS,For at TCP/IP network, carry out the diagnosis and detection to network performance based on receiving terminal.
Further, the present invention classifies problem, navigates to particular problem by different Rule of judgment,And then infer different diagnostic results.
Further, the present invention, by receiving packet at receiving terminal, extracts head from this packetIn the parameter useful to analyzing and diagnosing, infer problem place. Method of the present invention can be separately at receiving terminalOperation, does not affect front-end server performance. The present invention can diagnose out at receiving terminal the performance issue of transmitting terminalAnd Link State problem.
For addressing the above problem, the invention discloses the network performance based on receiving terminal in a kind of TCP MPTSDetection method, comprising:
Step 1, receiving terminal, in the time receiving or send each packet, obtains the header information of this packet,To obtain TCP transformation parameter;
Step 2, this receiving terminal judges the current status of TCP based on this TCP transformation parameter, if inNormal condition, execution step 3, if in out of order state, execution step 4;
Step 3, according to a normal condition decision tree to carry out network performance detection;
Step 4, according to an out of order state decision tree to carry out network performance detection.
This TCP transformation parameter comprises:
Total number of data packets pkt_cnt, receiving terminal that the state ca_state of TCP, receiving terminal are received are sent outThe sequence number of the total ack msg bag number ack_cnt sending, the bag that the receiving terminal next one need to be receivedThe duration disorder_time of rcv_nxt, current out of order process, out of order process total timeThe total time total_time of all_disorder_time, stream transmission procedure, out of order length reordering,While there is the reception of the number of times lost_out_num of the out of order process of packet loss, twice normal transmission packetBetween window size first_window in interval interval, a RTT, at first_windowWindow size second_window after N RTT, send moment TSval, the reception of current bagTo the TSval value TSecr of a upper bag in one or more.
This normal condition decision tree further comprises:
The moment that current data packet is received in judgement receives with last whether the difference in the moment of packet is greater thanOne time threshold, if so, the data that are considered as transmitting terminal are unavailable, or the buffering area of transmitting terminal is too little.
This normal condition decision tree further comprises: judge second_window – first_window≤Whether window_thres sets up;
If so, being considered as transmitting terminal window in the situation that of normal transmission packet increased slow;
Second_window is the window size in the 2nd RTT, and first_window is in a RTTWindow size, window_thres is a window threshold value, the 2nd RTT lags behind a RTT, the 2nd RTTAnd a N RTT in interval between a RTT, N is positive integer.
Window_thres=k*N, k is threshold value coefficient.
This step 3 further comprises: calculate RTT according to TCP transformation parameter; Calculate the window in a RTTMouth size; Calculate first_window < set_window and second_window < set_windowWhether set up simultaneously; Judge that second_window – first_window≤window_thres isNo establishment, if set up, is considered as transmitting terminal window in the situation that of normal transmission packet and increased slow; ItsIn, set_window is the maximum window size under nominated bandwidth.
This out of order state decision tree further comprises:
Judge whether pkt_cnt/ack_cnt equals M, 1.8≤M≤2.2; If so, be considered as receiving terminalOpen delayed ACK option, if not, be considered as receiving terminal and do not open delayed ACK option; Pkt_cnt isTotal number of data packets that receiving terminal is received, ack_cnt is total ack msg bag number that receiving terminal sends.
This out of order state decision tree further comprises:
Calculate RTT according to two packets that receive continuously, an accumulation specific quantity RTT forms a RTTSet, calculates maximum in this RTT set and the difference of minimum of a value, judges whether this difference is greater than oneDithering threshold, if so, is considered as this link and has RTT shake, if not, is considered as network normal.
This out of order state decision tree further comprises:
Calculate the number of the out of order packet receiving continuously in same RTT, as out of order length, continuouslyOut of order length while calculating each out of order generation, and therefrom find out maximum out of order length, when the out of order length of this maximumWhen degree is greater than a length threshold, the out of order rate that is considered as current link is higher, otherwise it is normal to be considered as current network.
This out of order state decision tree further comprises:
Whether the duration disorder_time that judges current out of order process is greater than a RTT, if not,Be considered as current link and do not have packet loss, if so, be considered as current link and have packet loss, continue to judge out of order mistakeWhether the ratio of the total time total_time of journey total time all_disorder_time and stream transmission procedureBe greater than a packet loss threshold value, if so, be considered as link and there is higher packet loss, if not, judge in transmissionIn process, whether exist the duration length of certain out of order process and the ratio of RTT to be greater than a specific threshold,If so, the ability that is considered as the fast quick-recovery of transmitting terminal a little less than, if not, the packet loss that is considered as link is not high.
The invention also discloses the network performance detection system based on receiving terminal in a kind of TCP MPTS, bagDraw together:
Acquisition module, in order to making receiving terminal in the time receiving or send each packet, obtains this packetHeader information, to obtain TCP transformation parameter;
Judge module, in order to make this receiving terminal judge the current status of TCP based on this TCP transformation parameter,If in normal condition, call normal condition detection module, if in out of order state, call out of order shapeState detection module;
Normal condition detection module, in order to according to a normal condition decision tree to carry out network performance detection;
Out of order block of state, in order to according to an out of order state decision tree to carry out network performance detection.
This TCP transformation parameter comprises:
Total number of data packets pkt_cnt, receiving terminal that the state ca_state of TCP, receiving terminal are received are sent outThe sequence number of the total ack msg bag number ack_cnt sending, the bag that the receiving terminal next one need to be receivedThe duration disorder_time of rcv_nxt, current out of order process, out of order process total timeThe total time total_time of all_disorder_time, stream transmission procedure, out of order length reordering,While there is the reception of the number of times lost_out_num of the out of order process of packet loss, twice normal transmission packetBetween window size first_window in interval interval, a RTT, at first_windowWindow size second_window after N RTT, send moment TSval, the reception of current bagTo the TSval value TSecr of a upper bag in one or more.
This normal condition decision tree further comprises:
The moment that current data packet is received in judgement receives with last whether the difference in the moment of packet is greater thanOne time threshold, if so, the data that are considered as transmitting terminal are unavailable, or the buffering area of transmitting terminal is too little.
This normal condition decision tree further comprises: judge second_window – first_window≤Whether window_thres sets up;
If so, being considered as transmitting terminal window in the situation that of normal transmission packet increased slow;
Second_window is the window size in the 2nd RTT, and first_window is in a RTTWindow size, window_thres is a window threshold value, the 2nd RTT lags behind a RTT, the 2nd RTTAnd a N RTT in interval between a RTT, N is positive integer.
Indow_thres=k*N, k is threshold value coefficient.
This normal condition detection module further comprises:
Calculate the module of RTT according to TCP transformation parameter; Calculate the module of the window size in a RTT;Calculate first_window < set_window and second_window < set_window whether togetherThe module of Shi Chengli; Judge that second_window – first_window≤window_thres isThe module of no establishment, if set up, is considered as transmitting terminal window in the situation that of normal transmission packet and increasedSlowly; Wherein, set_window is the maximum window size under nominated bandwidth.
This out of order state decision tree further comprises:
Judge whether pkt_cnt/ack_cnt equals M, 1.8≤M≤2.2;
If so, be considered as receiving terminal and opened delayed ACK option, if not, be considered as receiving terminal and do not open and prolongACK option late;
Pkt_cnt is total number of data packets that receiving terminal is received, ack_cnt is the total of receiving terminal transmissionAck msg bag number.
This out of order state decision tree further comprises:
Calculate RTT according to two packets that receive continuously, an accumulation specific quantity RTT forms a RTTSet, calculates maximum in this RTT set and the difference of minimum of a value, judges whether this difference is greater than oneDithering threshold, if so, is considered as this link and has RTT shake, if not, is considered as network normal.
This out of order state decision tree further comprises:
Calculate the number of the out of order packet receiving continuously in same RTT, as out of order length, continuouslyOut of order length while calculating each out of order generation, and therefrom find out maximum out of order length, when the out of order length of this maximumWhen degree is greater than a length threshold, the out of order rate that is considered as current link is higher, otherwise it is normal to be considered as current network.
This out of order state decision tree further comprises:
Whether the duration disorder_time that judges current out of order process is greater than a RTT, if not,Be considered as current link and do not have packet loss, if so, be considered as current link and have packet loss, continue to judge out of order mistakeWhether the ratio of the total time total_time of journey total time all_disorder_time and stream transmission procedureBe greater than a packet loss threshold value, if so, be considered as link and there is higher packet loss, if not, judge in transmissionIn process, whether exist the duration length of certain out of order process and the ratio of RTT to be greater than a specific threshold,If so, the ability that is considered as the fast quick-recovery of transmitting terminal a little less than, if not, the packet loss that is considered as link is not high.
The present invention can carry out diagnosis and detection identification to several situations in network, comprising: 1, transmitting terminalData buffering area unavailable or transmitting terminal too small; 2, transmitting terminal is in the feelings of normal transmission packetUnder condition, window increased slow; 3, receiving terminal has been opened delayed ACK option; 4, there is RTT in current linkShake; 5, the out of order rate of current link is higher; 6, the ability of the fast quick-recovery of transmitting terminal a little less than.
The present invention can isolated operation at receiving terminal, do not affect front-end server performance, diagnose out transmitting terminalPerformance issue and Link State problem. And then the optimization that can be Transmission Control Protocol provides accurate reference information,Be convenient to the performance boost of reliable transport protocol.
Brief description of the drawings
Figure 1 shows that the network performance detection method based on receiving terminal in a kind of TCP MPTS of the present inventionSchematic flow sheet.
Figure 2 shows that the schematic diagram of normal condition decision tree of the present invention.
Figure 3 shows that the schematic diagram of out of order state decision tree of the present invention.
Figure 4 shows that the schematic flow sheet of step 41 of the present invention
Figure 5 shows that the schematic flow sheet of step 42 of the present invention.
Figure 6 shows that the schematic flow sheet of step 43 of the present invention.
Figure 7 shows that the schematic flow sheet of step 44 of the present invention.
Detailed description of the invention
Illustrate implementation procedure of the present invention below in conjunction with accompanying drawing, not as limitation of the present invention.
The present invention, by the trace analysis of the parameters to TCP MPTS, utilizes a kind of decision tree design realShow in TCP/IP network the diagnostic method to network performance based on receiving terminal. Be illustrated in figure 1 thisThe schematic flow sheet of the network performance detection method based on receiving terminal in bright a kind of TCP MPTS.
In TCP/IP network, TCP MPTS transmits between transmitting terminal and receiving terminal. TCP MPTSComprise a series of packet, each packet carries multiple transformation parameter. In transmitting procedure, mayPacket drop occurs, and also packet loss but entanglement has occurred the transmission sequence of packet not, receives terminationThe order of receiving packet is not identical with the order that transmitting terminal sends packet, has occurred out of order.
In the present invention, first definition has two states: one is normal condition open_state, receivesThe order that termination is received packet is identical with the order that transmitting terminal sends packet, and packet is continuous, notReceive out of order packet. Another kind is out of order state disorder_state, and receiving terminal receives and do not connectContinuous packet and do not return to normal condition. The default conditions of receiving terminal are normal conditionopen_state。
In the solution of the present invention, step 1, receiving terminal, in the time receiving or send each packet, obtains thisThe header information of packet, to obtain TCP transformation parameter.
Step 2, this receiving terminal judges the current status of TCP based on this header information, if in normallyState, execution step 21, if in out of order state, execution step 22;
Step 21, judges the current transition status condition that whether meets, and if so, TCP transfers out of order state to,Execution step 4, if not, execution step 3;
Step 22, judges the current transition status condition that whether meets, and if so, TCP transfers normal condition to,Execution step 3, if not, execution step 4;
Step 3, according to a normal condition decision tree to carry out network performance detection;
Step 4, according to an out of order state decision tree to carry out network performance detection.
When the present invention often receives a packet at receiving terminal, all carry out above-mentioned steps 1-4.
Specifically, for step 1, main TCP transformation parameter is as shown in the table:
Parameter Meaning
ca_state The state of TCP: open_state, disorder_state
pkt_cnt Total number of data packets that receiving terminal is received
ack_cnt Total ack msg bag number that receiving terminal sends
rcv_nxt The sequence number of the bag that the receiving terminal next one need to be received
disorder_time The duration of current out of order process
all_disorder_time All out of order process total times in out of order state in stream
total_time The total time of stream transmission procedure
reordering Out of order length
lost_out_num There is the number of times of the out of order process of packet loss
interval The time of reception interval of twice normal transmission packet
first_window Window size in a RTT (Round-TripTime: round-trip delay)
second_window Window size at first_window after certain RTT
TSval Send the moment of current bag
TSecr The TSval value of the upper bag receiving
TCP transformation parameter also comprises that receiving terminal is the sequence number that the each packet received is set up, and receives every numberAccording to moment etc. of bag.
Step 21,22 relates to the transfer process of two states of the present invention.
In step 21, transition status condition comprises: judge current data packet (the current data that receiveBag) sequence number whether be greater than rcv_nxt (sequence number of the bag that need to receive of the receiving terminal next one). LogicalUnder normal normal condition, the continuous order of packet sends, the sequence number of the bag that the receiving terminal next one need to be receivedShould equal the sequence number of current data packet. Be judged as YES if above-mentioned, illustrate that receiving terminal current data packet isIndividual discontinuous bag, non-sequential delivery, is out of order packet. So TCP transfers out of order state toDisorder_state. If the judgment is No, still keep normal condition open_state.
In step 22, transition status condition comprises: whether the sequence number that judges current data packet equalsRcv_nxt, in out of order state disorder_state, if so, illustrates receiving terminal due to currentReceived bag according to the order of sequence, TCP reverts to normal condition open_state, if not, still keepsOut of order state disorder_state.
In another embodiment, transition status condition can also comprise: judge what current data packet was repliedACK sequence number whether be more than or equal to current number of accumulating all packets of receiving. If so, sayBright receiving terminal has been received bag according to the order of sequence, and TCP reverts to normal condition open_state.
Be illustrated in figure 2 the schematic diagram of normal condition decision tree.
For step 3, the present invention can, in normal condition open_state, enter two kinds of network performancesRow detects. This normal condition decision tree further comprises:
Step 31, the moment time of current data packet and receiving the moment of a upper packet are received in judgementWhether the difference (time-interval_start_time) of interval_start_time is greater than for the momentBetween threshold value time_thres;
If so, the data that are considered as transmitting terminal are unavailable, or the buffering area of transmitting terminal is too little, if not, sayBright network is normal.
Only the excessive appearance in the interval between twice transmission sends while pause, just can cause between packet receptionEvery excessive, thereby judged: the excessive TCPstall (TCP pause) that occurred in transmission interval of transmitting terminal,And that possible reason is exactly the data buffering area unavailable or transmitting terminal of transmitting terminal is too small.
Thus, can, in the case of the normal work that does not affect transmitting terminal, detect net in receiving terminal one sideThe problem existing in network. Step 31 and step 32 are executed in parallel.
Whether step 32, judge second_window – first_window≤window_thresSet up;
If so, be considered as transmitting terminal window in the situation that of normal transmission packet increased slow, if not,Illustrate that network is normal.
Second_window is the window size in the 2nd RTT, and first_window is in a RTTWindow size, window_thres is a window threshold value, the 2nd RTT lags behind a RTT, the 2nd RTTAnd a N RTT in interval between a RTT, N is positive integer.
And for the specific implementation of step 3, particularly for this part normal condition decision-making of step 32The specific implementation of tree comprises:
Step 321, calculates RTT.
If the timestamp in current TCP MPTS support TCPoption (tcp option) (timeBetween stamp) option, so just can utilize timestamp to calculate the RTT of recent renewal.
Open after timestamp option, in TCP head, can carry two value: TSval and TSecr.What TSval represented is sends moment of current bag, the TSval of the upper bag that what TSecr represented is receivesValue, the meaning is the echo time.
RTT=TSval–TSecr
If do not open timestamp option, the calculating of RTT just can be according to traditional order of using soThe method that row number calculate is calculated RTT.
Step 322, calculates the window size in a RTT.
Because the duration of RTT is known, receive successively packet according to receiving terminal, can count at oneThe number of data packets that can receive in RTT, the send window that this number of data packets equals current transmitting terminal is largeLittle, the namely window size in a RTT.
Utilize aforesaid way, calculate after the first_window for first RTT, the N of being separated byIndividual RTT, N is positive integer, again utilizes aforesaid way to calculate for second RTT'sSecond_window. This N RTT of being separated by is that the growth in order to make window is embodied.
Step 323, calculating first_window < set_window and second_window <Whether set_window sets up simultaneously.
Set_window is the maximum window size of calculating under nominated bandwidth BandWidth, existsThe maximum message segment number that can transmit in a RTT, its computational methods are:set_window=BandWidth*RTT*1000000/(8*1500)。
If set up simultaneously, mean in current TCP MPTS and do not have packet loss, execution step 324.
Whether step 324, judge second_window – first_window≤window_thresSet up.
Wherein, window_thres=k*N, k is threshold value coefficient, N is the 2nd RTT and a RTTBetween the number of RTT at interval. K is adjustable parameter, for example congestion avoidance phase in TCPRENO algorithmOften just window is increased to 1 through a RTT, k=1 in this case; Other algorithms are looked concrete condition and are adjustedWhole, all in open scope of the present invention.
For step 4, the present invention can be in out of order state disorder_state, to four kinds of internetworkingsCan detect. Be illustrated in figure 3 the schematic diagram of out of order state decision tree of the present invention. Under out of order state,This out of order state decision tree further comprises the decision branch of four parallel executions:
Step 41, judges whether pkt_cnt/ack_cnt equals M, 1.8≤M≤2.2;
If so, be considered as receiving terminal and opened delayed ACK option, if not, be considered as receiving terminal and do not open and prolongACK option late;
Wherein, pkt_cnt is total number of data packets that receiving terminal is received, ack_cnt is that receiving terminal sendsTotal ack msg bag number, conventionally delayed ACK option is every ACK of a Packet GenerationPacket. Easily there is error of transmission in the too many packet in interval, so conventionally do not select interval more than three times.M preferably 2, only has pkt_cnt/ack_cnt to be approximately equal at 2 o'clock, can judge that receiving terminal has been opened to prolongACK option late.
Be illustrated in figure 4 the schematic flow sheet of step 41 of the present invention. Figure 5 shows that step of the present invention42 schematic flow sheet.
Step 42, calculates RTT, an accumulation specific quantity RTT according to two packets that receive continuouslyForm a RTT set, calculate maximum in this RTT set and the difference of minimum of a value, judge that this difference isNoly be greater than a dithering threshold, if so, be considered as this link and have RTT shake, if not, be considered as netNetwork is normal.
Wherein, calculate a RTT for two packets of receiving continuously. Can be n, a n+1 dataBag calculates a RTT, and n+2, a n+3 packet calculates a RTT, and every two packets calculate a RTT,Also can be that n, a n+1 packet calculates a RTT, n+1, a n+2 packet calculates a RTT,Two packets that are arbitrary neighborhood calculate a RTT, also can calculate a RTT, root every several packetsDetermine according to demand.
Be illustrated in figure 6 the schematic flow sheet of step 43 of the present invention.
Step 43, calculates the number of the out of order packet receiving continuously in same RTT, as out of orderLength, calculates each out of order out of order length continuously, and statistics is by the end of the out of order length of current maximum, when thisWhen the out of order length of current maximum is greater than a length threshold, the out of order rate that is considered as this current link is higher, otherwiseBe considered as current network normal.
This step is the diagnosis for link circuit out of order rate. So-called out of order, refer to link in the situation that there is no packet lossThe packet causing does not arrive in order. Out of order length is exactly the number of the out of order packet that receives. ?In the transmitting procedure of whole piece stream, the present invention need record maximum out of order length. But, calculating out of order lengthWhile spending, exclude the not sequenced situation causing because of packet loss.
And in link, the bag of the transmission in same RTT, just likely occur out of order because never pressThat of order unwrapped the beginning, may be to weigh fast being greater than the packet arriving in the time of a RTTPassing or overtime packet, is likely now because packet loss causes, and can not can be regarded as is out of order length.
Thereby, in this step, first calculating first condition and second condition and whether set up simultaneously, this is first years oldCondition for: the ACK sequence number ack_seq that current data packet is replied is greater than a upper non-out of order numberThe ACK sequence number old_ack replying according to bag, this second condition is: reply ACK for current data packetThe moment time of packet and the moment of replying ack msg bag for a upper non-out of order packetThe difference of old_ack_time is less than RTT.
If can set up simultaneously, mean the current packet loss that do not have. Continue to calculate out of order lengthreordering。reordering=CEIL((ack_seq-old_ack_time)/segment_size)
Segment_size is the maximum message segment segment length of a packet, and CEIL, for rounding up, passes throughThe ratio of out of order duration and message length, can know the out of order packet of interior transmission during this period of timeNumber, namely out of order length.
In the process of transmitting of packet, continue the each out of order out of order length of record, statistics is by the end of at presentThe out of order length of maximum, be greater than a length threshold once the out of order length of this current maximum, be considered as current chainThe out of order rate on road is higher, otherwise it is normal to be considered as current network. This length threshold is set as required.
Be illustrated in figure 7 the schematic flow sheet of step 44 of the present invention.
Step 44, judges whether the duration disorder_time of current out of order process is greater than a RTT,If not, there is not packet loss in the out of order process that is considered as current link, if so, is considered as the out of order of current linkThere is packet loss in process, lost_out_num adds 1, while finally end between stream end or diagnostic region, sentencesThe total time total_time's of disconnected out of order process total time all_disorder_time and stream transmission procedureWhether ratio is greater than a packet loss threshold value, if so, is considered as link and has higher packet loss, causes occurring holdingThe packet loss of continuous property, makes out of order process total time all_disorder_time proportion very large, if not,Judge and in transmitting procedure, whether exist the duration length of certain out of order process and the ratio of RTT to be greater thanOne specific threshold (for example specific threshold is 3), if so, be considered as transmitting terminal in recovering alsoDo not have to retransmit at once, the ability that is also just considered as the fast quick-recovery of transmitting terminal a little less than, if not, depending onFor the packet loss of link not high. This packet loss threshold value, specific threshold are all set as required.
By such scheme, the present invention can carry out diagnosis and detection identification to several situations in network, bagDraw together:
1, the data of transmitting terminal buffering area unavailable or transmitting terminal is too small;
2, transmitting terminal window in the situation that of normal transmission packet increased slow;
3, receiving terminal has been opened delayed ACK option;
4, there is RTT shake in current link;
5, the out of order rate of current link is higher;
6, the packet loss of current link is higher;
7, the ability of the fast quick-recovery of transmitting terminal a little less than.
The present invention can isolated operation at receiving terminal, do not affect front-end server performance, diagnose out transmitting terminalPerformance issue and Link State problem. And then the optimization that can be Transmission Control Protocol provides accurate reference information,Be convenient to the performance boost of reliable transport protocol.
The foregoing is only preferred embodiments of the present invention, not for limiting to patent protection model of the present inventionEnclose, therefore such as use the equivalence that content of the present invention is done to change, be all in like manner all contained in scope of the present invention.

Claims (20)

1. the network performance detection method based on receiving terminal in TCP MPTS, is characterized in that, bagDraw together:
Step 1, receiving terminal, in the time receiving or send each packet, obtains the header information of this packet,To obtain TCP transformation parameter;
Step 2, this receiving terminal judges the current status of TCP based on this TCP transformation parameter, if inNormal condition, execution step 3, if in out of order state, execution step 4;
Step 3, according to a normal condition decision tree to carry out network performance detection;
Step 4, according to an out of order state decision tree to carry out network performance detection.
2. the method for claim 1, is characterized in that, this TCP transformation parameter comprises:
Total number of data packets pkt_cnt, receiving terminal that the state ca_state of TCP, receiving terminal are received are sent outThe sequence number of the total ack msg bag number ack_cnt sending, the bag that the receiving terminal next one need to be receivedThe duration disorder_time of rcv_nxt, current out of order process, out of order process total timeThe total time total_time of all_disorder_time, stream transmission procedure, out of order length reordering,While there is the reception of the number of times lost_out_num of the out of order process of packet loss, twice normal transmission packetBetween window size first_window in interval interval, a RTT, at first_windowWindow size second_window after N RTT, send moment TSval, the reception of current bagTo the TSval value TSecr of a upper bag in one or more.
3. the method for claim 1, is characterized in that, this normal condition decision tree is further wrappedDraw together:
The moment that current data packet is received in judgement receives with last whether the difference in the moment of packet is greater thanOne time threshold, if so, the data that are considered as transmitting terminal are unavailable, or the buffering area of transmitting terminal is too little.
4. the method as described in claim 1 or 2 or 3, is characterized in that, this normal condition decision treeFurther comprise: whether judge second_window – first_window≤window_thresSet up;
If so, being considered as transmitting terminal window in the situation that of normal transmission packet increased slow;
Second_window is the window size in the 2nd RTT, and first_window is in a RTTWindow size, window_thres is a window threshold value, the 2nd RTT lags behind a RTT, the 2nd RTTAnd a N RTT in interval between a RTT, N is positive integer.
5. method as claimed in claim 4, is characterized in that, window_thres=k*N, kFor threshold value coefficient.
6. method as claimed in claim 4, is characterized in that, this step 3 further comprises:
Calculate RTT according to TCP transformation parameter;
Calculate the window size in a RTT;
Calculating first_window < set_window and second_window < set_window isNo establishment simultaneously;
If so, whether judge second_window – first_window≤window_thresSet up, if set up, be considered as transmitting terminal window in the situation that of normal transmission packet and increased slow;
Wherein, set_window is the maximum window size under nominated bandwidth.
7. method as claimed in claim 1 or 2, is characterized in that, this out of order state decision tree enters oneStep comprises:
Judge whether pkt_cnt/ack_cnt equals M, 1.8≤M≤2.2;
If so, be considered as receiving terminal and opened delayed ACK option, if not, be considered as receiving terminal and do not open and prolongACK option late;
Pkt_cnt is total number of data packets that receiving terminal is received, ack_cnt is the total of receiving terminal transmissionAck msg bag number.
8. method as claimed in claim 1 or 2, is characterized in that, this out of order state decision tree enters oneStep comprises:
Calculate RTT according to two packets that receive continuously, an accumulation specific quantity RTT forms a RTTSet, calculates maximum in this RTT set and the difference of minimum of a value, judges whether this difference is greater than oneDithering threshold, if so, is considered as this link and has RTT shake, if not, is considered as network normal.
9. method as claimed in claim 1 or 2, is characterized in that, this out of order state decision tree enters oneStep comprises:
Calculate the number of the out of order packet receiving continuously in same RTT, as out of order length, continuouslyOut of order length while calculating each out of order generation, and therefrom find out maximum out of order length, when the out of order length of this maximumWhen degree is greater than a length threshold, the out of order rate that is considered as current link is higher, otherwise it is normal to be considered as current network.
10. method as claimed in claim 1 or 2, is characterized in that, this out of order state decision tree enters oneStep comprises:
Whether the duration disorder_time that judges current out of order process is greater than a RTT, if not,Be considered as current link and do not have packet loss, if so, be considered as current link and have packet loss, judge that out of order process is totalWhether the ratio of the total time total_time of time all_disorder_time and stream transmission procedure is greater thanOne packet loss threshold value, if so, is considered as link and has higher packet loss, if not, judges in transmitting procedureIn whether exist the duration length of certain out of order process and the ratio of RTT to be greater than a specific threshold, ifBe, the ability that is considered as the fast quick-recovery of transmitting terminal a little less than, if not, the packet loss that is considered as link is not high.
Network performance detection system based on receiving terminal in 11. 1 kinds of TCP MPTSs, is characterized in that, bagDraw together:
Acquisition module, in order to making receiving terminal in the time receiving or send each packet, obtains this packetHeader information, to obtain TCP transformation parameter;
Judge module, in order to make this receiving terminal judge the current status of TCP based on this TCP transformation parameter,If in normal condition, call normal condition detection module, if in out of order state, call out of order shapeState detection module;
Normal condition detection module, in order to according to a normal condition decision tree to carry out network performance detection;
Out of order block of state, in order to according to an out of order state decision tree to carry out network performance detection.
12. systems as claimed in claim 11, is characterized in that, this TCP transformation parameter comprises:
Total number of data packets pkt_cnt, receiving terminal that the state ca_state of TCP, receiving terminal are received are sent outThe sequence number of the total ack msg bag number ack_cnt sending, the bag that the receiving terminal next one need to be receivedThe duration disorder_time of rcv_nxt, current out of order process, out of order process total timeThe total time total_time of all_disorder_time, stream transmission procedure, out of order length reordering,While there is the reception of the number of times lost_out_num of the out of order process of packet loss, twice normal transmission packetBetween window size first_window in interval interval, a RTT, at first_windowWindow size second_window after N RTT, send moment TSval, the reception of current bagTo the TSval value TSecr of a upper bag in one or more.
13. systems as claimed in claim 11, is characterized in that, this normal condition decision tree is furtherComprise:
The moment that current data packet is received in judgement receives with last whether the difference in the moment of packet is greater thanOne time threshold, if so, the data that are considered as transmitting terminal are unavailable, or the buffering area of transmitting terminal is too little.
14. systems as described in claim 11 or 12 or 13, is characterized in that, this normal condition certainlyTree further comprises plan: judge that second_window – first_window≤window_thres isNo establishment;
If so, being considered as transmitting terminal window in the situation that of normal transmission packet increased slow;
Second_window is the window size in the 2nd RTT, and first_window is in a RTTWindow size, window_thres is a window threshold value, the 2nd RTT lags behind a RTT, the 2nd RTTAnd a N RTT in interval between a RTT, N is positive integer.
15. systems as claimed in claim 14, is characterized in that, window_thres=k*N, kFor threshold value coefficient.
16. systems as claimed in claim 14, is characterized in that, this normal condition detection module enters oneStep comprises:
Calculate the module of RTT according to TCP transformation parameter;
Calculate the module of the window size in a RTT;
Calculating first_window < set_window and second_window < set_window isThe no module of simultaneously setting up;
If so, whether judge second_window – first_window≤window_thresThe module of setting up, if set up, is considered as transmitting terminal window in the situation that of normal transmission packet and increased slow;
Wherein, set_window is the maximum window size under nominated bandwidth.
17. systems as described in claim 11 or 12, is characterized in that, this out of order state decision tree entersOne step comprises:
Judge whether pkt_cnt/ack_cnt equals M, 1.8≤M≤2.2;
If so, be considered as receiving terminal and opened delayed ACK option, if not, be considered as receiving terminal and do not open and prolongACK option late;
Pkt_cnt is total number of data packets that receiving terminal is received, ack_cnt is the total of receiving terminal transmissionAck msg bag number.
18. systems as described in claim 11 or 12, is characterized in that, this out of order state decision tree entersOne step comprises:
Calculate RTT according to two packets that receive continuously, an accumulation specific quantity RTT forms a RTTSet, calculates maximum in this RTT set and the difference of minimum of a value, judges whether this difference is greater than oneDithering threshold, if so, is considered as this link and has RTT shake, if not, is considered as network normal.
19. systems as described in claim 11 or 12, is characterized in that, this out of order state decision tree entersOne step comprises:
Calculate the number of the out of order packet receiving continuously in same RTT, as out of order length, continuouslyOut of order length while calculating each out of order generation, and therefrom find out maximum out of order length, when the out of order length of this maximumWhen degree is greater than a length threshold, the out of order rate that is considered as current link is higher, otherwise it is normal to be considered as current network.
20. systems as described in claim 11 or 12, is characterized in that, this out of order state decision tree entersOne step comprises:
Whether the duration disorder_time that judges current out of order process is greater than a RTT, if not,Be considered as current link and do not have packet loss, if so, be considered as current link and have packet loss, judge that out of order process is totalWhether the ratio of the total time total_time of time all_disorder_time and stream transmission procedure is greater thanOne packet loss threshold value, if so, is considered as link and has higher packet loss, if not, judges in transmitting procedureIn whether exist the duration length of certain out of order process and the ratio of RTT to be greater than a specific threshold, ifBe, the ability that is considered as the fast quick-recovery of transmitting terminal a little less than, if not, the packet loss that is considered as link is not high.
CN201610083046.3A 2016-02-06 2016-02-06 Network performance detection method and system in TCP transmission stream based on receiving end Expired - Fee Related CN105591843B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610083046.3A CN105591843B (en) 2016-02-06 2016-02-06 Network performance detection method and system in TCP transmission stream based on receiving end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610083046.3A CN105591843B (en) 2016-02-06 2016-02-06 Network performance detection method and system in TCP transmission stream based on receiving end

Publications (2)

Publication Number Publication Date
CN105591843A true CN105591843A (en) 2016-05-18
CN105591843B CN105591843B (en) 2018-12-04

Family

ID=55931100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610083046.3A Expired - Fee Related CN105591843B (en) 2016-02-06 2016-02-06 Network performance detection method and system in TCP transmission stream based on receiving end

Country Status (1)

Country Link
CN (1) CN105591843B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106685760A (en) * 2016-12-29 2017-05-17 杭州迪普科技股份有限公司 Link state detecting method and apparatus
CN106961365A (en) * 2017-05-11 2017-07-18 成都极玩网络技术有限公司 A kind of network delay measuring method based on Transmission Control Protocol
WO2017133014A1 (en) * 2016-02-06 2017-08-10 中国科学院计算技术研究所 Method and system for network performance detection based on receiving end in tcp transmission stream
CN107395441A (en) * 2017-08-31 2017-11-24 江苏省公用信息有限公司 A kind of method for detecting Network Packet Loss situation
CN108123990A (en) * 2016-11-30 2018-06-05 华为技术有限公司 A kind of date storage method, data-storage system and data processing equipment
CN109714558A (en) * 2018-11-28 2019-05-03 视联动力信息技术股份有限公司 A kind of communication connection detection method and system based on view networking
CN110324206A (en) * 2019-07-08 2019-10-11 中国联合网络通信集团有限公司 A kind of assessment method and system
CN113660144A (en) * 2021-09-15 2021-11-16 佳缘科技股份有限公司 Network loopback time-based springboard detection method and system thereof
CN114979015A (en) * 2021-02-19 2022-08-30 腾讯科技(深圳)有限公司 Data packet processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010050901A1 (en) * 1999-12-24 2001-12-13 Agilent Technologies, Inc. Measuring efficiency of data transmission
CN1815970A (en) * 2005-02-01 2006-08-09 华为技术有限公司 Method for detecting network chain fault and positioning said fault
CN1992652A (en) * 2005-12-29 2007-07-04 华为技术有限公司 Method of detecting packet disordering and repetition in connectionless packet switch network
CN101068170A (en) * 2007-06-05 2007-11-07 华为技术有限公司 Message abnormal receiving detecting method, system and device thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010050901A1 (en) * 1999-12-24 2001-12-13 Agilent Technologies, Inc. Measuring efficiency of data transmission
CN1815970A (en) * 2005-02-01 2006-08-09 华为技术有限公司 Method for detecting network chain fault and positioning said fault
CN1992652A (en) * 2005-12-29 2007-07-04 华为技术有限公司 Method of detecting packet disordering and repetition in connectionless packet switch network
CN101068170A (en) * 2007-06-05 2007-11-07 华为技术有限公司 Message abnormal receiving detecting method, system and device thereof

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017133014A1 (en) * 2016-02-06 2017-08-10 中国科学院计算技术研究所 Method and system for network performance detection based on receiving end in tcp transmission stream
CN108123990A (en) * 2016-11-30 2018-06-05 华为技术有限公司 A kind of date storage method, data-storage system and data processing equipment
CN108123990B (en) * 2016-11-30 2020-06-16 华为技术有限公司 Data storage method, data storage system and data processing equipment
CN106685760A (en) * 2016-12-29 2017-05-17 杭州迪普科技股份有限公司 Link state detecting method and apparatus
CN106961365A (en) * 2017-05-11 2017-07-18 成都极玩网络技术有限公司 A kind of network delay measuring method based on Transmission Control Protocol
CN106961365B (en) * 2017-05-11 2020-03-10 成都穿月科技有限公司 Network delay measuring method based on TCP protocol
CN107395441A (en) * 2017-08-31 2017-11-24 江苏省公用信息有限公司 A kind of method for detecting Network Packet Loss situation
CN109714558A (en) * 2018-11-28 2019-05-03 视联动力信息技术股份有限公司 A kind of communication connection detection method and system based on view networking
CN110324206A (en) * 2019-07-08 2019-10-11 中国联合网络通信集团有限公司 A kind of assessment method and system
CN114979015A (en) * 2021-02-19 2022-08-30 腾讯科技(深圳)有限公司 Data packet processing method and device
CN114979015B (en) * 2021-02-19 2024-04-12 腾讯科技(深圳)有限公司 Data packet processing method and device
CN113660144A (en) * 2021-09-15 2021-11-16 佳缘科技股份有限公司 Network loopback time-based springboard detection method and system thereof

Also Published As

Publication number Publication date
CN105591843B (en) 2018-12-04

Similar Documents

Publication Publication Date Title
CN105591843A (en) Network performance detection method and system based on receiving end in TCP transmission stream
EP2374245B1 (en) Controlling packet transmission using bandwidth estimation
WO2017133014A1 (en) Method and system for network performance detection based on receiving end in tcp transmission stream
CN100583785C (en) Method and apparatus for characterizing an end-to-end path of a packet-based network
EP1382219B1 (en) Method and device for robust real-time estimation of bottleneck bandwidth
CA3090099A1 (en) Systems and methods for broadband communication link performance monitoring
US20020154602A1 (en) Method for improving TCP performance over wireless links
US8665745B2 (en) Method and device for determining a jitter buffer level
Ha et al. Hybrid slow start for high-bandwidth and long-distance networks
US9379989B2 (en) Congestion avoidance and control for UDP-based protocols
US9559927B2 (en) Terminal, system and method for measuring network state using the same
WO2013172996A1 (en) Link microbenchmarking with idle link correction
CN109167734A (en) The method and apparatus for identifying transmission control protocol state
US9769695B2 (en) Adaptive quality of service for wide area network transport
US8315164B2 (en) Controlling packet transmission
CN109218122A (en) A kind of methods, devices and systems for realizing transmission performance detection
JP2014116771A (en) Information processing system
Ozturk et al. DIChirp: Direct injection bandwidth estimation
EP1443704A1 (en) Information collecting protocol
Ohkawa et al. Path capacity estimation by passive measurement for the constant monitoring of every network path
Qu An enhanced TCP Vegas algorithm based on route surveillance and bandwidth estimation over geo satellite networks
CN104539486A (en) End-to-end available bandwidth estimating method based on TCP acknowledgement packet pair
Antonyuk Performance Evaluation of Computer Campus Network Segments
CN114900426A (en) Fault positioning method based on active and passive hybrid measurement and related equipment
Tekala et al. Throughput analysis of Scalable TCP congestion control

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20190211

Address after: Room 1103, Building B2, 700 Yishan Road, Xuhui District, Shanghai, 2003

Patentee after: SHANGHAI YINGLIAN INFORMATION TECHNOLOGY CO.,LTD.

Address before: 100190 South Road, Zhongguancun Science Academy, Haidian District, Beijing 6

Patentee before: Institute of Computing Technology, Chinese Academy of Sciences

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181204

Termination date: 20220206