~mdcallag/perconatools/tpcc-mysql

« back to all changes in this revision

Viewing changes to scripts/runX.sh

  • Committer: Vadim Tkachenko
  • Date: 2011-03-14 18:26:59 UTC
  • Revision ID: vadim@percona.com-20110314182659-iqmvmbijhhm0vleo
changes to run script

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
ulimit -c unlimited
11
11
 
12
12
#DR="/mnt/fio320"
13
 
BD=/mnt/fio160/back/tpc1000w
 
13
BD=/mlc/back/tpc1000w/
14
14
#DR=/data/db/bench
15
 
#DR="/data/tpc1000w"
16
 
DR="/mnt/tachion/tpc1000w"
17
 
#CONFIG="/etc/my.y.cnf"
18
 
CONFIG="/etc/my.y.558.cnf"
 
15
DR="/tachion/data"
 
16
#DR="/mnt/tachion/tpc1000w"
 
17
CONFIG="/etc/my.y.cnf"
 
18
#CONFIG="/etc/my.y.558.cnf"
19
19
 
20
20
WT=10
21
21
RT=10800
22
22
 
23
23
ROWS=80000000
24
24
 
 
25
#log2="/tachion/system/"
25
26
log2="/data/bench/"
26
27
#log2="$DR/"
27
28
 
28
29
# restore from backup
29
30
function restore {
30
31
 
 
32
#sysctl -w dev.flashcache.cache_all=0
 
33
 
31
34
mkdir -p $DR
32
35
 
33
36
rm -fr $DR/*
34
 
rm -f $log2/ib_log*
 
37
rm -f $log2/ib*
35
38
 
36
39
echo $log2
37
40
#for nm in ibdata1 ib_logfile0 ib_logfile1
42
45
#done
43
46
 
44
47
 
45
 
for files in $BD/* 
46
 
do
47
 
if [ -d $files ]; then
48
 
pagecache-management.sh cp -r $files $DR
49
 
fi
50
 
done
51
 
 
 
48
cp -r $BD/mysql $DR
 
49
pagecache-management.sh cp -r $BD/tpcc1000 $DR
52
50
pagecache-management.sh cp -r $BD/ibdata1 $log2
53
51
 
54
52
sync
56
54
 
57
55
chown mysql.mysql -R $DR
58
56
chown mysql.mysql -R $log2
 
57
chmod -R 755 $DR
 
58
 
 
59
#sysctl -w dev.flashcache.cache_all=1
 
60
 
59
61
}
60
62
 
61
63
 
100
102
 
101
103
for trxv in 2
102
104
do
103
 
for logsz in 2000M
 
105
for logsz in 4G
104
106
do
105
107
#for par in  1 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 43
106
108
#for par in  13 26 39 52 65 78
107
109
#for par in 39 52 65 78
108
110
#for par in 13 52 78 144
109
 
for par in 52 144
 
111
for par in 13 52 144
110
112
do
111
113
 
112
114
runid="par$par.log$logsz.trx$trxv."
113
115
 
114
116
restore
115
117
 
 
118
sysctl -w dev.flashcache.dirty_thresh_pct=90
 
119
 
 
120
export OS_FILE_LOG_BLOCK_SIZE=4096
 
121
#/usr/local/mysql/bin/mysqld --defaults-file=$CONFIG --datadir=$DR --innodb_data_home_dir=$DR --innodb_log_group_home_dir=$DR --innodb_thread_concurrency=0 --innodb-buffer-pool-size=${par}GB --innodb-log-file-size=$logsz --innodb_flush_log_at_trx_commit=$trxv  &
116
122
/usr/local/mysql/bin/mysqld --defaults-file=$CONFIG --datadir=$DR --innodb_data_home_dir=$log2 --innodb_log_group_home_dir=$log2 --innodb_thread_concurrency=0 --innodb-buffer-pool-size=${par}GB --innodb-log-file-size=$logsz --innodb_flush_log_at_trx_commit=$trxv  &
117
123
 
118
124
MYSQLPID=$!
135
141
set -e
136
142
 
137
143
 
138
 
 
139
 
 
140
 
iostat -dmx 10 2000 >> $OUTDIR/iostat.${runid}res &
 
144
fio-status -a /dev/fioa >>$OUTDIR/fiostatus.${runid}res
 
145
 
 
146
iostat -mxt 1 >> $OUTDIR/iostat.${runid}res &
141
147
PID=$!
142
148
vmstat 10 2000 >> $OUTDIR/vmstat.${runid}res &
143
149
PIDV=$!
144
150
./virident_stat.sh >> $OUTDIR/virident.${runid}res &
145
151
PIDVS=$!
 
152
./flashcache_stat.sh >> $OUTDIR/flashcache.${runid}res &
 
153
PIDFC=$!
146
154
$MYSQLDIR/bin/mysqladmin ext -i10 -r >> $OUTDIR/mysqladminext.${runid}res &
147
155
PIDMYSQLSTAT=$!
148
156
./innodb_stat.sh >> $OUTDIR/innodb.${runid}res &
152
160
cp $CONFIG $OUTDIR
153
161
cp $0 $OUTDIR
154
162
mysqladmin variables >>  $OUTDIR/mysql_variables.res
155
 
./tpcc_start localhost tpcc1000 root "" 1000 32 10 3600 | tee -a $OUTDIR/tpcc.${runid}.out
 
163
sysctl -a >> $OUTDIR/sysctl.res
 
164
./tpcc_start localhost tpcc1000 root "" 1000 32 10 10800 | tee -a $OUTDIR/tpcc.${runid}.out
156
165
kill $PIDMYSQLSTAT
157
166
kill -9 $PID
158
167
kill -9 $PIDV
159
168
kill -9 $PIDVS
 
169
kill -9 $PIDFC
160
170
kill -9 $MYSQLPID
161
171
kill -9 $PIDINN
162
172
 
163
 
#waitm
164
 
 
165
 
 
166
 
#mysqladmin  shutdown
167
 
 
168
173
 
169
174
done
170
175