Repository navigation
feat(colab_fleet): persistent VM session reuse, polite spawn pacing & exponential 503 backoff - #38
Merged
Conversation
… exp backoff Reuses live compatible sessions across sequential jobs/shards (--reuse-sessions, default on, --max-jobs-per-session 16) to cut VM creations ~10x and eliminate cold-start overhead, while immediately draining idle sessions with no compatible pending work. Adds polite spawn pacing (--spawn-spacing-s 18) between distinct VM creations, per-SKU exponential backoff with jitter (30s -> 60s -> 120s -> cap 300s) on 503/429/ReadTimeout plus optional --wait-on-cooldown, and redacts R2 account subdomains in S3 backend describe(). Signed-off-by: Bobby Bones <saariuscrypto@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up hardening for
tools/colab_fleet.pybased on live multi-wave Colab fleet runs:--reuse-sessions, default ON;--max-jobs-per-session 16):rc=0when compatible pending jobs remain and reuses them directly (session_reused), cutting VM spawns ~10× and eliminating cold starts.zero_fleet_leaked=true.euw4b0):sessions_created=1,sessions_reused=3,4.48s–7.14s/shard,0leaked sessions.--spawn-spacing-s 18.0between distinctcolab newcalls to avoid Colab rapid-spawn burst throttles.30s -> 60s -> 120s -> 240s -> cap 300s) viacompute_backoff_s()plus optional--wait-on-cooldown.https://<hex>.r2.cloudflarestorage.cominS3CompatibleSyncBackend.describe()so account IDs are never written toSTATE.md/PROOF.md.Verification
python3 tools/colab_fleet.py --self-test— PASSpython3 tools/test_colab_fleet.py -v— 9/9 PASS (including persistent VM reuse, spawn spacing, exponential backoff + jitter, and R2 endpoint masking)CPU_HMsession (sessions_created=1, sessions_reused=3, zero_fleet_leaked=true).