Skip to content

Commit 9022e8a

Browse files
renecannaoValentin Rakush
authored and
Valentin Rakush
committed
Notes on how to run sysbench on SQLite3 Server
1 parent c967bc1 commit 9022e8a

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

notes/run_sysbench_on_sqlite3.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
3+
On Admin:
4+
5+
```sql
6+
insert into mysql_servers (hostgroup_id, hostname, port) values (100,'127.0.0.1',6030);
7+
insert into mysql_users (username,password,default_hostgroup) values ('sqlite','sqlite',100);
8+
9+
save mysql users to disk;
10+
load mysql users to runtime;
11+
save mysql servers to disk;
12+
load mysql servers to runtime;
13+
14+
15+
16+
INSERT INTO mysql_query_rules (active,username,match_digest,match_pattern,replace_pattern,apply) values (1,'sqlite','^CREATE TABLE sbtest','id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT','id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT',0);
17+
INSERT INTO mysql_query_rules (active,username,match_digest,match_pattern,replace_pattern,apply) values (1,'sqlite','^CREATE TABLE sbtest',"pad CHAR\(60\) DEFAULT '' NOT NULL,","pad CHAR(60) DEFAULT '' NOT NULL",0);
18+
INSERT INTO mysql_query_rules (active,username,match_digest,match_pattern,replace_pattern,apply) values (1,'sqlite','^CREATE TABLE sbtest','PRIMARY KEY \(id\)','',0);
19+
20+
save mysql query rules to disk;
21+
load mysql query rules to runtime;
22+
```
23+
24+
Sysbbench:
25+
26+
```shell
27+
sysbench --db-driver=mysql --test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --oltp-tables-count=10 --oltp-table-size=10000 --mysql-host=127.0.0.1 --mysql-db=test --mysql-engine-trx=yes --mysql-port=6033 --mysql-user=sqlite --mysql-password=sqlite --num-threads=10 prepare
28+
```
29+
30+
```shell
31+
sysbench --report-interval=3 --db-driver=mysql /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --time=15 --oltp-tables-count=10 --oltp-table-size=10000 --mysql-host=127.0.0.1 --mysql-db=test --mysql-engine-trx=yes --oltp-skip-trx=off --mysql-port=6033 --mysql-user=sqlite --mysql-password=sqlite --threads=10 run
32+
```

0 commit comments

Comments
 (0)