Whamcloud - gitweb
land 0.5.20.3 b_devel onto HEAD (b_devel will remain)
[fs/lustre-release.git] / lustre / tests / acceptance-metadata-double.sh
1 #!/bin/sh
2 set -e
3
4 #
5 # Runs create.pl and rename.pl on two mountpoints with increasing load, varying
6 # debug levels.  Assumes that the node is already setup with llmount2.sh
7 #
8
9 SRCDIR="`dirname $0`"
10 CREATE=$SRCDIR/create.pl
11
12 debug_client_on()
13 {
14         echo -1 > /proc/sys/portals/debug
15 }
16
17 debug_client_off()
18 {
19         echo 0 > /proc/sys/portals/debug
20 }
21
22 MNT=${MNT:-/mnt/lustre}
23
24 debug_client_on
25 echo "create.pl, 2 mounts, 1 thread, 10 ops, debug on"
26 perl $CREATE -- $MNT 2 10
27 echo "create.pl, 2 mounts, 1 thread, 100 ops, debug on"
28 perl $CREATE --silent -- $MNT 2 100
29 echo "create.pl --mcreate=0, 2 mounts, 1 thread, 10 ops, debug on"
30 perl $CREATE --mcreate=0 -- $MNT 2 10
31 echo "create.pl --mcreate=0, 2 mounts, 1 thread, 100 ops, debug on"
32 perl $CREATE --mcreate=0 --silent -- $MNT 2 100
33 echo "rename.pl, 2 mounts, 1 thread, 10 ops, debug on"
34 perl rename.pl --count=2 $MNT 10
35 echo "rename.pl, 2 mounts, 1 thread, 100 ops, debug on"
36 perl rename.pl --count=2 --silent $MNT 100
37
38 debug_client_off
39 echo "create.pl, 2 mounts, 1 thread, 1000 ops, debug off"
40 perl $CREATE --silent -- $MNT 2 1000
41 echo "create.pl --mcreate=0, 2 mounts, 1 thread, 1000 ops, debug off"
42 perl $CREATE --silent --mcreate=0 -- $MNT 2 1000
43 echo "rename.pl, 2 mounts, 1 thread, 1000 ops, debug off"
44 perl rename.pl --count=2 --silent $MNT 1000
45
46 debug_client_on
47 echo "create.pl, 2 mounts, 2 threads, 100 ops, debug on"
48 perl $CREATE --silent -- $MNT 2 100 &
49 perl $CREATE --silent -- $MNT 2 100 &
50 wait
51 echo "create.pl --mcreate=0, 2 mounts, 2 threads, 100 ops, debug on"
52 perl $CREATE --silent --mcreate=0 -- $MNT 2 100 &
53 perl $CREATE --silent --mcreate=0 -- $MNT 2 100 &
54 wait
55 echo "rename.pl, 2 mounts, 2 thread, 1000 ops, debug on"
56 perl rename.pl --count=2 --silent $MNT 1000 &
57 perl rename.pl --count=2 --silent $MNT 1000 &
58 wait
59
60 debug_client_off
61 echo "create.pl, 2 mounts, 2 threads, 2000 ops, debug off"
62 perl $CREATE --silent -- $MNT 2 2000 &
63 perl $CREATE --silent -- $MNT 2 2000 &
64 wait
65 echo "create.pl --mcreate=0, 2 mounts, 2 threads, 2000 ops, debug off"
66 perl $CREATE --silent --mcreate=0 -- $MNT 2 2000 &
67 perl $CREATE --silent --mcreate=0 -- $MNT 2 2000 &
68 wait
69 echo "rename.pl, 2 mounts, 2 threads, 2000 ops, debug off"
70 perl rename.pl --count=2 --silent $MNT 2000 &
71 perl rename.pl --count=2 --silent $MNT 2000 &
72 wait
73
74 debug_client_on
75 echo "create.pl, 2 mounts, 4 threads, 100 ops, debug on"
76 for i in `seq 1 4`; do
77   perl $CREATE --silent -- $MNT 2 100 &
78 done
79 wait
80 echo "create.pl --mcreate=0, 2 mounts, 4 threads, 100 ops, debug on"
81 for i in `seq 1 4`; do
82   perl $CREATE --silent --mcreate=0 -- $MNT 2 100 &
83 done
84 wait
85 echo "rename.pl, 2 mounts, 4 threads, 2000 ops, debug on"
86 for i in `seq 1 4`; do
87   perl rename.pl --count=2 --silent $MNT 2000 &
88 done
89 wait
90
91 debug_client_off
92 echo "create.pl, 2 mounts, 4 threads, 2000 ops, debug off"
93 for i in `seq 1 4`; do
94   perl $CREATE --silent -- $MNT 2 2000 &
95 done
96 wait
97 echo "create.pl --mcreate=0, 2 mounts, 4 threads, 2000 ops, debug off"
98 for i in `seq 1 4`; do
99   perl $CREATE --silent --mcreate=0 -- $MNT 2 2000 &
100 done
101 wait
102 echo "rename.pl, 2 mounts, 4 threads, 2000 ops, debug off"
103 for i in `seq 1 4`; do
104   perl rename.pl --count=2 --silent $MNT 2000 &
105 done
106 wait
107
108 debug_client_on
109 echo "create.pl, 2 mounts, 8 threads, 500 ops, debug on"
110 for i in `seq 1 8`; do
111   perl $CREATE --silent -- $MNT 2 500 &
112 done
113 wait
114 echo "create.pl --mcreate=0, 2 mounts, 8 threads, 500 ops, debug on"
115 for i in `seq 1 8`; do
116   perl $CREATE --silent --mcreate=0 -- $MNT 2 500 &
117 done
118 wait
119 echo "rename.pl, 2 mounts, 8 threads, 2000 ops, debug on"
120 for i in `seq 1 8`; do
121   perl rename.pl --count=2 --silent $MNT 2000 &
122 done
123 wait
124
125 debug_client_off
126 echo "create.pl, 2 mounts, 8 threads, 2000 ops, debug off"
127 for i in `seq 1 8`; do
128   perl $CREATE --silent -- $MNT 2 2000 &
129 done
130 wait
131 echo "create.pl --mcreate=0, 2 mounts, 8 threads, 2000 ops, debug off"
132 for i in `seq 1 8`; do
133   perl $CREATE --silent --mcreate=0 -- $MNT 2 2000 &
134 done
135 wait
136 echo "rename.pl, 2 mounts, 8 threads, 2000 ops, debug off"
137 for i in `seq 1 8`; do
138   perl rename.pl --count=2 --silent $MNT 2000 &
139 done
140 wait