You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parakeet: flush_pending early reset causes batch=1 throughput collapse #8664
PR #8535 (VRAM-aware batch sizing) introduced an early _flush_pending = False reset on line 273 of batch_engine.py that causes 72.8% of GPU batches to contain only 1 file, down from 8-12 before.
Root Cause
_flush_batch() line 273 sets self._flush_pending = False immediately after popping requests from _pending — before GPU inference completes. Combined with the 2ms flush timer, this creates a rapid chain of batch=1 flushes:
Repeat — GPU never has time to process before next flush fires
Before PR #8535:_flush_pending was only reset in _guarded_flush's finally block, staying True for the entire GPU inference time (2-5s). Requests accumulated during GPU processing → batches of 8-12.
Evidence (30 min post-deploy)
500 flushes: avg=1.6 files/batch, 72.8% batch=1
VRAM limit=32 for ALL batches (formula is not constraining)
Duration probes: zero failures
504s from LB timeout (30s) when queue wait exceeded threshold
504s self-resolved when backlog drained; system stable but suboptimal
Fix
Remove line 273 (self._flush_pending = False inside _flush_batch). Let _flush_pending reset only in _guarded_flush's finally block, restoring pre-PR accumulation behavior. The max_inflight semaphore remains for future concurrent batching work.
Impact
GPU efficiency: ~4x lower throughput per batch (batch=1 vs 8-12)
504s during peak load (resolved at steady state)
Zero OOMs (VRAM formula working correctly but never needed)
Activity
Fix batch=1 throughput collapse by removing early _flush_pending reset