Several streams
Last updated on 2026-10-27 | Edit this page
Overview
Questions
- When do four copy streams help?
- What does each mpiFileUtils program do, and where does the deck’s job script run it?
Objectives
- Run four
rsyncprocesses withxargs -P 4orfpsync -n 4on large shards. - Name
dwalk,dcp,dsync,drm, anddtar, and match each one to the job it does. - Read
dcp.slurm: partitionrome, 2 nodes, 8 tasks per node.
Four streams, for large files
Four streams help when each shard is a large file. A million tiny
files still need a pack first. xargs -P and
fpsync (from the fpart package) both run several
rsync processes.
--exclude skips build products. The destination tree
must already exist for the xargs form, because each call
writes one shard.
BASH
printf '%s\0' shard-*/ |
xargs -0 -P 4 -I{} \
rsync -a --partial {}/ \
/scratch-shared/$USER/copy/{}/
fpsync is a separate command from the exclude example.
The exclude line is an ordinary rsync.
mpiFileUtils inside a Slurm job
These are MPI programs from the mpiFileUtils suite. srun
starts one of them across the tasks in the job. The options below are
from the project manual.
-
dwalk -vcounts files and bytes. -
dcp -pcopies and keeps permissions, group, and timestamps. -
dsyncmakes the destination match the source. -
drm --dryrunlists what a recursive delete would remove. -
dtar -cwrites a pax archive.
BASH
srun dwalk -v "$SRC"
srun dcp -p "$SRC" "$DST"
srun dsync -v "$SRC" "$DST"
srun drm --dryrun "$OLD"
srun dtar -c -f run.tar run/
The manual is https://mpifileutils.readthedocs.io/.
EESSI 2023.06 and 2025.06 do not provide mpiFileUtils. Snellius loads a site module or builds it with EasyBuild. The course cluster has mpiFileUtils installed, and that install is not an EESSI module. The tab has the commands for the machine in your welcome note.
Two Rome nodes
The published script walks the source and copies it. The slide text
also says the job walks the copy. The script block on the slide, which
is episodes/files/dcp.slurm, ends at dcp.
Snellius uses the rome partition for these CPU nodes.
Submit with sbatch dcp.slurm from a directory on scratch,
so the heavy tree stays off home.
BASH
#!/bin/bash
#SBATCH --job-name=dcp
#SBATCH --partition=rome
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=8
#SBATCH --time=01:00:00
#SBATCH --output=dcp-%j.out
set -eu
SRC=/scratch-shared/$USER/run
DST=/scratch-shared/$USER/run-copy
srun dwalk -v "$SRC"
srun dcp -p "$SRC" "$DST"
That is 2 nodes and 8 tasks per node, and a one-hour limit. The partition line in the file is the published Snellius line. The tab is the request for the machine in your welcome note. The scripts stay as published.
Large files, or a million small ones
You have four disks’ worth of bandwidth and a directory of a million
tiny files. What do you do before you open four rsync
streams?
Pack the tiny files first. Four streams help when each shard is a large file. They leave the metadata server with a million creates if you point them at a million tiny files.
Submit the published copy
episodes/files/dcp.slurm is the job. Which partition,
node count, and tasks per node does the file request? Then read the tabs
before you change a line for the machine in your welcome note.
The file requests partition rome,
--nodes=2, and --ntasks-per-node=8. Submit it
from scratch with sbatch dcp.slurm.
EESSI 2023.06 and 2025.06 do not provide mpiFileUtils. On the course cluster it is installed, and it is not an EESSI module. The partition tab is the request for this machine. Leave the script’s partition line as published.
-
xargs -P 4andfpsync -n 4run severalrsyncprocesses. - Several streams help large files. Pack a million tiny files first.
-
dwalkcounts,dcp -pcopies,dsyncmatches the destination to the source,drm --dryrunlists a delete, anddtar -cwrites a pax archive. -
dcp.slurmasks for theromepartition, 2 nodes, and 8 tasks per node. - EESSI 2023.06 and 2025.06 do not provide mpiFileUtils. The course cluster has it installed, and that install is not an EESSI module.