|Sharabayko & Sharabayko||Expires 26 April 2023||[Page]|
- Intended Status:
Estimating Transmission Metrics on a QUIC Connection
This document defines an approach of objectively measuring transmission such metrics like delay, jitter, and loss-related transmission metrics for a QUIC [RFC9000] connection using an artificially generated payload of a specific structure. The measurement is to be carried on an application level to be protocol-independent.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 26 April 2023.¶
Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.¶
Establishment of the Media over QUIC working group acknowledges the relevance of live media contribution and distribution and encourages discussions on the use cases to be considered [I-D.gruessing-moq-requirements]. Several proposals complement to those discussions. Most are currently based on QUIC streams [I-D.lcurley-warp], [I-D.kpugin-rush], [I-D.jennings-moq-quicr-arch], [I-D.shi-quic-dtp]. QUIC datagrams are yet to be considered within the group, but some related work includes [I-D.sharabayko-srt-over-quic], [I-D.jennings-moq-quicr-arch], [I-D.ietf-avtcore-rtp-over-quic].¶
Thus, an important task is to evaluate solutions and algorithms being proposed. For example for live media contribution, where processing of data takes place in real time, it is important to estimate transmission delay and delay variation (or jitter), to determine data loss and reordering, as well as to calculate other transmission metrics. The lower the observed jitter level is, the smaller is the decoder buffer needed, and the higher is the confidence in an expected transmission latency.¶
The current draft discusses an approach of objectively measuring transmission delay, jitter, and other performance metrics Section 4 for any media protocol over a QUIC connection using an artificially generated payload of a specific structure Section 3. Both streams [RFC9000] and unreliable datagrams [RFC9221] are to be supported. However, it is important to highlight the difference between the two. Thus a sub goal is to try to find a universal approach to evaluate performance metrics for both streams and datagrams, providing a common basis for comparison.¶
To be independent from a media protocol over QUIC, the measurement is to be carried on an application level, probably involving QUIC-level statistics where needed.¶
This approach could be used during development of the Media over QUIC protocol to:¶
- compare the independent proposals and implementations of the Media over QUIC protocol,¶
- perform regression testing of a certain implementation or proposal,¶
- evaluate various congestion control schemes for live media,¶
- maybe compare Media over QUIC protocol performance against other protocols, e.g. RTP over QUIC [I-D.ietf-avtcore-rtp-over-quic] or SRT [I-D.sharabayko-srt].¶
QUIC, as a protocol, provides a powerful set of statistics which can be used in addition to the defined procedure. There are, however, several things to keep in mind:¶
- Independent QUIC transport implementations do not necessarily support the same set of statistics and the format isn't necessarily the same among different libraries. Although [I-D.ietf-quic-qlog-main-schema] might be helpful in a way.¶
- QUIC packets themselves do not have a timestamp field to allow the measurement of one-way delays. Although there is a related draft proposal [I-D.huitema-quic-ts], which proposes the definition of a TIMESTAMP frame.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
The artificially generated payload by its size SHOULD roughly represent a media unit that a hypothetical decoder can decode. For example, in case of a video stream, one payload can represent the whole frame or a slice of that frame that a decoder can process. The arrival of the whole frame forms the actual delay for a viewer/decoder. Even if a frame is partially received earlier, it will be decoded and presented with the reception of a last macroblock or with dropping of the remaining parts of the frame.¶
The artificially generated payload MUST provide means of estimating transmission delay and full or partial loss of the payload.¶
The artificially generated payload SHOULD be of a variable length to represent different sizes of various types of payload and various types of video frames (I, P, B).¶
The approach MUST provide a common basis for comparison independent (or as independent as possible) of whether QUIC streams or datagrams are used as a transport.¶
- Payload Sequence Number: 64 bits.
A sequential number of the payload. Starts from zero and is incremented for every payload that follows.¶
- PP: 2 bits.
Payload position flag. This field indicates the position of the payload sequence in the group of payload sequences. The value "10b" means the first payload sequence of the group. "00b" indicates a packet in the middle of the group. "01b" designates the last packet. If a single payload packet forms the whole group, the value is "11b".¶
- Group Sequence Number: 62 bits.
A sequential number of the payload group. Starts from zero and is incremented for every payload group that follows.¶
- NTP 64-Bit Timestamp: 64 bits.
- Monotonic Clock Timestamp: 64 bits.
Monotonic clock timestamp of the moment when a payload has been generated. Represents microseconds elapsed since monotonic clock epoch.¶
- Payload Length: 32 bits.
The full length of the payload (including preceding "Payload Sequence Number" and both timestamp fields).¶
- MD5 Checksum: 128 bits.
A hash value to confirm the payload integrity. Calculated for the whole message with the SHA-128 checksum field zeroed out.¶
- Remaining Payload: variable length.
The remaining payload of variable length. Randomly generated sequence of bytes. MAY be generated as a sequence of 8-bit integers starting with value of the remainder after dividing the Payload Sequence Number by 32 and followed by sequentially increasing values.¶
For example, to emulate the "one video frame per QUIC stream" approach the payload length MUST account for the entire stream. As stream data is sent in the form of STREAM frames, the very first frame will contain Payload Sequence Number, PP flags, Group Sequence Number and the rest fields of the header, as well as some of the remaining payload data. Consequent STREAM frames will carry the rest of the payload. Both the Payload Sequence Number and the Group Sequence Number fields MUST be increased for each payload.¶
To emulate the "one GOP per QUIC stream" approach, one QUIC stream will transport several payloads of different lengths. Both the Payload Sequence Number and the Group Sequence Number fields MUST be increased for each payload.¶
To emulate the "video frame over QUIC datagrams" approach the payload length MUST fit in a single DATAGRAM frame. The Payload Sequence Number field MUST be increased for each sent DATAGRAM frame. A sequence of payloads SHOULD have the same Group Sequence Number, with the Payload Position Flag marking the start, the middle, and the end of the group sequence. Thus the whole group sequence marks a represent video frame.¶
The calculation of the following metrics is suggested to be included in the scope:¶
- Transmission Delay (or Latency) Section 4.1,¶
- Interarrival Jitter Section 4.2,¶
- Time-Stamped Delay Factor (TS-DF) Section 4.3,¶
- Total Number of Received Payloads Section 4.4,¶
- Total Number of Missing Payloads Section 4.6,¶
- Total Number of Reordered Payloads and Reordering Distance Section 4.8,¶
- and others metrics as defined below.¶
Transmission Delay (or Latency) is measured based on the system clock (NTP 64-Bit Timestamp Figure 1). It is RECOMMENDED to synchronize the clocks on both sender and receiver machines before an experiment so that an error associated with a clock drift is as less as possible.¶
Transmission Delay (TD) sample is calculated at the receiver side at the moment a payload group is received by an application:¶
TD = T_NTP_RCV - T_NTP_SND¶
where - T_NTP_RCV is the system clock time when the last payload of a group arrives at the receiver. - T_NTP_SND is the NTP 64-Bit Timestamp value extracted from the same payload.¶
Note that TD value will be affected by the clock drift, the difference in the system time of the two clocks at the sender and at the receiver.¶
Minimum (TD_MIN) and maximum (TD_MAX) delay estimates MUST be reset to "not available" (N/A) at the start of each measurement period, while the smoothed value (TD_SMOOTHED) MUST NOT be reset and the calculation SHOULD continue during the entire experiment. Here and throughout the current document, smoothing means applying an exponentially weighted moving average (EWMA).¶
TD_MIN = MIN(TD_MIN, TD); TD_MAX = MAX(TD_MAX, TD); TD_SMOOTHED = EWMA(TD_SMOOTHED, TD).¶
Interarrival Jitter is calculated as defined in [RFC3550]. It is based on the concept of the Relative Transit Time between pairs of consecutive payloads received not necessarily in sequence (meaning that reordering is ignored), and is defined to be the smoothed average of the difference in payloads spacing at the receiver compared to the sender for a pair of payloads.¶
The calculation is based on the Monotonic Clock Timestamp Figure 1 extracted from the payload. As jitter is calculated as an EWMA of delay variations, it MUST NOT be reset at the start of each measurement period.¶
The calculation of TS-DF samples is based on the Monotonic Clock Timestamp Figure 1 extracted from the payload. Unlike the algorithm defined in [RFC3550], TS-DF one does not use a smoothing factor and therefore gives a very accurate instantaneous result.¶
A counter is initialized with zero and incremented on each payload read. The value MUST NOT be reset at the start of each measurement period.¶
A counter is initialized with zero and incremented on each payload group read. The value MUST NOT be reset at the start of each measurement period.¶
A counter is initialized with zero and is incremented each time a discontinuity in consecutive payloads sequence numbers (Payload Sequence Number Figure 1) is determined. Missing sequence numbers MUST be recorded. The counter is decremented by one once a payload with missing sequence number is received out of order. The value MUST NOT be reset at the start of each measurement period.¶
The same as the Total Number of Missing Payloads, but for payload groups.¶
The next Expected Payload Sequence Number is initialized with zero and is updated if the Payload Sequence Number value of a received payload incremented by one exceeds the current Expected Payload Sequence Number value.¶
The value MUST NOT be reset at the start of each measurement period.¶
TODO: Reordering Distance.¶
TODO: Add description.¶
The payload is corrupted, meaning contents were altered. This MUST NOT happen, but still MUST be checked.¶
TODO: Add description.¶
The payload is only partially received.¶
TODO: Add description.¶
A group of payloads is only partially received.¶
- Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
- Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", STD 64, RFC 3550, DOI 10.17487/RFC3550, , <https://www.rfc-editor.org/info/rfc3550>.
- Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, "Network Time Protocol Version 4: Protocol and Algorithms Specification", RFC 5905, DOI 10.17487/RFC5905, , <https://www.rfc-editor.org/info/rfc5905>.
- Mizrahi, T., Fabini, J., and A. Morton, "Guidelines for Defining Packet Timestamps", RFC 8877, DOI 10.17487/RFC8877, , <https://www.rfc-editor.org/info/rfc8877>.
- Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based Multiplexed and Secure Transport", RFC 9000, DOI 10.17487/RFC9000, , <https://www.rfc-editor.org/info/rfc9000>.
- Pauly, T., Kinnear, E., and D. Schinazi, "An Unreliable Datagram Extension to QUIC", RFC 9221, DOI 10.17487/RFC9221, , <https://www.rfc-editor.org/info/rfc9221>.
- The European Broadcasting Union, "TS-DF Algorithm to Measure Network Jitter on RTP Streams", n.d., <https://tech.ebu.ch/publications/tech3337>.
- Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
- Pugin, K., Frindell, A., Cenzano, J., and J. Weissman, "RUSH - Reliable (unreliable) streaming protocol", Work in Progress, Internet-Draft, draft-kpugin-rush-01, , <https://www.ietf.org/archive/id/draft-kpugin-rush-01.txt>.
- Curley, L., "Warp - Segmented Live Media Transport", Work in Progress, Internet-Draft, draft-lcurley-warp-01, , <https://www.ietf.org/archive/id/draft-lcurley-warp-01.txt>.
- Sharabayko, M. and M. Sharabayko, "Tunnelling SRT over QUIC", Work in Progress, Internet-Draft, draft-sharabayko-srt-over-quic-00, , <https://www.ietf.org/archive/id/draft-sharabayko-srt-over-quic-00.txt>.
- Ott, J. and M. Engelbart, "RTP over QUIC", Work in Progress, Internet-Draft, draft-ietf-avtcore-rtp-over-quic-00, , <https://www.ietf.org/archive/id/draft-ietf-avtcore-rtp-over-quic-00.txt>.
- Jennings, C. and S. Nandakumar, "QuicR - Media Delivery Protocol over QUIC", Work in Progress, Internet-Draft, draft-jennings-moq-quicr-arch-01, , <https://www.ietf.org/archive/id/draft-jennings-moq-quicr-arch-01.txt>.
- Gruessing, J. and S. Dawkins, "Media Over QUIC - Use Cases and Requirements for Media Transport Protocol Design", Work in Progress, Internet-Draft, draft-gruessing-moq-requirements-02, , <https://www.ietf.org/archive/id/draft-gruessing-moq-requirements-02.txt>.
- Cui, Y., Ma, C., Shi, H., Zheng, K., and W. Wang, "Deadline-aware Transport Protocol", Work in Progress, Internet-Draft, draft-shi-quic-dtp-06, , <https://www.ietf.org/archive/id/draft-shi-quic-dtp-06.txt>.
- Sharabayko, M., Sharabayko, M., Dube, J., Kim, J., and J. Kim, "The SRT Protocol", Work in Progress, Internet-Draft, draft-sharabayko-srt-01, , <https://www.ietf.org/archive/id/draft-sharabayko-srt-01.txt>.
- Marx, R., Niccolini, L., and M. Seemann, "Main logging schema for qlog", Work in Progress, Internet-Draft, draft-ietf-quic-qlog-main-schema-03, , <https://www.ietf.org/archive/id/draft-ietf-quic-qlog-main-schema-03.txt>.
- Huitema, C., "Quic Timestamps For Measuring One-Way Delays", Work in Progress, Internet-Draft, draft-huitema-quic-ts-08, , <https://www.ietf.org/archive/id/draft-huitema-quic-ts-08.txt>.