Last update: 2017-11-28
Questions? Suggestions? devaerep@student.ethz.ch
This document is kinda append only.
c.measurement = newMeasurementData(role)
passing only if this endpoint is the server or client.c.measurement.incommingMeasurementTasks(&hdr)
. only passing the QUIC packet header.c.measurement.hdrData.encode()
which returns the measurement byte to be added to the Minq header.
static shaped dynamic shaped link 0 link 1 | | V V +----------+ +----------+ +----------+ | client-0 | <---> | switch-0 | <---> | switch-1 | +----------+ +----------+ +----------+ ^ | <-- unshaped link | link 2 V +----------+ | observer | | switch-2 | +----------+ ^ | <-- unshaped link | link 3 V +----------+ +----------+ +----------+ | server-0 | <---> | switch-4 | <---> | switch-3 | +----------+ +----------+ +----------+ ^ ^ | | link 5 link 4 static shaped dynamic shaped
netem
qdisc attached to them when the network is initialized. tcmpdump
is running on the observer (switch-2). The observer is recording data flowing in both directions, but keeps different state for spinbit analysis in each direction.In this set of experiments, the client initiates a connection to the server and uploads a 100 MiB file. The static links are shaped to have a 10 ms delay. At t = 30 s netem parameters are added to the dynamic links. The results for different netem settings are listed below.
delay 10ms
<time vs rtt diagram>
<time vs rtt diagram (detail)>
ACK
only packets. Only the ocasional MAX_STREAM_DATA
frame will trigger an acknowledgement from the server, and provide an RTT data point.11111100100000
<Wireshark screenshot>.
There are a number of straight forward solutions to this:
delay 500us
<time vs rtt diagram>
<time vs rtt diagram (detail)>
delay 10ms 3ms 25
<time vs rtt diagram>
<CC and FC info>
MAX_STREAM_DATA
frames, causing its RTT estimate frequency to drop even further. The spinbit is not affected.loss random 0.01
<time vs rtt diagram>
loss random 2
<time vs rtt diagram>
delay 1ms reorder 1 25
<time vs rtt diagram>
delay 1ms reorder 10 25
<time vs rtt diagram>
delay 1ms reorder 50 25
<time vs rtt diagram>
In this set of experiments, the client sends a small Hello packet to a server every 100 ms. The static links are shaped to have a 10 ms delay. At t = 30 s netem parameters are added to the dynamic links. Because of the results are very similar, we will focus on delay 10ms
<time vs rtt diagram>
We see from the figure that the spinbit data is pretty useless. This is easily understood when we look at the packets flowing. Consider the following example, where every link has delay 1 ms, and Hello packets are send every 10 ms. The following packets are then generated / observed / received:
10 ms: H 1 11 ms: H 1 12 ms: H 1 0 ms: H 0 1 ms: H 0 2 ms: H 0 +----------+ +----------+ +----------+ | |-------------->| |-------------->| | | client | | observer | | server | | |<--------------| |<--------------| | +----------+ +----------+ +----------+ 4 ms: A 0 3 ms: A 0 2 ms: A 0 14 ms: A 1 13 ms: A 1 12 ms: A 1 Legend: H: Hello A: Ack 0: Spin 0 1: Spin 1
So, the observer sees one spinbit transition per Hello packet transmitted. As Brian puts it: "The spinbit measures the dominant frequency of the protocol".
Same as above, but now the server also echos back the Hello packets. We again look at delay 10ms
<time vs rtt diagram>. Let us consider again the packets flowing of the network.
20 ms: HA 0 21 ms: HA 0 22 ms: HA 0 10 ms: HA 1 11 ms: HA 1 12 ms: HA 1 4 ms: A 1 5 ms: A 1 6 ms: A 1 0 ms: H 0 1 ms: H 0 2 ms: H 0 +----------+ +----------+ +----------+ | |-------------->| |-------------->| | | client | | observer | | server | | |<--------------| |<--------------| | +----------+ +----------+ +----------+ 4 ms: EA 0 3 ms: EA 0 2 ms: EA 0 14 ms: EA 1 13 ms: EA 1 12 ms: EA 1 Legend: H: Hello E: Echo A: Ack 0: Spin 0 1: Spin 1
We can see that here the correct RTT can be measured only once, after which we again measure the Hello frequency rather than the RTT. Two more things should be noted here:
To verify how well a dual bit spin signal performs, I ran some tests.
I'll only show delay 5ms reorder 50 25
here, as heavy reordering was the only thing the one bit spinbit had problems with. <time vs rtt diagram> <comparison one vs two bits>.
It looks like this two bit signal is completely imune to reordering. In fact, in my current implementation (where I ignore all spin signals that are not (current_spin + 1) % 4
), a packet would need to be reorderd 3 RTTs before it causes an incorrect latency measurement.
In order to verify the value added by adding a second bit to the spin signal, I compared it to a number of other approaches:
Some results:
delay 1ms reorder 10 25
<time vs rtt diagram>
<time vs rtt rejection diagram>
delay 5ms reorder 50 25
<time vs rtt diagram>
<time vs rtt rejection diagram>
The reason that both considering the Pns and a two bit spin signal give the same results, is because they effectively do the same: they detect reordering. The main performance difference between the two is how much reordering they tollerate. For the two bit signal, reordering up to 3 RTTs can be handled. For the Pns method, reordering up to the point where a Pn wrap around occurs is tollerable. However, when reordering is this heavy, the receiving endpoint can not properly expand the packet numbers anymore, so more bits of the Pn should be send anyway.
In conclusion: adding a second bit to the spin signal does make the spin signal significantly more resilient against reordering. However, similar results can also be obtained by using the information already in the QUIC header. Therefore, the second spin bit adds little or no information for a passive observer.
From the above, it is clear that although the spinbit can provide a passive observer with valuable information about the application RTT, the information derived from the spinbit is not always related to the RTT. Furthermore, it is not possible to derive from the spinbit if it is providing a measurement of the RTT or some other frequency. Therefore, it is usefull for a passive observer to have an indication of when the spinbit caries valid information about the RTT.
One proposal is to add a blocked bit the to QUIC header (PR 279). While such a bit might give some information as to when the spinbit signal is valid, and when it is not, this would only be an indirect signal. To ensure that a passive observer can know with complete certainty that the spinbit is carrying valid information about the RTT, I propose the valid bit.
The valid bit works as follows:
The valid bit has a number of advantages:
valid = 1
generated by and endpoint is enough for an observer to sample the up or downstream delay.For testing the valid bit, I introduce a new type of traffic patern: bursty. It consists of calm periods of 15 s where heartbeats are send to the server every 100 ms. After this period the client transfers 1 MiB of bulk data, after which the next calm period starts.
bursty
<time vs rtt diagram>
delay 500us
<time vs rtt diagram>
delay 5ms reorder 50 25
<time vs rtt diagram>