Skip to content

Conversation

@Mark-Simulacrum
Copy link
Collaborator

@Mark-Simulacrum Mark-Simulacrum commented Jul 5, 2023

Resolved issues:

resolves #1811

Description of changes:

This exposes new APIs for changing the internal send/receive buffers in the Tokio provider. It also changes the default transmit buffer to 128kb from 8mb, which on some hardware platforms significantly reduces latencies on one workload. (These are overheads from a baseline, which is why negatives can slip in, but should still be roughly comparable, as the baseline and runs with QUIC are the same workload).

  • 1.21: p10: 652 / p50: 724 / p80: 770
  • 1.23 (8Mb): p10: 1014 / p50: 1082 / p80: 2276
  • 1.23 (512kb): p10: 599 / p50: 760 / p80: 903
  • 1.23 (128kb): p10: 303 / p50: -84 / p80: 112

Call-outs:

Not a huge fan of the name of these new methods, happy to change that.

Testing:

See latency figures above.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This cuts the default transmit buffer to 128kb, which reduces latencies
when the network hardware cannot keep up with sending (or so is the
current theory).
@Mark-Simulacrum
Copy link
Collaborator Author

I think test failures are spurious?

@camshaft
Copy link
Contributor

camshaft commented Jul 5, 2023

Yes most are unrelated. The only one we might need to look into is the arm test. The failures are coming from the integration test for the sockets which is in this path.

@Mark-Simulacrum
Copy link
Collaborator Author

Mind retrying the test? I want to make sure it's not spurious before I go digging into setting up an Arm host.

@camshaft
Copy link
Contributor

camshaft commented Jul 5, 2023

So the arm test is run in a QEMU machine. I'm wondering if the more shallow buffers are causing it to take longer in this environment and the test bailing. So we may need to either increase the timeout or decrease the number of packets.

@camshaft camshaft changed the title Configurable buffer sizes + default tx buffer change feat(s2n-quic-platform): Configurable buffer sizes + default tx buffer change Jul 5, 2023
@camshaft camshaft merged commit 994b150 into aws:main Jul 5, 2023
@Mark-Simulacrum Mark-Simulacrum deleted the configurable-buffers branch July 7, 2023 13:31
kagarmoe pushed a commit that referenced this pull request Jul 27, 2023
…r change (#1859)

* Support configuring internal tx/rx buffer sizes

* Shrink transmit buffer default size

This cuts the default transmit buffer to 128kb, which reduces latencies
when the network hardware cannot keep up with sending (or so is the
current theory).

* Increase timeout for test

In QEMU we see worse performance.

* Cut to 30 packets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make message buffer sizes configurable

2 participants