perf(peer): request larger QUIC UDP socket buffers
Configure the s2n-quic Tokio IO provider on both client and server instead of using the address-only default provider. The configured provider asks the OS for 4 MiB send and receive buffers on each QUIC UDP socket, which avoids starting bulk LAN transfers on the tiny default UDP buffer sizes. I tested a wider version that also raised s2n-quic internal IO queues to 8 MiB, but that regressed S37 to 710.19 and 736.20 MiB/s in repeat runs. This commit keeps the narrower socket-buffer request, which measured faster than the prior flow-control-only tuning while leaving the internal queue defaults intact. The host used for measurement reports: - net.core.rmem_max = 16777216 - net.core.wmem_max = 16777216 - net.core.rmem_default = 212992 - net.core.wmem_default = 212992 S37 single-source throughput: - Step 1: 824.94 MiB/s, 6920.09 Mbit/s, 2.483s - Step 2 sample A: 848.15 MiB/s, 7114.81 Mbit/s, 2.415s - Step 2 sample B: 874.06 MiB/s, 7332.12 Mbit/s, 2.343s Test Plan: - just fmt - sysctl net.core.rmem_max net.core.wmem_max net.core.rmem_default \ net.core.wmem_default - python3 crates/lanspread-peer-cli/scripts/run_extended_scenarios.py S37 --build-image - python3 crates/lanspread-peer-cli/scripts/run_extended_scenarios.py S37 Refs: local LAN download performance investigation on 2026-05-20. Depends-on: cd8bcbfeedfa (QUIC flow-control and BBR tuning).
This commit is contained in:
@@ -10,7 +10,7 @@ use crate::{
|
||||
config::{CERT_PEM, KEY_PEM},
|
||||
context::PeerCtx,
|
||||
events,
|
||||
network::{quic_congestion_controller, quic_limits},
|
||||
network::{quic_congestion_controller, quic_io, quic_limits},
|
||||
services::{
|
||||
advertise::{monitor_mdns_events, start_mdns_advertiser},
|
||||
stream::handle_peer_stream,
|
||||
@@ -29,7 +29,7 @@ pub async fn run_server_component(
|
||||
|
||||
let mut server = Server::builder()
|
||||
.with_tls((CERT_PEM, KEY_PEM))?
|
||||
.with_io(addr)?
|
||||
.with_io(quic_io(addr)?)?
|
||||
.with_limits(limits)?
|
||||
.with_congestion_controller(quic_congestion_controller())?
|
||||
.start()?;
|
||||
|
||||
Reference in New Issue
Block a user