Mellanox/sockperf

One-way latency measurement

msoho opened this issue · 2 comments

msoho commented

Does sockperf do true one way latency measurement? Or is the result always RTT/2?

Hi @msoho sockperf always print the one way latency; however, the calculation is latency=RTT/2.
There is option to handle this as --full-rtt
See:
sockperf pp -i 2.2.2.1 -p 17000
sockperf: == version #3.7-no.git ==
sockperf[CLIENT] send on:sockperf: using recvfrom() to block on socket(s)

[ 0] IP = 2.2.2.1 PORT = 17000 # UDP
sockperf: Warmup stage (sending a few dummy messages)...
sockperf: Starting test...
sockperf: Test end (interrupted by timer)
sockperf: Test ended
sockperf: [Total Run] RunTime=1.000 sec; Warm up time=400 msec; SentMessages=19217; ReceivedMessages=19216
sockperf: ========= Printing statistics for Server No: 0
sockperf: [Valid Duration] RunTime=0.550 sec; SentMessages=11822; ReceivedMessages=11822
sockperf: ====> avg-latency=23.244 (std-dev=2.398)
sockperf: # dropped messages = 0; # duplicated messages = 0; # out-of-order messages = 0
sockperf: Summary: Latency is 23.244 usec
and

sockperf pp -i 2.2.2.1 -p 17000 --full-rtt
sockperf: == version #3.7-no.git ==
sockperf[CLIENT] send on:sockperf: using recvfrom() to block on socket(s)

[ 0] IP = 2.2.2.1 PORT = 17000 # UDP
sockperf: Warmup stage (sending a few dummy messages)...
sockperf: Starting test...
sockperf: Test end (interrupted by timer)
sockperf: Test ended
sockperf: [Total Run] RunTime=1.000 sec; Warm up time=400 msec; SentMessages=22327; ReceivedMessages=22326
sockperf: ========= Printing statistics for Server No: 0
sockperf: [Valid Duration] RunTime=0.550 sec; SentMessages=12396; ReceivedMessages=12396
sockperf: ====> avg-rtt=44.332 (std-dev=3.489)
sockperf: # dropped messages = 0; # duplicated messages = 0; # out-of-order messages = 0
sockperf: Summary: Round trip is 44.332 usec

msoho commented

Thank you for the clarification. I am looking for a tool to measure actual one-way latency between A-->B and/or B-->A instead of (A-->B-->A)/2

It doesn't seem like sockperf has this capability for now.