Skip to content

docs(examples): VolumeCache warm-cache example + transport benchmarks#48

Open
deanq wants to merge 6 commits into
mainfrom
deanq/sls-367-volume-cache-example
Open

docs(examples): VolumeCache warm-cache example + transport benchmarks#48
deanq wants to merge 6 commits into
mainfrom
deanq/sls-367-volume-cache-example

Conversation

@deanq

@deanq deanq commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

Adds a 05_data_workflows/05_volume_warm_cache/ example for runpod.serverless.VolumeCache plus a benchmark suite, including the quadrant transport benchmark that motivated the adaptive-transport work in runpod-python (#531 → #538).

Contents:

  • Example (gpu_worker.py + README): a Flash @Endpoint that warm-caches its model via VolumeCache (HF cache on local disk, mirrored to the network volume) instead of pointing HF_HOME at the mount.
  • Benchmark (benchmark/): direct-on-volume vs VolumeCache cold-start A/B (serverless), a rigorous/ pod-based harness with page-cache eviction and breakeven analysis, and a quadrant/ serverless benchmark.
  • Quadrant benchmark (benchmark/quadrant/): a CPU serverless worker that sweeps file-shape quadrants (few/many × small/large + a mixed HF-like tree) across serial/parallel/tar transport in both mirror and hydrate directions, with cold page cache and a byte-for-byte correctness gate. Recorded results in results.json.

Findings (why adaptive transport)

Mirror (local → volume), mean seconds:

tree serial parallel tar
40,000 × 16 KiB 428.7s 62.0s 5.9s
3,000 × 1 MiB 31.5s 4.0s 9.4s
8 × 256 MiB 2.67s 0.59s 5.32s

Mean file size decides the winner: many-small-file trees favor tar (metadata collapse; 72× over serial), large files favor parallel (tar's single stream is dead weight). This is the empirical basis for the 256 KiB size-bucketed transport in the runpod-python VolumeCache follow-up.

Linear: SLS-367

Test plan

  • Examples are import-and-run demos; make quality-check (ruff format + lint) passes on the added files.
  • Benchmarks are run manually against a Runpod endpoint / pod with a mounted network volume (each subdir README documents how). The quadrant benchmark's recorded results are checked in.

deanq added 6 commits July 7, 2026 21:56
…tive transport

Serverless CPU-endpoint benchmark sweeping file-shape quadrants
(few/many x small/large + mixed HF) across serial/parallel/tar transport
in both mirror and hydrate directions. Provides the empirical basis for
the 256 KiB size-bucketed adaptive transport. Includes recorded results.
@capy-ai

capy-ai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Capy auto-review is paused for this organization because the usage-cycle auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

@deanq deanq changed the title docs(examples): VolumeCache warm-cache example + transport benchmarks docs(examples): SLS-367 VolumeCache warm-cache example + transport benchmarks Jul 11, 2026
@deanq deanq changed the title docs(examples): SLS-367 VolumeCache warm-cache example + transport benchmarks docs(examples): VolumeCache warm-cache example + transport benchmarks Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant