Whamcloud - gitweb
Update scripts to not do vector reads on BA OSTs.
[fs/lustre-release.git] / lustre / tests / runregression-brw.sh
1 #!/bin/sh
2 export PATH=/sbin:/usr/sbin:$PATH
3
4 SRCDIR="`dirname $0`/"
5 . $SRCDIR/common.sh
6
7 runthreads() {
8         THR=$1
9         DO=$2
10         CNT=$3
11         V=$4
12         PGS=$5
13
14         case $DO in
15         test_getattr)
16                 RW=
17                 ;;
18         test_brw_write)
19                 DO=test_brw
20                 RW=w
21                 ;;
22
23         test_brw_read)
24                 DO=test_brw
25                 RW=r
26                 ;;
27         esac
28
29         $OBDCTL --threads $THR v '$OSCDEV' $DO $CNT $RW $V $PGS $OID || exit 1
30
31         if [ -e endrun ]; then
32                 rm endrun
33                 echo "exiting because endrun file was found"
34                 exit 0
35         fi
36 }
37
38 if [  -z "`$OBDCTL device_list 2> /dev/null | grep osc`" ]; then
39         setup_opts $@
40
41         setup_portals
42         setup_lustre
43
44         setup_server || exit -1
45         setup_client || exit -1
46 fi
47
48 OID=`$OBDCTL --device '$OSCDEV' create 1 | awk '/is object id/ { print $6 }'`
49 [ -z "$OID" ] && echo "error creating object" 1>&2 && exit 1
50
51 # TODO: obdctl needs to check on the progress of each forked thread
52 #       (IPC SHM, sockets?) to see if it hangs.
53 while date; do
54         PG=1
55         PGVW=16
56         case $OSTNODE in
57         ba*) PGVR= ;; # disabled until the BA OST code is updated
58         *) PGVR=16 ;;
59         esac
60
61         # We use '--threads 1 X' instead of '--device X' so that
62         # obdctl can monitor the forked thread for progress (TODO).
63         debug_server_off
64         debug_client_off
65         runthreads 1 test_brw_write 1000 -30 $PG
66         runthreads 1 test_brw_read 1000 -30 $PG
67
68         [ "$PGVW" ] && runthreads 1 test_brw_write 100 -30 $PGVW
69         [ "$PGVW" ] && runthreads 1 test_brw_read 1600 -30 $PG
70         [ "$PGVR" ] && runthreads 1 test_brw_read 100 -30 $PGVR
71
72         runthreads 1 test_brw_write 10000000 -30 $PG
73         runthreads 1 test_brw_read 10000000 -30 $PG
74
75         [ "$PGVW" ] && runthreads 1 test_brw_write 1000000 -30 $PGVW
76         [ "$PGVW" ] && runthreads 1 test_brw_read 16000000 -30 $PG
77         [ "$PGVR" ] && runthreads 1 test_brw_read 1000000 -30 $PGVR
78
79         runthreads 2 test_brw_write 10000000 -30 $PG
80         runthreads 2 test_brw_read 10000000 -30 $PG
81
82         [ "$PGVW" ] && runthreads 2 test_brw_write 1000000 -30 $PGVW
83         [ "$PGVW" ] && runthreads 1 test_brw_read 16000000 -30 $PG
84         [ "$PGVR" ] && runthreads 2 test_brw_read 1000000 -30 $PGVR
85
86         runthreads 10 test_brw_write 1000000 -30 $PG
87         runthreads 1 test_brw_read 16000000 -30 $PG
88         runthreads 10 test_brw_read 1000000 -30 $PG
89
90         [ "$PGVW" ] && runthreads 10 test_brw_write 100000 -60 $PGVW
91         [ "$PGVW" ] && runthreads 1 test_brw_read 1600000 -30 $PG
92         [ "$PGVR" ] && runthreads 10 test_brw_read 100000 -60 $PGVR
93
94         runthreads 32 test_brw_write 1000000 -30 $PG
95         runthreads 1 test_brw_read 16000000 -30 $PG
96         runthreads 32 test_brw_read 1000000 -30 $PG
97
98         [ "$PGVW" ] && runthreads 32 test_brw_write 100000 -60 $PGVW
99         [ "$PGVW" ] && runthreads 1 test_brw_read 1600000 -30 $PG
100         [ "$PGVR" ] && runthreads 32 test_brw_read 100000 -60 $PGVR
101
102         runthreads 64 test_brw_write 1000000 -30 $PG
103         runthreads 1 test_brw_read 16000000 -30 $PG
104         runthreads 64 test_brw_read 1000000 -30 $PG
105
106         [ "$PGVW" ] && runthreads 64 test_brw_write 100000 -60 $PGVW
107         [ "$PGVW" ] && runthreads 1 test_brw_read 1600000 -30 $PG
108         [ "$PGVR" ] && runthreads 64 test_brw_read 100000 -60 $PGVR
109
110         runthreads 100 test_brw_write 100000 -60 $PG
111         runthreads 1 test_brw_read 1600000 -30 $PG
112         runthreads 100 test_brw_read 100000 -60 $PG
113
114         [ "$PGVW" ] && runthreads 100 test_brw_write 100000 -60 $PGVW
115         [ "$PGVW" ] && runthreads 1 test_brw_read 1600000 -30 $PG
116         [ "$PGVR" ] && runthreads 100 test_brw_read 100000 -60 $PGVR
117 done
118
119 $OBDCTL --device '$OSCDEV' destroy $OID
120
121 cleanup_client || exit -1
122 cleanup_server || exit -1
123 cleanup_lustre
124 cleanup_portals