Main Navigation

Secondary Navigation

Page Contents

Contents

Requesting a RAM Disk

Overview

If you are using a program

  • where you can not change the sources and
  • that uses small files at high frequency
then the usage of a RAM disk may be helpful.

#!/bin/bash
#SBATCH --mem=6120    # increase from 4 GB to 6 GB, because the RAM disk must fit into memory
#SBATCH --ramdisk=2G  # 2 GB RAM disk

# change directory to the RAM disk 
cd ${SLURM_JOB_RAMDISK}
The RAM disk will be deleted when the job ends and all the files will no longer be available.