robin
robin

Reputation: 91

why round-trip time different between two test host?

I have written one http put client(use libcurl libarary) to put file into apache webdav server, and use tcpdump catch the packet at the server side, then use tcptrace (www.tcptrace.org) to analysis the dump file, below is the result: Host a is the client side, Host b is the server side:

 a->b:                              b->a:
     total packets:        152120           total packets:        151974      
     ack pkts sent:        152120           ack pkts sent:        151974      
     pure acks sent:          120           pure acks sent:       151854      
     sack pkts sent:            0           sack pkts sent:            0      
     dsack pkts sent:           0           dsack pkts sent:           0      
     max sack blks/ack:         0           max sack blks/ack:         0      
     unique bytes sent: 3532149672           unique bytes sent:     30420      
     actual data pkts:     152000           actual data pkts:        120      
     actual data bytes: 3532149672           actual data bytes:     30420      
     rexmt data pkts:           0           rexmt data pkts:           0      
     rexmt data bytes:          0           rexmt data bytes:          0      
     zwnd probe pkts:           0           zwnd probe pkts:           0      
     zwnd probe bytes:          0           zwnd probe bytes:          0      
     outoforder pkts:           0           outoforder pkts:           0      
     pushed data pkts:       3341           pushed data pkts:        120      
     SYN/FIN pkts sent:       0/0           SYN/FIN pkts sent:       0/0      
     req 1323 ws/ts:          N/Y           req 1323 ws/ts:          N/Y      
     urgent data pkts:          0 pkts      urgent data pkts:          0 pkts 
     urgent data bytes:         0 bytes     urgent data bytes:         0 bytes
     mss requested:             0 bytes     mss requested:             0 bytes
     max segm size:         31856 bytes     max segm size:           482 bytes
     min segm size:           216 bytes     min segm size:            25 bytes
     avg segm size:         23237 bytes     avg segm size:           253 bytes
     max win adv:             125 bytes     max win adv:            5402 bytes
     min win adv:             125 bytes     min win adv:            5402 bytes
     zero win adv:              0 times     zero win adv:              0 times
     avg win adv:             125 bytes     avg win adv:            5402 bytes
     initial window:        15928 bytes     initial window:            0 bytes
     initial window:            1 pkts      initial window:            0 pkts 
     ttl stream length:        NA           ttl stream length:        NA      
     missed data:              NA           missed data:              NA      
     truncated data:            0 bytes     truncated data:            0 bytes
     truncated packets:         0 pkts      truncated packets:         0 pkts 
     data xmit time:      151.297 secs      data xmit time:      150.696 secs 
     idletime max:        44571.3 ms        idletime max:        44571.3 ms   
     throughput:         23345867 Bps       throughput:              201 Bps  

     RTT samples:          151915           RTT samples:             120      
     RTT min:                 0.0 ms        RTT min:                 0.1 ms   
     RTT max:                 0.3 ms        RTT max:                40.1 ms   
     RTT avg:                 0.0 ms        RTT avg:                19.9 ms   
     RTT stdev:               0.0 ms        RTT stdev:              19.8 ms

     RTT from 3WHS:           0.0 ms        RTT from 3WHS:           0.0 ms   

     RTT full_sz smpls:     74427           RTT full_sz smpls:        60      
     RTT full_sz min:         0.0 ms        RTT full_sz min:        39.1 ms   
     RTT full_sz max:         0.3 ms        RTT full_sz max:        40.1 ms   
     RTT full_sz avg:         0.0 ms        RTT full_sz avg:        39.6 ms   
     RTT full_sz stdev:       0.0 ms        RTT full_sz stdev:       0.3 ms   

     post-loss acks:            0           post-loss acks:            0      
     segs cum acked:           89           segs cum acked:            0      
     duplicate acks:            0           duplicate acks:            0      
     triple dupacks:            0           triple dupacks:            0      
     max # retrans:             0           max # retrans:             0      
     min retr time:           0.0 ms        min retr time:           0.0 ms   
     max retr time:           0.0 ms        max retr time:           0.0 ms   
     avg retr time:           0.0 ms        avg retr time:           0.0 ms   
     sdv retr time:           0.0 ms        sdv retr time:           0.0 ms  

According the result above, the RTT of client to server is small, but the server side to client side is large. Can anyone help explain this from me?

Upvotes: 0

Views: 1116

Answers (2)

kfsone
kfsone

Reputation: 24259

Because this

 unique bytes sent: 3532149672           unique bytes sent:     30420      
 actual data pkts:     152000           actual data pkts:        120      
 actual data bytes: 3532149672           actual data bytes:     30420 

a->b is sending a steady flow of data, which ensures buffers get filled and things get pushed.

b->a is only sending a few acks etc, doing next to nothing at all, so as a result things get left in buffers for a while (a few ms).

In addition to that, RTT is round trip time. It's the time from when the application queues a packet for sending and when the corresponding response is received. Since the host on a is busy pushing data, and probably filling its own buffers, there's going to be a small amount of additional overhead for something from b to get acknowledged.

Upvotes: 1

Elliott Frisch
Elliott Frisch

Reputation: 201447

Firstly host b sent very little data (a very small sample size). Secondly, I suspect that host a has an asymmetrical Internet connection (e.g. 10MB/1MB).

Upvotes: 0

Related Questions