Skip to content
Snippets Groups Projects
hdd.batch 759 B
Newer Older
  • Learn to ignore specific revisions
  • #!/bin/sh
    #SBATCH -J arrh-storage-benchmark-hdd
    
    usage() {
        echo >&2 "Usage: sbatch [-N NUMNODES] hdd.batch DIRECTORY"
        echo >&2 "Run benchmark creating, writing, and reading files in DIRECTORY"
        exit 2
    }
    
    if [ $# -ne 1 ]
    then usage
    fi
    
    NUMTHREADS=16
    
    srun --ntasks-per-node=1 --cpus-per-task="$NUMTHREADS" \
        elbencho --service --foreground > /dev/null &
    
    sleep 5  # wait for services to start
    
    #
    # Sequential write/read
    #
    echo 'hdd.batch: Sequential write/read'
    elbencho --hosts "$(scontrol show hostnames | tr '\n' ',')" "$1" \
        -w -r -t "$NUMTHREADS" -s 4G -b 1M -n 0 -F --rotatehosts=1
    
    #
    # Metadata (creat/stat/unlink)
    #
    echo 'hdd.batch: Metadata'
    # to be written
    
    elbencho --hosts "$(scontrol show hostnames | tr '\n' ',')" \
        --quit