Take the 2-minute tour ×
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It's 100% free, no registration required.

How do I calculate RTT, do I start to measure the time from the beginning of the segment transmition or from the moment all the segment had been transmitted?

The end time is the moment the sender gets the "ACK".

share|improve this question
    
I'm not sure that's the right place for this question. –  Yuval Filmus Jan 28 '13 at 14:39
    
So where is the right place ? –  URL87 Jan 28 '13 at 14:42
    
Perhaps the main stackexchange site? –  Yuval Filmus Jan 28 '13 at 16:19

3 Answers 3

up vote 2 down vote accepted

The round trip time is the time required to go and return, so it must be measured from the start of the transmission to the start of the reception of the response. If you measure from the end of the packet to the end of the ACK, you are subtracting the package length and adding in the length of the acknowledgement's package (the ACK could be piggibacked on any package doing the back trip). This can very well be measured during a stream of data (and it is done so by your neighborhood TCP stack to tune timeouts and so on).

share|improve this answer

The best way to measure RTT is to send a single message packet and wait for the acknowledgement.

Starting your measurememt differently would only add unnecessary details because you start measuring delays not caused by the network. This is why pings are usually used measure RTT.

But it s nothing but an implementation detail.

share|improve this answer

Something that you should consider is to do some statistics on different data size. Send different data packet size, measure RTT, Then you can measure Avg. RTT based on data size, its variance and jitters. there are some open source tools for measuring these numbers like Wireshark.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.