1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
| #!/bin/sh
time=3600
#0.0
for thread in {16,32,64,128,256}
do
echo "now the number of theads is $thread"
echo "============================================================================================================================================"
/bin/sh /home/linzj/shell/mysql.sh restart
sleep 30
sysbench --test=oltp --mysql-host=192.168.110.100 --mysql-port=3306 --mysql-user=root --mysql-password=root --mysql-db=sbtest1 --oltp-num-tables=10 --oltp-table-size=500000 --report-interval=10 --max-requests=0 --oltp-test-mode=nontrx --oltp-nontrx-mode=select --oltp-read-only=off --max-time=$time --num-threads=$thread run
echo "============================================================================================================================================"
done >> /tmp/sysbench.log.0.0
#1.1
sed -i 's/sync_relay_log=0/sync_relay_log=1/g' /etc/my.cnf
sed -i 's/sync_binlog=0/sync_binlog=1/g' /etc/my.cnf
sed -i 's/innodb_flush_log_at_trx_commit = 0/innodb_flush_log_at_trx_commit = 1/g' /etc/my.cnf
for thread in {32,256}
do
echo "now the number of theads is $thread"
echo "============================================================================================================================================"
/bin/sh /home/linzj/shell/mysql.sh restart
sleep 30
sysbench --test=oltp --mysql-host=192.168.110.100 --mysql-port=3306 --mysql-user=root --mysql-password=root --mysql-db=sbtest1 --oltp-num-tables=10 --oltp-table-size=500000 --report-interval=10 --max-requests=0 --oltp-test-mode=nontrx --oltp-nontrx-mode=select --oltp-read-only=off --max-time=$time --num-threads=$thread run
echo "============================================================================================================================================"
done >> /tmp/sysbench.log.1.1
#100.2
sed -i 's/sync_relay_log=1/sync_relay_log=100/g' /etc/my.cnf
sed -i 's/sync_binlog=1/sync_binlog=100/g' /etc/my.cnf
sed -i 's/innodb_flush_log_at_trx_commit = 1/innodb_flush_log_at_trx_commit = 2/g' /etc/my.cnf
for thread in {32,256}
do
echo "now the number of theads is $thread"
echo "============================================================================================================================================"
/bin/sh /home/linzj/shell/mysql.sh restart
sleep 30
sysbench --test=oltp --mysql-host=192.168.110.100 --mysql-port=3306 --mysql-user=root --mysql-password=root --mysql-db=sbtest1 --oltp-num-tables=10 --oltp-table-size=500000 --report-interval=10 --max-requests=0 --oltp-test-mode=nontrx --oltp-nontrx-mode=select --oltp-read-only=off --max-time=$time --num-threads=$thread run
echo "============================================================================================================================================"
done >> /tmp/sysbench.log.100.2
|