Whamcloud - gitweb
2bf0a53398a8f6c3a55fe5001af543852825a048
[fs/lustre-release.git] / lustre / tests / acceptance-metadata-single.sh
1 #!/bin/sh
2 set -e
3
4 #
5 # Runs create.pl and rename.pl on a single mountpoint with increasing
6 # load, varying debug levels
7 #
8
9 SRCDIR="`dirname $0`"
10 CREATE=$SRCDIR/create.pl
11 RENAME=$SRCDIR/rename.pl
12
13 debug_client_on()
14 {
15         echo -1 > /proc/sys/portals/debug
16 }
17
18 debug_client_off()
19 {
20         echo 0 > /proc/sys/portals/debug
21 }
22
23 MNT=${MNT:-/mnt/lustre}
24
25 debug_client_on
26 echo "create.pl, 1 mount, 1 thread, 10 ops, debug on"
27 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=10
28 echo "create.pl, 1 mount, 1 thread, 100 ops, debug on"
29 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --silent
30 echo "create.pl --mcreate=0, 1 mount, 1 thread, 10 ops, debug on"
31 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=10 --use_mcreate=0
32 echo "create.pl --mcreate=0, 1 mount, 1 thread, 100 ops, debug on"
33 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --use_mcreate=0 --silent
34 echo "rename.pl, 1 mount, 1 thread, 10 ops, debug on"
35 perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=10
36 echo "rename.pl, 1 mount, 1 thread, 100 ops, debug on"
37 perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=100 --silent
38
39 debug_client_off
40 echo "create.pl, 1 mount, 1 thread, 1000 ops, debug off"
41 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --silent
42 echo "create.pl --mcreate=0, 1 mount, 1 thread, 1000 ops, debug off"
43 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --use_mcreate=0 --silent
44 echo "rename.pl, 1 mount, 1 thread, 1000 ops, debug off"
45 perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --silent
46
47 debug_client_on
48 echo "create.pl, 1 mount, 2 threads, 100 ops, debug on"
49 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=2 --silent
50 echo "create.pl --mcreate=0, 1 mount, 2 threads, 100 ops, debug on"
51 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=2 --use_mcreate=0 --silent
52 echo "rename.pl, 1 mount, 2 thread, 1000 ops, debug on"
53 perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --num_threads=2 --silent
54
55 debug_client_off
56 echo "create.pl, 1 mount, 2 threads, 2000 ops, debug off"
57 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent
58 echo "create.pl --mcreate=0, 1 mount, 2 threads, 2000 ops, debug off"
59 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --use_mcreate=0  --silent
60 wait
61 echo "rename.pl, 1 mount, 2 threads, 2000 ops, debug off"
62 perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent
63
64 debug_client_on
65 echo "create.pl, 1 mount, 4 threads, 100 ops, debug on"
66 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=4 --silent
67 echo "create.pl --mcreate=0, 1 mount, 4 threads, 100 ops, debug on"
68 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=4 --use_mcreate=0 --silent
69 echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug on"
70 perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent
71
72 debug_client_off
73 echo "create.pl, 1 mount, 4 threads, 2000 ops, debug off"
74 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4  --silent
75 echo "create.pl --mcreate=0, 1 mount, 4 threads, 2000 ops, debug off"
76 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4  --use_mcreate=0 --silent
77 echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug off"
78 perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent
79
80 debug_client_on
81 echo "create.pl, 1 mount, 8 threads, 500 ops, debug on"
82 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=500 --num_threads=8  --silent
83 echo "create.pl --mcreate=0, 1 mount, 8 threads, 500 ops, debug on"
84 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=500 --num_threads=8  --use_mcreate=0 --silent
85 echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug on"
86 perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent
87
88 debug_client_off
89 echo "create.pl, 1 mount, 8 threads, 2000 ops, debug off"
90 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8  --silent
91 echo "create.pl --mcreate=0, 1 mount, 8 threads, 2000 ops, debug off"
92 perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8  --use_mcreate=0 --silent
93 echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug off"
94 perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent
95
96 sh rundbench 1
97 sh rundbench 2
98 sh rundbench 4
99 sh rundbench 8
100 sh rundbench 16
101 sh rundbench 32