From b7fd69815eea3f562d668e51c520d3cfc5f24f3d Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 29 Jun 2026 19:41:52 -0400 Subject: [PATCH] feat(agent): raise worker cap to 32 + size the HTTP pool for it (#114) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At 8 workers the GPU sat at ~5% util / <5GB VRAM — the pipeline is I/O-bound (downloading + decoding images over HTTP), so the GPU starves until many workers overlap that I/O. Raise MAX_CONCURRENCY 8→32 and make the UI worker control a number input (reaching 32 by ±1 was tedious); the cap is reported via /status so the UI clamps to it. Also size the shared requests pool (pool_maxsize=64) — the default 10 would have throttled 32 workers + spammed "connection pool is full". Verified by running; watch GPU util/VRAM climb as you dial up. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01Ttrj5P7upUTueSfoJcxEqa --- agent/fc_agent/app.py | 17 ++++++++++++----- agent/fc_agent/client.py | 6 ++++++ agent/fc_agent/worker.py | 6 +++++- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/agent/fc_agent/app.py b/agent/fc_agent/app.py index f93b9fe..c7fb992 100644 --- a/agent/fc_agent/app.py +++ b/agent/fc_agent/app.py @@ -75,9 +75,11 @@ _PAGE = """
workers - 1 + - (more = faster + more GPU) + (more = overlap I/O, fill the GPU) max 8
stopped
state
@@ -89,16 +91,21 @@ _PAGE = """