Repository navigation
feat: forward ext.fsx/ext.efs to spawn launch for shared reference filesystems (#67) - #68
Merged
Merged
Conversation
…lesystems (#67) A shared filesystem is the right primitive for one stable reference DB read by a WIDE fan-out (taxprofiler's Kraken2/MetaPhlAn DBs over 30-100 samples): one copy, N concurrent read-only mounts, no per-volume Fast-Snapshot-Restore credit cliff that ext.volumes hits at scale. - ext.fsx / ext.efs accept a bare 'fs-xxx' id (mount defaults /fsx, /efs) or a map [id:, mount:, paths:]. Forwarded to spawn launch --fsx-id/--efs-id (+ --*-mount-point) only when set, so the default is unchanged. - The mount is bind-mounted read-only into the task container, and declared 'paths' (e.g. ['kraken2'] -> /fsx/kraken2) feed the #55 mountPaths so a staged path-input DB symlinks zero-copy instead of localizing from S3 — the second half of comment-1's requirement (forwarding the flag alone is not sufficient). - Only the existing-filesystem (id) form is supported. nf-spawn launches one instance per task, so --fsx-create would create one filesystem per task across a fan-out; parseSharedFs rejects a create: map with a pointer to pre-creating by id. Ephemeral per-run shared FS is left as a follow-up. Requires spawn >= 0.46.0 (FSx/EFS mount-by-id). Closes #67
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.
Closes #67.
A shared filesystem is the right primitive for one stable reference DB read by a wide fan-out (taxprofiler's Kraken2/MetaPhlAn DBs over 30–100 samples): one copy, N concurrent read-only mounts, no per-snapshot Fast-Snapshot-Restore credit cliff that
ext.volumeshits at scale (the failure that motivated the issue — ~50 volumes from 2 DB snapshots drained FSR credits and most fell back to ~6–8 MB/s S3 lazy-load).Change
New
ext.fsx/ext.efsdirectives, mirroring theext.az(#62) /ext.volumes(#45) forwarding already in place:process { withName: 'KRAKEN2_KRAKEN2' { ext.fsx = 'fs-0abc' // → --fsx-id fs-0abc --fsx-mount-point /fsx // or, to declare which DB dirs symlink zero-copy: ext.fsx = [ id: 'fs-0abc', mount: '/fsx', paths: ['kraken2'] ] // ext.efs = 'fs-0def' // → --efs-id fs-0def --efs-mount-point /efs } }Both halves of comment-1's requirement:
ext.fsx/ext.efs→spawn launch --fsx-id/--efs-id(+--*-mount-point), passed only when set (default unchanged).pathsentry becomes<mount>/<name>(e.g./fsx/kraken2) fed into the 0.5.0 stage-name symlink works for--db <name>(Kraken2) but notfind -L <name>(MetaPhlAn) — symlink missing in task work dir #55mountPaths, so apathinput whose stage name matches symlinks zero-copy instead ofaws s3 cp-ing the DB per task — even when the pipeline stagesdb_pathinto the S3 work area. Without this, tasks would mount the FS but still localize from S3.Scope decision: id form only
nf-spawn launches one instance per task, so a per-task
--fsx-createwould create one filesystem per task across a fan-out — the exact multiplication a shared FS is meant to avoid.parseSharedFsrejects acreate:map with a pointer to pre-creating by id (spawn fsx create). Ephemeral per-run shared FS is left as a follow-up.Tests
8 new specs:
--fsx-id/--efs-idforwarding (and absence when unset),parseSharedFs(bare-id string, map,pathsnormalization, key aliases, null), create-form rejection, missing-id rejection,sharedFsBindMounts(read-only, multi),sharedFsMountPaths(<mount>/<name>, bare-mount fallback, trailing-slash), and the end-to-end #55 zero-copy symlink for a shared-FS DB whose Nextflow source iss3://. Full Spock suite green;compileGroovyclean (JDK 17 / Gradle 8.14).Docs
CHANGELOG.mdAdded entry; README directive table gainsext.fsx/ext.efsrows, and the "Delivering reference data" section gains option 2 (shared FS for wide fan-out) with the FSR-credit rationale.Requires spawn ≥ 0.46.0 (FSx/EFS mount-by-id).
Consumer (aws-microbiome-demo) is already wired (
FSX_ID/FSX_MOUNT,ext.fsxemitted per classifier) — this flips it on.