We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a97609c commit a624c27Copy full SHA for a624c27
1 file changed
src/stream/tcb.rs
@@ -2,8 +2,11 @@ use super::seqnum::SeqNum;
2
use etherparse::TcpHeader;
3
use std::collections::BTreeMap;
4
5
-const MAX_UNACK: u32 = 1024 * 16; // 16KB
6
-const READ_BUFFER_SIZE: usize = 1024 * 16; // 16KB
+// Increase the default in-flight and receive buffer sizes to support high-throughput links.
+// These were previously 16KB which can severely limit upload throughput (throughput ~= window / RTT).
7
+// Make them 1MiB by default so the stack can utilize higher bandwidth-delay products.
8
+const MAX_UNACK: u32 = 1024 * 1024; // 1MiB
9
+const READ_BUFFER_SIZE: usize = 1024 * 1024; // 1MiB
10
const MAX_COUNT_FOR_DUP_ACK: usize = 3; // Maximum number of duplicate ACKs before retransmission
11
12
/// Retransmission timeout
0 commit comments