1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-25 15:43:13 +03:00
Commit Graph

135 Commits

Author SHA1 Message Date
Joseph Beshay
a6897c8284 Fix typo in log for PACING_TIMER_TICK knob
Summary: The log for PACING_TIMER_TICK knob was referring to another knob name. This fixes it.

Reviewed By: sharmafb

Differential Revision: D45834217

fbshipit-source-id: c26c481633218dc165a65efcf029e7c636947dea
2023-05-15 10:02:12 -07:00
Matt Joras
51333a1583 Don't subtract out small non DSR packets from packet limit.
Summary: For non-DSR streams we can fill a packet that has e.g. stream limit updates and flow control with stream data. With DSR, we can't do that and thus packets that contain this data end up counting against the packet limit. This means that we often end up writing fewer packets per write loop when using DSR. Account for this by basically discounting the non-DSR packet in a write loop if it was "small".

Reviewed By: shodoco

Differential Revision: D45754930

fbshipit-source-id: ca494a4bd042de05c12a4d45e80dd5582fe12248
2023-05-10 18:52:17 -07:00
Matt Joras
25e8eb2f4e Randomly write DSR or non DSR first.
Summary:
Due to the fact that store DSR and non DSR streams in separate priority queues, we end up having to make a decision on which to write first.

Longer term we should merge them into a single priority queue, but in the meantime to mitigate potential starvation, randomly flip flop between which we write first in a given write loop.

Reviewed By: jbeshay, shodoco

Differential Revision: D45701230

fbshipit-source-id: 894179e457a4d6f7364767108f9290ff267eb977
2023-05-09 14:27:17 -07:00
Matt Joras
b5b3ad47b7 Add optional "ACK clocking" mode to the write looper.
Summary:
We've long seen issues where paced congestion controllers can't keep up with the sending rate at low RTTs. While we have one mitigation for this, it only works after the pacing timer has fired. This introduces a new behavior that effectively makes the write looper ACK clock some of the time.

The way it works is that when we call updateWriteLooper, if we've already missed the next pacing wakeup or it is going to fire soon (within 1ms), we cancel it and do a write in this loop. This effectively gives us multiple opportunities to write each burst, e.g. after receiving an ACK.

Reviewed By: kvtsoy

Differential Revision: D45052984

fbshipit-source-id: 591b6f5f374f4886dffa1e9be78df02d17fcc27c
2023-04-18 15:48:23 -07:00
Hani Damlaj
a0e456bc03 migrate folly::none assignment operator to .reset()
Summary: - .reset() is probably fractionally less costly than the assignment operator?

Reviewed By: sharmafb

Differential Revision: D43579041

fbshipit-source-id: 4838b6c21e94197782cf56866950be1dbf65b106
2023-03-03 05:39:57 -08:00
Konstantin Tsoy
6beae9d280 Protect server transport in a callback
Reviewed By: hanidamlaj

Differential Revision: D43546517

fbshipit-source-id: ede330167c5281ff8975acbf1bdbc27e420597d8
2023-02-24 11:12:37 -08:00
Konstantin Tsoy
377260f704 Remove d6d code
Summary: we're not using it

Reviewed By: mjoras

Differential Revision: D43482344

fbshipit-source-id: 05ac6792848e32e7c1bcf53a2df172852b5def62
2023-02-23 20:11:24 -08:00
Brandon Schlinker
925472bdfc Store weak_ptr to SocketObserverContainer in ConnectionStateBase
Summary:
This diff changes `QuicConnectionStateBase` so that it stores a `std::weak_ptr<SocketObserverContainer>` instead of a `std::shared_ptr<SocketObserverContainer>`.

- `QuicConnectionStateBase` needs a pointer to the `SocketObserverContainer` so that loss / ACK / other processing logic can access the observer container and send the observers notifications. There may not be a `SocketObserverContainer` if the `QuicTransportBase` implementation does not support it.
- A `SocketObserverContainer` must not outlive the instance of the `QuicTransportBase` implementation that it is associated with. This is because observers are notified that the object being observed has been destroyed when the container is destroyed, and thus if the container outlives the lifetime of the transport, then the observers will think the transport is still alive when it is in fact dead.
- By storing a weak pointer to the `SocketObserverContainer` in the `QuicConnectionStateBase`, we provide access to the observer container without extending its lifetime. In parallel, because it is a managed pointer, we avoid the possibility of dereferencing a stale pointer (e.g., a pointer pointing to an object that has since been destroyed).

Reviewed By: mjoras

Differential Revision: D42856161

fbshipit-source-id: f35558a21fea91ba794adcf9b573dd48a626ea1f
2023-01-30 22:45:59 -08:00
Matt Joras
1275798146 Make the AckState for Initial/Handshake a unique_ptr
Summary:
We don't need to carry these states after the handshake is confirmed, so make them pointers instead. This will facilitate adding a structure to the AckState for tracking duplicate packets.

(Note: this ignores all push blocking failures!)

Reviewed By: hanidamlaj

Differential Revision: D41626895

fbshipit-source-id: d8ac960b3672b9bb9adaaececa53a1203ec801e0
2022-12-20 11:08:43 -08:00
Sharad Jaiswal (Eng)
328c78d0e2 Add received packets timestamps to AckState
Summary:
Store timestamps/packet numbers of recently received packets in AckState.

 - The maximum number of packets stored is controlled by kMaxReceivedPktsTimestampsStored.
- The packet number of entries in the deque is guarenteed to increase
   monotonically because an entry is only added for a received packet
  if the packet number is greater than the packet number of the last
  element in the deque (e.g., entries are not added for packets that
  arrive out of order relative to previously received packets).

Reviewed By: bschlinker

Differential Revision: D37799023

fbshipit-source-id: 3b6bf2ba8ea15219a87bbdc2724fe23eebe66b70
2022-11-15 20:14:57 -08:00
Joseph Beshay
772b47adaa Do not use LOG_EVERY_N
Summary:
Fixes build error from Github actions
```
D:\a\mvfst\mvfst\quic\server\QuicServerTransport.cpp(1072): error C3861:
'__sync_add_and_fetch': identifier not found

```

Reviewed By: hanidamlaj

Differential Revision: D40327603

fbshipit-source-id: afae1b661322e80156c7d69b577f35f41b67ee73
2022-11-10 16:17:32 -08:00
Matt Joras
953235fbc7 Track largest packet acked per DSR stream.
Summary:
The normal loss detection only considers the reordering threshold per packet by comparing it with the largest ACKed packet in the ACK. This is largely based on the fact that QUIC packet numbers are monotonically increasing.

However, when using DSR there is a potential for a different host to be writing the packets to the wire. When there are multiple hosts doing this, there is a degree of reordering that is expected to happen.

Thus we can change the loss detection logic to adjust the largest packet ACKed and use the largest packet ACKed for a given DSR stream when the packet is a DSR packet. This allows for the natural reordering while detecting loss within the DSR sender's timeline of sent packets.

Note that this probably doesn't catch all of the nuances that can happen with the reordering, but it is a good start.

Reviewed By: kvtsoy

Differential Revision: D40647572

fbshipit-source-id: d84c6cd8040fb8c044ddd68fb1abc049ccddfc44
2022-10-27 14:35:11 -07:00
Matt Joras
c8f357156e Differentiate ACK_FREQUENCY policy early in connection.
Summary: This changes the experimental behavior of BBR sending ACK_FREQUENCY frames. Now instead of using the static ack eliciting threshold, early in the connection BBR will set the threshold to 2 which has been empirically shown to be a good "initial" value.

Reviewed By: jbeshay

Differential Revision: D40438721

fbshipit-source-id: 184b8025581b6152eea97f9b557b6343d980322d
2022-10-17 17:54:45 -07:00
Matt Joras
06aaca5fcd Add transport settings for disabling adaptive loss thresholds for DSR
Summary:
This is useful so we can run experiments that turn this feature off while we turn ACK_FREQUENCY policies on.

(Note: this ignores all push blocking failures!)

Reviewed By: yairgott

Differential Revision: D40148536

fbshipit-source-id: 84aa4a0639b43c8721db0db6885b6af6e1701bdd
2022-10-07 08:45:14 -07:00
Matt Joras
4c2a067ec4 Control ACK_FREQUENCY from BBR
Summary:
This introduces the ability for BBR to control ACK_FREQUENCY. It also introduces a knob which will let us experiment with different policies.

This code makes BBR issue a new ACK_FREQUENCY every round trip. This may be excessive, so BBR will track the last frame sent, and only send a new one if the new value is sufficiently different in terms of milliseconds.

Note that the only dynamic part of the frame currently will be the max ack delay, which is in terms of fractional RTTs. It is not clear yet how we should vary the other parameters dynamically.

Reviewed By: kvtsoy

Differential Revision: D39910417

fbshipit-source-id: 73cfdac40ca52185c33322017a893e5a02ee58e8
2022-09-30 22:42:54 -07:00
Matt Joras
5ad55f11e0 Temporarily disable remove from loss on spurious knob.
Summary:
As in title. Just remove the knob trigger for now as it is causing some issues with DSR.

(Note: this ignores all push blocking failures!)

Reviewed By: shodoco

Differential Revision: D39840220

fbshipit-source-id: 253e0b2c72f9926b902585df8e5a43bebc24b79b
2022-09-26 21:34:14 -07:00
Brandon Schlinker
5b8e0de5bd Improve transport close handling and observability
Summary:
The current `close` observer event marks when `closeImpl` is called. However, the actual close of the socket may be delayed for some time while the socket drains. I've changed the existing event to `closeStarted` and added a new event `closing` that marks the close of the underlying `AsyncUDPSocket`.

Adding the `closeStarted` event required two other changes which are difficult to separate from this diff:
- When a transport is destroyed, `QuicTransportBase` was calling `closeImpl` and also closing the UDP socket. However, because the `folly::ObserverContainer` used to store observers is maintained in classes that derive from `QuicTransportBase`, the observers are gone by the time the UDP socket is closed in the base class destructor. Thus, the UDP socket should be closed by the derived classes in their respective destructors. This requirement is inline with the existing code: `closeImpl` is called by all derived classes in their destructors. Made this change and added `DCHECK` statements in the `QuicTransportBase` destructor to ensure that derived classes cleanup after themselves.
- Writing tests with draining enabled and disabled required being able to set the transport settings. However, all of the existing `QuicTypedTransportTest` test cases were designed to operate after the connection was accepted (for the server impls) or established (for client impls), and transport settings cannot be updated at this state. Resolving this required adding new test classes in which the accept/connect operation is delayed until requested by the test.

Reviewed By: mjoras

Differential Revision: D39249604

fbshipit-source-id: 0ebf8b719c4d3b01d4f9509cf2b9a4fc72c2e737
2022-09-10 10:39:11 -07:00
Hani Damlaj
0ae79027df Issue Conn IDs As Needed
Summary:
- continually issuing new connection ids to peer as old connections ids are retired through RETIRE_CONN_ID frames
- add logic to parse and act on receiving RETIRE_CONN_ID frame

Reviewed By: mjoras

Differential Revision: D38443561

fbshipit-source-id: 82fb679f482fd69c7b3a3385693d2e5575e92703
2022-08-25 17:47:45 -07:00
Duc Nguyen
efb1923fd0 Handle MAX_PACING_RATE_KNOB_SEQUENCED transport knob
Summary: Handle MAX_PACING_RATE_KNOB_SEQUENCED transport knob with which a client can suggest a limit on the pacing rate used by the server, if it has pacing enabled. This knob also include a sequence number with which the server can use to determine out-of-order frames.

Reviewed By: bschlinker

Differential Revision: D37062350

fbshipit-source-id: 981f0c9df99cf30de6c676784409a43d45f62ff2
2022-06-29 19:01:11 -07:00
Duc Nguyen
5831b7d7fe Support both uint64_t and std::string as value in TransportKnobParam
Reviewed By: bschlinker

Differential Revision: D37056877

fbshipit-source-id: de6cee779424d5b4ce7fb741d5a1bedcf3de3736
2022-06-28 12:18:33 -07:00
Matt Joras
a83aa2c5d7 Split adaptive thresholds to reorderng and time.
Summary: We want to experiment with just using adaptive thresholds for reordering.

Reviewed By: kvtsoy

Differential Revision: D37190894

fbshipit-source-id: 8c388d18c65a75ce1740cd2c193f444fe9e86ace
2022-06-20 19:09:43 -07:00
Duc Nguyen
1eeb2a6c0e Add stats for out-of-order transport knob
Reviewed By: bschlinker

Differential Revision: D37043654

fbshipit-source-id: 283e4f63db12cfd6f0ad91474417786ec3b6fd1d
2022-06-10 13:48:28 -07:00
Duc Nguyen
6902d68265 Handle out-of-order MAX_PACING_RATE_KNOB frames
Reviewed By: bschlinker

Differential Revision: D36956938

fbshipit-source-id: 517b9fa053e8c632fe62580b6cb534dc8e7292e3
2022-06-09 18:24:24 -07:00
Konstantin Tsoy
5fc26bc72b Server to use separate max conn id limit
Summary: As opposed to self default.

Reviewed By: mjoras

Differential Revision: D36085316

fbshipit-source-id: c445be64ca32c2b81f68d5bfe84020d33c06fb7c
2022-05-04 20:06:05 -07:00
Matt Joras
abc1308078 Optionally remove from loss buffer on spurious loss.
Summary:
This is a pretty "obvious" thing to do. When a packet with a stream frame is lost, we move that data into the lossBuffer, possibly merging it with existing data.

We track lost packets for a bit to see if they are later ACKed, which indicates the loss was "spurious". When this happens we can search the loss buffer and remove the segment of data which was actually ACKed, obviating a spurious retransmission.

Reviewed By: jbeshay

Differential Revision: D35972951

fbshipit-source-id: f5d0d4beb677d89819d77a8af297db731a8d849e
2022-05-02 12:11:35 -07:00
Hani Damlaj
747c41c30d Fix Probing Bytes Limit
Summary:
- PTOs should not be subject to congestion control limits
- Quickly recover from PTOs being writableBytesLimited by calling onPTOAlarm() as soon as we become unblocked

Reviewed By: mjoras

Differential Revision: D35480409

fbshipit-source-id: 51500db6fff17a7badefea8bda7f63141e97f746
2022-04-19 00:50:36 -07:00
Brandon Schlinker
744ae1f78e Use folly::ObserverContainer for socket observer [4/x]
Summary:
This diff is part of larger change to switch to using `folly::ObserverContainer` (introduced in D27062840).

This diff:
- Changes `LegacyObserver` to inherit from the new `Observer` class by adding a compatibility layer. This compatibility layer enables existing observers to continue to be supported.
- Changes generation of observer events so that they are routed through `ObserverContainer::invokeInterfaceMethod`
- Temporarily removes some of the reentrancy protection that previously existed, as it was not being applied consistently — some events had reentrancy protection, some did not. This will be reintroduced in the next diff.
- Improves some unit tests for observers during the transition process.

Differential Revision: D35268271

fbshipit-source-id: 5731c8a9aa8da8a2da1dd23d093e5f2e1a692653
2022-04-18 04:19:31 -07:00
Brandon Schlinker
f20eb76865 Use folly::ObserverContainer for socket observer [3/x]
Summary:
This diff is part of larger change to switch to using `folly::ObserverContainer` (introduced in D27062840).

This diff:
- Adds methods to `QuicSocket` to support adding and removing `ObserverContainer` observers. By default, `QuicSocket` implementations will not support observers as `QuicSocket::getSocketObserverContainer` returns `nullptr`, and this will cause `QuicSocket::addObserver` and `QuicSocket::removeObserver` to fail gracefully.
- Adds support in `QuicClientTransport` and `QuicServerTransport` for `ObserverContainer` observers by overriding `getSocketObserverContainer`. Each implementation creates an `ObserverContainer` on construction that is destroyed on destruction.
- Adds the `close` event to the new observer interface and adds corresponding support in `QuicTransportBase`. This allows both the old and new observers to receive the close event. The next diff will do a hard cutover of the rest of the events.

Differential Revision: D35000960

fbshipit-source-id: e75807c97f4385532bf36244591a259aa0a2f4cc
2022-04-18 04:19:31 -07:00
Hani Damlaj
c8bf098e5d Change Implementation of WritableBytesLimit
Summary: - updating usage of WritableBytesLimit

Reviewed By: mjoras

Differential Revision: D33079816

fbshipit-source-id: 1854f40a7b00526afb2167764aeddf55edb1771f
2022-04-04 16:18:52 -07:00
Hani Damlaj
94cda41d85 FullHandshakeDone Callback
Summary:
```
buck test //quic/server/test:QuicServerTransportTest
```

Reviewed By: mjoras

Differential Revision: D34696930

fbshipit-source-id: df563fc00773df7acb9bea0bb02d26e99c1fb02f
2022-03-11 13:13:00 -08:00
Matt Joras
f0bab29cb3 Add ability for server to export 1RTT cipher.
Summary: As in title.

Reviewed By: jbeshay

Differential Revision: D31513079

fbshipit-source-id: add12857a66cedd4f0dbd071661f0885d462ffa2
2022-03-01 17:46:52 -08:00
Matt Joras
360c211738 Keepalive timer support
Summary:
This implements a basic keepalive timer at the transport layer.

The basic idea is to leverage the same conditions as the idle timer. The keepalive timer will fire ~15% before the idle timer and trigger a PING frame. This has the effect of keeping the connection open if the PING is acknowledged.

Reviewed By: jbeshay

Differential Revision: D34256174

fbshipit-source-id: a8cee579f5b09bdfa23bcdc7cf4c70de299de3bd
2022-02-24 12:40:01 -08:00
Konstantin Tsoy
a70ffbeb29 Rename ConnectionCallbackNew back to ConnectionCallback
Summary: Rename ConnectionCallbackNew back to ConnectionCallback

Reviewed By: mjoras

Differential Revision: D33979956

fbshipit-source-id: 6c133a406c4bf6799838ffc36701267a938cb4a3
2022-02-23 12:57:31 -08:00
Joseph Beshay
30423c75c6 Consolidate transport knob definitions into QuicConstants
Summary: The two lists of transport knobs in two different locations keep getting out of sync. This consolidates them into one location which is QuicConstants.

Reviewed By: mjoras

Differential Revision: D34227259

fbshipit-source-id: 26b20620f4ef85f8887e7294512155060a057839
2022-02-22 17:27:47 -08:00
Konstantin Tsoy
2e468b5e5d Add new connection end cb option to client/server transport
Summary: Add new connection end cb option to client/server transport

Reviewed By: mjoras

Differential Revision: D34190871

fbshipit-source-id: 375cf95bc8dbe4ab759140cfb4b33b732869953f
2022-02-22 14:24:23 -08:00
Konstantin Tsoy
54ce32396c get rid of callbacks indirection layer
Summary: get rid of callbacks indirection layer

Reviewed By: mjoras

Differential Revision: D34189595

fbshipit-source-id: e4a0aba768b17054f06091c12ef66f1a8019885f
2022-02-15 11:45:09 -08:00
Konstantin Tsoy
cecc1ba279 Introduce QuicError struct
Summary: Instead of using std::pair everywhere

Reviewed By: mjoras

Differential Revision: D34146686

fbshipit-source-id: dfe48f43775de868aba06a5b9b5a004e5793bdbb
2022-02-14 16:00:21 -08:00
Joseph Beshay
1234cfc6ac Add experimental config for the pacer to use an adjustable burst
Summary:
Add an experimental setting in the TokenlessPacer to use an adjustable burstSize in the to compensate for delays in pacer loop timer with a limit of 5 loop intervals.

This practically restores some concept of tokens in the pacer. This should help with pacer timer delays observed in relatively high BDP links.

To help quantify how often the delays happen, the QuicStats pacer_lagged counter is updated every time the pacer is delayed by more than 10% when the connection is not application limited.

In a test configuration across a 150 Mbps link with 150 ms round-trip delay, the experimental setting achieves ~25% higher bandwidth.

Reviewed By: bschlinker, mjoras

Differential Revision: D33035430

fbshipit-source-id: 4aa02821d609facf6c830647459319d44c6fc3bd
2022-02-11 12:36:54 -08:00
Konstantin Tsoy
dc79176a56 Deprecate old connection callback
Summary: Deprecate old connection callback

Reviewed By: jbeshay, lnicco

Differential Revision: D33695440

fbshipit-source-id: 043baa53b71453b5e2b9f60d890f1adcda7c65b5
2022-02-02 19:03:57 -08:00
Konstantin Tsoy
1ca4c4e66c Move tests to split callbacks
Summary:
Maine change is `MockConnectionCallback` -> `MockConnectionSetupCallback` + `MockConnectionCallbackNew`.
Everything else is changing tests to use the two new classes.

Differential Revision: D33076321

fbshipit-source-id: a938b63ce59f07f549b3e725caad8785348db7ed
2022-02-02 14:03:23 -08:00
Hani Damlaj
00e67c1bf9 mvfst License Header Update
Reviewed By: lnicco

Differential Revision: D33587012

fbshipit-source-id: 972eb440f0156c9c04aa6e8787561b18295c1a97
2022-01-18 13:56:12 -08:00
Hani Damlaj
2660a288b3 Update Company Name
Summary: - as title

Reviewed By: lnicco

Differential Revision: D33513410

fbshipit-source-id: 282b6f512cf83b9abb7990402661135b658f7bd1
2022-01-13 12:07:48 -08:00
Joseph Beshay
688d0ed31e Use adaptive thresholds for loss-detection through reordering and timeout
Summary:
Experiment with using adaptive thresholds for detecting packet losses through reordering or timeouts. When transportSettings.useAdaptiveLossThresholds is set to true, every time a spurious loss is detected, the thresholds will be updated to avoid marking similar packets as losses. In cases with a high degree of packet reordering, this improves bandwidth utilization significantly.

The useAdaptiveLossThresholds setting can be set using a new transport knob.

This was verified by transferring a 5 MB object across 50 Mbps link with high random packet reordering (emulated using netem)
```
+ tc -s qdisc replace dev veth7 root handle 1:0 netem rate 50Mbit limit 1250
+ tc -s qdisc add dev veth7 parent 1:0 handle 2: netem delay 15ms 5ms distribution normal limit 1250
```

Without adaptive thresholds, ~43% of sent bytes are retransmissions. Goodput is 2 Mbps.
With adaptive thresholds, ~3% of sent bytes are retransmissions. Goodput is ~17.5 Mbps.

Reviewed By: mjoras

Differential Revision: D33354584

fbshipit-source-id: 390bfb3398d499fcdf97a5cfd5654da3eeabed17
2022-01-07 18:42:12 -08:00
Kyle Mirzakhanian
29ed688b58 Add padding to QUIC short header packets
Summary:
Adds paddingModulo to QuicPacketBuilder, which pads up short header packets so that the length remaining of a packet is a multiple of paddingModulo

ie a message of length 25 and max packet size of 40 with a paddingModulo of 8 will get 7 padding frames to a total length of 32. (and a message of length 26 will get 6 padding frames to also go up to a total length of 32)

Reviewed By: mjoras

Differential Revision: D32858254

fbshipit-source-id: 99ada01108429db9f9bba1e342daf99e80385179
2022-01-07 15:02:05 -08:00
Hani Damlaj
f60c254c49 Log Server Handshake Size
Summary: - logging number of bytes the server sent during the handshake for insight.

Reviewed By: mjoras

Differential Revision: D33069800

fbshipit-source-id: e7e8f25183ee30de99e2971bae3c6b93882f6e63
2022-01-06 10:34:06 -08:00
Joseph Beshay
cae8a1b705 Add experimental config for CUBIC with better Hystart limits
Summary:
Add experimental CUBIC's hystart delay bounds that ensure CUBIC does exit Hystart too early. Current limits of 2,8 us are too short.

On a 100 Mbps link with 150 ms round-trip delay, this improved CUBIC's throughput from ~14 Mbps to ~80 Mbps.

Reviewed By: mjoras

Differential Revision: D33035403

fbshipit-source-id: bdeb081111f8053bc7fb01002316d991d8bac2e0
2021-12-16 08:42:01 -08:00
Matt Joras
e784fafb10 Global limit on unfinished handshakes.
Summary:
This implements a global (per process) limit on unfinished handshakes from unverified source addresses.

This limits the ability of an attacker to create connection state without also allocating connection state themselves. By default the limit is 1024.

Reviewed By: kvtsoy

Differential Revision: D32772165

fbshipit-source-id: 6c195169377a9f687c54bc9782cc58fe085e1275
2021-12-09 12:55:33 -08:00
Matt Joras
6afecccd25 Track loop limit time across functions.
Summary: Otherwise we can end up in a situation where the non-DSR scheduler was limited by the loop time while the DSR scheduler is not, leading to an inconsistency.

Reviewed By: lnicco

Differential Revision: D32570027

fbshipit-source-id: f43d2517589c22bac0f2bb76626cc55c2a21fa5d
2021-11-19 19:04:37 -08:00
Joseph Beshay
fb274d273e Add Transport Knob for controlling Auto Background Mode on a QUIC transport
Summary:
- Change the knob param handler to receive a Transport rather than a ConnectionState.
- Add a new transport knob that can set the priority threshold and target utilization factor for automatically controlling background mode based upon active streams.

Reviewed By: mjoras

Differential Revision: D31847477

fbshipit-source-id: 4cfeff04b9fe60eb25ab484f460e252ef6970646
2021-10-25 12:09:16 -07:00
Joseph Beshay
65bc8cf2c4 Add experimental background transport mode to BBR
Summary:
Experiment with a less aggressive variant of BBR that could be used for background requests in order to improve responsiveness of foreground requests.

BBR's agressiveness can be controlled through a new transport knob CC_AGRESSIVENESS_KNOB(0xccab) which accepts values between 25-100. The value indicates the percentage of the available BW the congestion controller should try to use, leaving headroom for other flows.

Aggressiveness of BBR is reduced by adjusting BBR's startup gain during the STARTUP phase. During the ProbeBW phase, BBR uses a longer pacing gain progression with values that intentionally underutilize the available BW.

Reviewed By: bschlinker, mjoras

Differential Revision: D31219364

fbshipit-source-id: c67ffcf03d27fd4d41be2d58f00f4f960c7646c7
2021-10-14 10:41:13 -07:00