From 552d1c584b9025c67f6386d29da2abe6c26c8fcd Mon Sep 17 00:00:00 2001 From: Will Chandler Date: Mon, 30 Sep 2024 16:38:11 -0400 Subject: [PATCH] Comment on why we're increasing recv_buf --- illumos-utils/src/ipadm.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/illumos-utils/src/ipadm.rs b/illumos-utils/src/ipadm.rs index 1633f31953..ff99cd7a26 100644 --- a/illumos-utils/src/ipadm.rs +++ b/illumos-utils/src/ipadm.rs @@ -201,6 +201,14 @@ impl Ipadm { /// Set TCP recv_buf to 1 MB. pub fn set_tcp_recv_buf() -> Result<(), ExecutionError> { let mut cmd = std::process::Command::new(PFEXEC); + + // This is to improve single-connection throughput on large uploads + // from clients, e.g., images. Modern browsers will almost always use + // HTTP/2, which will multiplex concurrent writes to the same host over + // a single TCP connection. The small default receive window size is a + // major bottleneck, see + // https://github.com/oxidecomputer/console/issues/2096 for further + // details. let cmd = cmd.args(&[ IPADM, "set-prop",