From f32bcafc0186565c1b4b84b204d367b1d03055da Mon Sep 17 00:00:00 2001 From: ciregenz Date: Fri, 7 Aug 2026 19:51:25 -0700 Subject: [PATCH] [eric] apps: idle pool holds 6 frozen runtimes instead of 3, affordable now that the TTL bounds their lifetime --- backend/apps/outputs/runtime_proc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/apps/outputs/runtime_proc.py b/backend/apps/outputs/runtime_proc.py index d10c2f38..8498f1dc 100644 --- a/backend/apps/outputs/runtime_proc.py +++ b/backend/apps/outputs/runtime_proc.py @@ -25,7 +25,10 @@ FRONTEND_BIND_POLL_INTERVAL = 0.08 LOG_BUFFER_LINES = 2000 # Idle runtimes kept in LRU; trades memory for instant switch-back, beyond 1 because typical users ping-pong 2-3 apps. -MAX_IDLE_RUNTIMES = 3 +# Raised from 3 once the idle TTL landed: the cap used to be the ONLY bound on parked memory, so it +# had to be tight; now anything unattended dies at 15 minutes regardless, so the pool can afford to +# make instant-reopen cover a realistic handful of apps instead of the last three touched. +MAX_IDLE_RUNTIMES = 6 # How long a detached runtime may sit frozen in the idle pool before it is fully stopped. Frozen # costs 0% CPU but keeps holding memory and its port; past this nobody is coming back for it soon # and a fresh spawn on the next open is a fair trade for not squatting RAM indefinitely.