Subject: [quicwg/base-drafts] QPACK SC: No encoder memory for blocked (#4008)

From: Mike Bishop <[email-masked]>
Date: Mon, 17 Aug 2020 12:25:15 -0700

Per discussion on Slack, expanding this discussion in the Security Considerations to be more accurate.  Editorial, since these are purely statements about the properties of the design.
You can view, comment on, or merge this pull request online at:

  https://github.com/quicwg/base-drafts/pull/4008

-- Commit Summary --

  * No encoder memory for blocked

-- File Changes --

    M draft-ietf-quic-qpack.md (10)

-- Patch Links --

https://github.com/quicwg/base-drafts/pull/4008.patch
https://github.com/quicwg/base-drafts/pull/4008.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4008

---

From: Martin Thomson <[email-masked]>
Date: Mon, 17 Aug 2020 15:37:50 -0700

@martinthomson approved this pull request.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4008#pullrequestreview-468877321

---

From: Dmitri Tikhonov <[email-masked]>
Date: Mon, 17 Aug 2020 18:25:34 -0700

> An encoder allocates memory to track all dynamic table references in unacknowledged representations.  Implementations can directly limit the amount of state memory by only using as many references to the dynamic table as it wishes to track; no signaling to the decoder is required.

This is true, but this is also obvious, at least once you start implementing the encoder.  Too, there is the natural limit on dynamic references: it is the function of the product of the number of allowed streams and the number of entries in the dynamic table (which itself is a function of the table size).

I am concerned that this new verbiage puts the wrong thought into the head of the implementer; we should not encourage this.  Limiting the number of dynamic table references (done out of memory conservation zeal) affects compression performance directly -- it worsens it.

Perhaps we can tack on the following sentence to the end of the paragraph:

> Note that limiting the number of references is likely to affect performance negatively.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4008#issuecomment-675196494

---

From: Martin Thomson <[email-masked]>
Date: Mon, 17 Aug 2020 18:51:44 -0700

I'm OK with that, though I would qualify with "compression performance", as performance has other dimensions that the extra state might impinge upon.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4008#issuecomment-675203143

---

From: Dmitri Tikhonov <[email-masked]>
Date: Mon, 17 Aug 2020 18:59:20 -0700

Another thing to note is that sometimes dynamic table references do not have to have their own objects in the encoder.  For examples, they are [virtually free](https://github.com/litespeedtech/ls-qpack/blob/v2.2.0/lsqpack.c#L255L256) in ls-qpack.

(Everyone reading this in 2022: you're welcome)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4008#issuecomment-675204976

---

From: Dmitri Tikhonov <[email-masked]>
Date: Mon, 17 Aug 2020 19:00:58 -0700

Yeah, compression performance qualification is a good suggestion.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4008#issuecomment-675205376

---

From: Mike Bishop <[email-masked]>
Date: Tue, 18 Aug 2020 06:35:58 -0700

@MikeBishop pushed 1 commit.

4bdcea58d8163be48647c178da7d14e4042a4218  Caution

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/4008/files/f05864fdd24b603a37afcfbd5aaed95ff67fffac..4bdcea58d8163be48647c178da7d14e4042a4218

---

From: Dmitri Tikhonov <[email-masked]>
Date: Tue, 18 Aug 2020 06:46:09 -0700

@dtikhonov approved this pull request.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4008#pullrequestreview-469470702

---

From: afrind <[email-masked]>
Date: Tue, 18 Aug 2020 13:15:12 -0700

@afrind commented on this pull request.

> @@ -1362,9 +1362,14 @@ allows (see {{eviction}}).
 A decoder can limit the amount of state memory used for blocked streams by
 setting an appropriate value for the maximum number of blocked streams.  In
 HTTP/3, this is realized by setting an appropriate value for the
-QPACK_BLOCKED_STREAMS parameter.  An encoder can limit the amount of state
-memory by only using as many blocked streams as it wishes to support; no
-signaling to the decoder is required.
+QPACK_BLOCKED_STREAMS parameter.  Streams which risk becoming blocked consume no
+additional state memory on the encoder.
+
+An encoder allocates memory to track all dynamic table references in
+unacknowledged representations.  Implementations can directly limit the amount

representations are not acknowledged, encoded field section blocks are, right?

> @@ -1362,9 +1362,14 @@ allows (see {{eviction}}).
 A decoder can limit the amount of state memory used for blocked streams by
 setting an appropriate value for the maximum number of blocked streams.  In
 HTTP/3, this is realized by setting an appropriate value for the
-QPACK_BLOCKED_STREAMS parameter.  An encoder can limit the amount of state
-memory by only using as many blocked streams as it wishes to support; no
-signaling to the decoder is required.
+QPACK_BLOCKED_STREAMS parameter.  Streams which risk becoming blocked consume no
+additional state memory on the encoder.
+
+An encoder allocates memory to track all dynamic table references in
+unacknowledged representations.  Implementations can directly limit the amount
+of state memory by only using as many references to the dynamic table as it

Subject/pronoun agreement: "Implementations can...as it wishes".  Perhaps "An implementation can..."

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4008#pullrequestreview-469797267

---

From: Mike Bishop <[email-masked]>
Date: Tue, 18 Aug 2020 13:39:26 -0700

064a3d690a9ea6febb6359a060f19d671da6a9a1  @afrind's feedback

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/4008/files/4bdcea58d8163be48647c178da7d14e4042a4218..064a3d690a9ea6febb6359a060f19d671da6a9a1

---

From: afrind <[email-masked]>
Date: Tue, 18 Aug 2020 15:16:43 -0700

Merged #4008 into master.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/4008#event-3668324475