[Bug] FlowStudio 0.3.87: heavy-workflow host-memory budget over-reserves 48 GiB and blocks first runs
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- kubernetes, python
- Lĩnh vực
- backend, infrastructure
Hướng nghiên cứu
Start by reading app/gpu/fit/host_mem_capacity.py and trace how its estimate is used alongside the heavy-workflow classification in app/workflow/analysis.py and the first-run request selection in app/engine/orchestration/spec_policy.py. The issue does not name tests, so locate the existing coverage for these paths before changing them. Done means first-run requests can schedule under realistic worker capacity and the UI estimate matches the engine budget.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Please Provide the basic information of the app
App name: FlowStudio
App URL in Olares Market: https://market.olares.com/app/market.olares/flowstudio
Version: FlowStudio 0.3.87, engine image beclab/flowstudio:engine-1.0.8 (ComfyUI v0.41.0)
Environment: Olares 1.12.7; worker node with NVIDIA RTX 5090 (24 GB), 96 GB RAM, ~24 GiB free Kubernetes memory requests in normal operation.
Describe the bug
FlowStudio over-reserves host memory for every workflow containing a UNETLoader, DualCLIPLoader, or CLIPLoader. These workflows are classified as "heavy", the GPU estimate is forced to 16,384 MiB, and the host-memory limit/initial request becomes 48 GiB. On the first run (before a peak has been measured), the Kubernetes request equals the limit, so the engine cannot schedule on a worker with ~24 GiB of free requests. The job stays pending and fails after the 600 s budget with engine_host_mem_unavailable.
This is not specific to ACE-Step/audio. It affects image and video workflows too. Observed on the same worker:
| Project | Type | UI estHost | Engine request (learned) | Limit | GPU quota |
|---|---|---|---|---|---|
| Qwen 2.1 T2I | image | 48 GiB | 14 GiB | 48 GiB | 24463 MiB |
| Qwen Image Edit R2 | image | 48 GiB | 48 GiB (failed, never learned) | 48 GiB | 24463 MiB |
| Qwen Image Edit R3 | image | 48 GiB | 33 GiB | 48 GiB | 24463 MiB |
| MiniMax H3 | video | 48 GiB | 28-48 GiB | 48 GiB | 24463 MiB |
| ACE-Step 1.5 XL Turbo | audio | 24 GiB | 26 GiB (peaks 21.9/24.7 GiB) | 48 GiB | 24463 MiB |
- Two Qwen Image 2.1 Image Edit jobs failed with
engine_host_mem_unavailable. - MiniMax H3 video and ACE-Step 1.5 XL Turbo required stopping four apps before the first engine could schedule.
- After a successful run, the request drops to the measured peak x1.2 (T2I 14 GiB, Image Edit R3 33 GiB, ACE 26 GiB). The first run never gets that chance because it cannot schedule.
The UI estimate and the engine budget are also inconsistent: the ACE-Step XL Turbo project shows estHostMemMib = 24576 (24 GiB) while the engine is created with 48 GiB. For image/video projects the UI also shows 48 GiB.
To Reproduce
- OS Version: Olares 1.12.7
- Browser: N/A (API/UI)
- On a worker with ~24 GiB free Kubernetes memory requests, select a heavy workflow (Qwen Image Edit, MiniMax H3, or ACE-Step 1.5 XL Turbo).
- Submit a job.
- Inspect
fs-eng-<project>:requests.memory = 48Gi,limits.memory = 48Gi. - The pod is unschedulable (
0/2 nodes are available: Insufficient memory); after 600 s the job fails withengine_host_mem_unavailable. - Stop ~25 GiB of apps; the job succeeds and the engine request is learned from the peak (e.g., 26 GiB for ACE, 33 GiB for Image Edit R3).
Expected behavior
- A heavy workflow's first run should use a realistic budget (e.g., catalog/VRAM estimate or a 32 GiB tier) instead of a blanket 48 GiB, or expose a per-scene
hostMemTargetMiboverride. - The first-run request should not block the very measurement that would teach FlowStudio the real peak.
estHostMemMibin the UI and the engine budget should be consistent.
Actual behavior
- 48 GiB initial request/limit; unschedulable on a 96 GB worker with normal apps.
- ACE UI says 24 GiB while the engine says 48 GiB.
- Image/video jobs fail with
engine_host_mem_unavailableeven when no video/audio job is running.
Root cause
app/workflow/analysis.py:_HEAVY_LOADER_CLASS_TYPESincludesUNETLoader,DualCLIPLoader,CLIPLoader,TripleCLIPLoader, etc.;GPU_MEM_HEAVY_MIB = 16384.app/gpu/fit/host_mem_capacity.py:HOST_MEM_DEFAULT_MIB = 24*1024,HOST_MEM_HEAVY_MIB = 48*1024;estimate_host_mem_mib()returns 48 GiB when the GPU estimate is >= 16384.app/engine/orchestration/spec_policy.py:quota_gpu_mem_mib()returns the platformmem_high(whole-card TimeSlice quota, 24463 MiB) for NVIDIA, independent of the workflow estimate.- First run:
select_engine_mem_request()returns the limit when no measured peak exists; only after a successful job does it usepeak * 1.2.
Suggested fixes
- Add a 32 GiB tier (observed peaks: 14-33 GiB) or use the catalog estimate when authoritative.
- Allow a per-scene
hostMemTargetMiboverride in the API/UI. - Unify the UI
estHostMemMiband the engine budget calculation. - Consider exposing/using the workflow VRAM estimate instead of the whole-card
mem_highGPU quota in TimeSlice mode. - Add a first-run fallback: if the default budget is unschedulable, retry with a lower request and escalate only on a real OOM (upward learning already exists).
Additional context
Log excerpt:
{"kind": "host_mem", "pod": "Unschedulable; 0/2 nodes are available: 2 Insufficient memory. preemption: 0/2 nodes are available: 2 No preemption victims found for incoming pod.", "event": "engine unavailable"}
{"job_id": "...", "waited_s": 30, "budget_s": 600, "event": "host memory insufficient to schedule engine, retrying later"}
- Ngôn ngữ chính
- Go Template
- Star
- 56
- Fork
- 44
- Merge trung bình
- 10 giờ 39 phút
- Pull request đã merge (30 ngày)
- 211
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của beclab/apps
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[supabase][0.0.15] olares-envoy-sidecar CrashLoopBackOff: gateway Envoy collides on base_id=0 (fix: --disable-hot-restart)Có thể đã có người làm @ethanwheatthin đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Update App] LeantimeĐang mởawaiting triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 51/100
beclab/apps#4062 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
v3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
pluginkollektiv/antispam-bee#952 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: middleware enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
PROJECT: website-redesign volunteers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
thewca/worldcubeassociation.org#16981 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
polish
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:core kind:bug priority:p3 ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày