Translations of this page:

Use local disks

In some cases it might be beneficial to use local disks of calculation servers.

Things to remember:

  • Writing speed is lower than with NFS server
  • Latency is lower than with NFS server
  • Limited disk space available

As conclusion it might be beneficial to use local disks if:

  • Small writes are done continuously. For example calculate something from data, write it, calculate next value, write it, …
  • Reading/writing large number of small files

Example job script template:

localdiskexample.sh
#!/bin/bash
#SBATCH --partition phase1
#SBATCH --nodes 1
#SBATCH --ntasks 1
#SBATCH --cpus-per-task 12
#SBATCH --mem-per-cpu=2000
#SBATCH --time 2-0:00:00
#SBATCH --job-name example
#SBATCH --error example.stderr.%j
#SBATCH --output example.stdout.%j
#SBATCH --mail-type=end
#SBATCH --mail-user=<youremail@lut.fi>
 
# Set your directories
# Your case directory in home (NFS server)
export CASEDIR="/home/<username>/casedir"
# Local directory (on calculation node)
export LOCALDIR="/tmp/$SLURM_JOB_ID"
# Results are copied to this directory (by default same as case directory)
export RESDIR=$CASEDIR
 
module load examplesoft/exampleversion
 
# Create a temporary directory on scratch
mkdir -p $LOCALDIR
 
# Move to directory (could be different depending how your calculation software works)
cd $LOCALDIR
 
# Copy files to local directory
cp -R $CASEDIR/* $LOCALDIR
 
srun --mpi=pmi2 examplesoft -exampleparameters exampleinput
 
# After calculation copy files from local disk
cp -R $LOCALDIR/* $CASEDIR
 
# Cleanup local work directory
rm -rf /tmp/$SLURM_JOB_ID
 
/opt/webdata/webroot/wiki/data/pages/en/hpc/usage/localdisks.txt · Last modified: 2019/10/31 13:38 by vrintala
[unknown button type]
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki