From ec8d498ba5040b7ba862211975d2043baa6e5536 Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Mon, 15 Jun 2026 07:59:44 -0500 Subject: sdkconfig: revert TCP window bump — net-negative on /frame path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumping WND/SND_BUF to 32 KiB + RECVMBOX to 16 + SACK on regressed ttfb from ~350µs to ~1.2ms across every frame and introduced periodic 250+ms body stalls (TCP retransmit on the larger window). Mean body unchanged. Reason: Scrypted's per-frame fetch() opens a fresh TCP socket, so the larger receive window just slows slow-start on every new connection rather than helping. Reverted to lwIP defaults. The real fix is HTTP keep-alive on the Scrypted side; will revisit window tuning once persistent connections are in place. README backlog updated with what we learned. --- sdkconfig.defaults | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sdkconfig.defaults') diff --git a/sdkconfig.defaults b/sdkconfig.defaults index 638f6e8..4c50a23 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -29,6 +29,14 @@ CONFIG_LWIP_IPV4=y CONFIG_LWIP_IPV6=y CONFIG_MDNS_MAX_INTERFACES=1 +# TCP receive-window tuning attempted (WND/SND_BUF=32k, RECVMBOX=16, +# SACK on). Measured net-negative on the /frame path: ttfb regressed +# from ~350µs to ~1.2ms, body unchanged, and periodic 250+ms stalls +# appeared. Reason: Scrypted's per-frame fetch() opens a fresh TCP +# socket each time, so the larger window just slows slow-start. +# Reverted; revisit once we switch to HTTP keep-alive on the Scrypted +# side. Keeping the lwIP defaults. + # HTTP server CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024 CONFIG_HTTPD_MAX_URI_LEN=512 -- cgit v1.2.3