From 107b7e53f743325e48d9d554c0e4395aea8e5ffe Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Wed, 17 Jun 2026 01:38:18 +0200 Subject: [PATCH] fix(b3a-deploy): memory request/limit + PYTHONUNBUFFERED on ingest Job Bounded-window ingest peaks small; request 768Mi/limit 1536Mi makes the scheduler place it with headroom and stops it evicting neighbours (a prior unbounded run hit ~2.3Gi on a shared 6.4Gi node). PYTHONUNBUFFERED streams progress logs live. Co-Authored-By: Claude Opus 4.8 (1M context) --- infra/k8s/jobs/fxhnt-backtest-ingest-job.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/infra/k8s/jobs/fxhnt-backtest-ingest-job.yaml b/infra/k8s/jobs/fxhnt-backtest-ingest-job.yaml index 370e17b..fc61d6e 100644 --- a/infra/k8s/jobs/fxhnt-backtest-ingest-job.yaml +++ b/infra/k8s/jobs/fxhnt-backtest-ingest-job.yaml @@ -37,8 +37,16 @@ spec: env: - name: FXHNT_BACKTEST_WAREHOUSE_PATH value: /backtest-data/warehouse.duckdb + - name: PYTHONUNBUFFERED # stream ingest progress logs live (no stdout buffering) + value: "1" - name: TIINGO_API_KEY valueFrom: { secretKeyRef: { name: tiingo-api, key: key } } + # Bounded memory: the ingest now caps its in-flight window (~2x workers), so peak RSS is small and + # flat. The request+limit make the scheduler place this on a node with headroom and prevent it from + # evicting neighbours (an earlier unbounded run hit ~2.3Gi and was evicted off a shared 6.4Gi node). + resources: + requests: { memory: "768Mi", cpu: "250m" } + limits: { memory: "1536Mi" } volumeMounts: - { name: backtest-data, mountPath: /backtest-data } volumes: