-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdiskio
executable file
·52 lines (40 loc) · 1.42 KB
/
diskio
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# usage:
# qlogin -l interactive=true -pe batch 16
# ./diskio
# while the write speeds will display almost immediately, the read
# speeds will take several 10s of minutes due to clearing the cache
# note that the product of bs=1M and count=256K on line 45 must equal or exceed total RAM
# qsub -l gpu=true -pe batch 7 -N diskio -j y -b y -V -shell n -o ${PWD}/diskio.570.log ${PWD}/diskio
date
hostname
set -e
write_it() {
echo $1
dd if=/dev/zero of=$1 bs=1M count=30 conv=fsync; }
read_it() {
echo $1
dd of=/dev/null if=$1 bs=1M; }
echo write
write_it /dev/shm/${HOSTNAME}0
write_it /scratch/$USER/${HOSTNAME}1
write_it /nobackup/mousebrainmicro/${HOSTNAME}2
write_it /groups/mousebrainmicro/mousebrainmicro/${HOSTNAME}3
write_it /tier2/mousebrainmicro/${HOSTNAME}4
# clear cache
# the slow way which doesn't require root access
dd if=/dev/zero of=/scratch/$USER/bar bs=1M count=256K conv=fsync &> /dev/null
rm /scratch/$USER/bar
# purportedly this is ideal
# echo 1 > /proc/sys/vm/drop_caches
echo read
read_it /dev/shm/${HOSTNAME}0
read_it /scratch/$USER/${HOSTNAME}1
read_it /nobackup/mousebrainmicro/${HOSTNAME}2
read_it /groups/mousebrainmicro/mousebrainmicro/${HOSTNAME}3
read_it /tier2/mousebrainmicro/${HOSTNAME}4
rm /dev/shm/${HOSTNAME}0
rm /scratch/$USER/${HOSTNAME}1
rm /nobackup/mousebrainmicro/${HOSTNAME}2
rm /groups/mousebrainmicro/mousebrainmicro/${HOSTNAME}3
rm /tier2/mousebrainmicro/${HOSTNAME}4