Whamcloud - gitweb
- added test_3b which emulates recursive mount. Does not pass yet.
[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 TIME=${TIME:-/usr/bin/time}
14
15 display_elapsed_time() {
16     PREVIOUS_TS=$CURRENT_TS
17     CURRENT_TS=`date +%s`
18     BLOCK_ELAPSED=`expr $CURRENT_TS - $PREVIOUS_TS`
19     TOTAL_ELAPSED=`expr $CURRENT_TS - $START_TS`
20
21     echo " "
22     echo "Elapsed time (block): ${BLOCK_ELAPSED} seconds"
23     echo "Elapsed time (TOTAL): ${TOTAL_ELAPSED} seconds"
24     echo " "
25 }    
26
27 debug_client_on()
28 {
29         echo -1 > /proc/sys/portals/debug
30 }
31
32 debug_client_off()
33 {
34         echo 0x3f0400 > /proc/sys/portals/debug
35 }
36
37 MNT=${MNT:-/mnt/lustre}
38
39 # Get our initial timestamps.
40 START_TS=`date +%s`
41 CURRENT_TS=$START_TS
42 PREVIOUS_TS=$START_TS
43
44 debug_client_on
45 echo "create.pl, 1 mount, 1 thread, 10 ops, debug on"
46 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=10
47 echo "create.pl, 1 mount, 1 thread, 100 ops, debug on"
48 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --silent
49 echo "create.pl --mcreate=0, 1 mount, 1 thread, 10 ops, debug on"
50 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=10 --use_mcreate=0
51 echo "create.pl --mcreate=0, 1 mount, 1 thread, 100 ops, debug on"
52 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --use_mcreate=0 --silent
53 echo "rename.pl, 1 mount, 1 thread, 10 ops, debug on"
54 $TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=10
55 echo "rename.pl, 1 mount, 1 thread, 100 ops, debug on"
56 $TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=100 --silent
57
58 display_elapsed_time
59
60 debug_client_off
61 echo "create.pl, 1 mount, 1 thread, 1000 ops, debug off"
62 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --silent
63 echo "create.pl --mcreate=0, 1 mount, 1 thread, 1000 ops, debug off"
64 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --use_mcreate=0 --silent
65 echo "rename.pl, 1 mount, 1 thread, 1000 ops, debug off"
66 $TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --silent
67
68 display_elapsed_time
69
70 debug_client_on
71 echo "create.pl, 1 mount, 2 threads, 100 ops, debug on"
72 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=2 --silent
73 echo "create.pl --mcreate=0, 1 mount, 2 threads, 100 ops, debug on"
74 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=2 --use_mcreate=0 --silent
75 echo "rename.pl, 1 mount, 2 thread, 1000 ops, debug on"
76 $TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --num_threads=2 --silent
77
78 display_elapsed_time
79
80 debug_client_off
81 echo "create.pl, 1 mount, 2 threads, 2000 ops, debug off"
82 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent
83 echo "create.pl --mcreate=0, 1 mount, 2 threads, 2000 ops, debug off"
84 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --use_mcreate=0  --silent
85 wait
86 echo "rename.pl, 1 mount, 2 threads, 2000 ops, debug off"
87 $TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent
88
89 display_elapsed_time
90
91 debug_client_on
92 echo "create.pl, 1 mount, 4 threads, 100 ops, debug on"
93 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=4 --silent
94 echo "create.pl --mcreate=0, 1 mount, 4 threads, 100 ops, debug on"
95 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=4 --use_mcreate=0 --silent
96 echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug on"
97 $TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent
98
99 display_elapsed_time
100
101 debug_client_off
102 echo "create.pl, 1 mount, 4 threads, 2000 ops, debug off"
103 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4  --silent
104 echo "create.pl --mcreate=0, 1 mount, 4 threads, 2000 ops, debug off"
105 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4  --use_mcreate=0 --silent
106 echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug off"
107 $TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent
108
109 display_elapsed_time
110
111 debug_client_on
112 echo "create.pl, 1 mount, 8 threads, 500 ops, debug on"
113 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=500 --num_threads=8  --silent
114 echo "create.pl --mcreate=0, 1 mount, 8 threads, 500 ops, debug on"
115 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=500 --num_threads=8  --use_mcreate=0 --silent
116 echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug on"
117 $TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent
118
119 display_elapsed_time
120
121 debug_client_off
122 echo "create.pl, 1 mount, 8 threads, 2000 ops, debug off"
123 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8  --silent
124 echo "create.pl --mcreate=0, 1 mount, 8 threads, 2000 ops, debug off"
125 $TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8  --use_mcreate=0 --silent
126 echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug off"
127 $TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent
128
129 display_elapsed_time
130
131 $TIME sh rundbench 1
132
133 display_elapsed_time
134
135 $TIME sh rundbench 2
136
137 display_elapsed_time
138
139 $TIME sh rundbench 4
140
141 display_elapsed_time
142
143 $TIME sh rundbench 8
144
145 display_elapsed_time
146
147 $TIME sh rundbench 16
148
149 display_elapsed_time
150
151 $TIME sh rundbench 32
152
153 display_elapsed_time