crusader icon indicating copy to clipboard operation
crusader copied to clipboard

How are latencies in Up- and Downlink measured?

Open joergdeutschmann-i7 opened this issue 3 years ago • 4 comments

First of all, a big thanks for this great software, which works really nice!

In the graphs, the latency for Up and Down is shown. I'm wondering how this is done considering that client and server are usually different machines with unsynchronized clocks?

joergdeutschmann-i7 avatar Nov 04 '22 12:11 joergdeutschmann-i7

The clocks are synchronized at the beginning of the test. Adjusting for clock drift with a synchronization at the end of the test is on my todo list. You may currently observe some clock drift with longer test durations.

Zoxc avatar Nov 04 '22 13:11 Zoxc

Okay, so the assumption is then a symmetrical path regarding delays? Could you point me to the code where this is done?

joergdeutschmann-i7 avatar Nov 04 '22 13:11 joergdeutschmann-i7

Yes, it assumes the delays are symmetric on idle. The code is here. This function returns an offset to convert server time into client time.

Zoxc avatar Nov 04 '22 16:11 Zoxc

On linux it's only a couple calls to sample TCP_INFO:

this one runs out of band, not useful... https://www.measurementlab.net/tests/tcp-info/ https://docs.trafficserver.apache.org/en/9.0.x/admin-guide/plugins/tcpinfo.en.html runs inband, but doesn't do any post-processing

this method could be used to hook some other tool that uses some common rust geturl or equivalent lib - https://linuxgazette.net/136/pfeiffer.html

And these calls can be used on windows:

https://learn.microsoft.com/en-us/windows/win32/winsock/sio-tcp-info https://learn.microsoft.com/en-us/windows/win32/api/mstcpip/ns-mstcpip-tcp_info_v1

just ULONG RttUs; sampled every 10-50ms ULONG MinRttUs; vs this baseline

would be a way of measuring inband. Right now crusader just measures the effectiveness of FQ, not the actual behavior of tcp flows.

dtaht avatar Dec 06 '22 16:12 dtaht

I added a note about this in the readme.

Zoxc avatar Aug 09 '24 02:08 Zoxc