Skip to content

Commit 1f213ec

Browse files
committed
Updated semi-sync replication test
1 parent 41ea589 commit 1f213ec

File tree

7 files changed

+47
-29
lines changed

7 files changed

+47
-29
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Database benchmarks in Kubernetes
88

99
### Storage benchmarks
1010

11-
Refer to the [storage benchmarks ](https://github.com/mmontes11/storage-bench) for further reference
11+
Local storage via Topolvm on nvme drives is used as storage in all benchmarks. Refer to the [storage benchmarks ](https://github.com/mmontes11/storage-bench) for further reference.
1212

1313
### Kubernetes cluster
1414

15-
Provisioned by [k8s-management](https://github.com/mmontes11/k8s-management) and [k8s-infrastructure](https://github.com/mmontes11/k8s-infrastructure)
15+
Kubernetes cluster based on Talos and provisioned by [k8s-management](https://github.com/mmontes11/k8s-management) and [k8s-infrastructure](https://github.com/mmontes11/k8s-infrastructure) is used in all benchmarks.

mariadb-replication-topolvm/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
include ../make/base.mk
22

3-
##@ MariaDB Galera on Topolvm
3+
##@ MariaDB replication on Topolvm
44

55
.PHONY: mariadb
66
mariadb: kubectl ## Deploy MariaDB.
77
$(KUBECTL) apply -f ./mariadb
88

9+
.PHONY: maxscale
10+
maxscale: kubectl ## Deploy MaxScale.
11+
$(KUBECTL) apply -f ./maxscale
12+
913
.PHONY: sysbench-sql
1014
sysbench-sql: kubectl ## Prepare sysbench SQL resources.
1115
$(KUBECTL) apply -f ./sql

mariadb-replication-topolvm/README.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,51 @@
22

33
```bash
44
make mariadb
5+
make maxscale
56
make sysbench-prepare
67
make sysbench
78
make physicalbackup
89
```
910

10-
# sysbench (1 thread)
11+
# sysbench
12+
13+
Threads: 4
14+
MariaDB version: 11.8.2
1115

1216
### Semi-sync replication
1317

1418
```
1519
SQL statistics:
1620
queries performed:
17-
read: 1887774
18-
write: 539364
19-
other: 269682
20-
total: 2696820
21-
transactions: 134841 (449.47 per sec.)
22-
queries: 2696820 (8989.33 per sec.)
23-
ignored errors: 0 (0.00 per sec.)
21+
read: 4919530
22+
write: 1405158
23+
other: 702653
24+
total: 7027341
25+
transactions: 351258 (1170.84 per sec.)
26+
queries: 7027341 (23424.12 per sec.)
27+
ignored errors: 137 (0.46 per sec.)
2428
reconnects: 0 (0.00 per sec.)
2529
2630
General statistics:
27-
total time: 300.0018s
28-
total number of events: 134841
31+
total time: 300.0038s
32+
total number of events: 351258
2933
3034
Latency (ms):
31-
min: 1.63
32-
avg: 2.22
33-
max: 93.41
34-
95th percentile: 2.71
35-
sum: 299851.38
35+
min: 2.16
36+
avg: 3.41
37+
max: 21.80
38+
95th percentile: 4.18
39+
sum: 1199475.11
3640
3741
Threads fairness:
38-
events (avg/stddev): 134841.0000/0.00
39-
execution time (avg/stddev): 299.8514/0.00
42+
events (avg/stddev): 87814.5000/41.08
43+
execution time (avg/stddev): 299.8688/0.00
44+
```
45+
46+
### Semi-sync replication, WaitPoint=AfterSync
4047

48+
```
49+
TODO
4150
```
4251

4352
### Semi-sync replication + MaxScale
@@ -56,4 +65,4 @@ TODO
5665

5766
```
5867
TODO
59-
```
68+
```

mariadb-replication-topolvm/mariadb/mariadb.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ spec:
6666
errorDurationThreshold: 30s
6767
gtidStrictMode: true
6868
# semiSyncAckTimeout: 10s
69-
# semiSyncWaitPoint: AfterCommit
69+
# semiSyncWaitPoint: AfterSync
7070
# syncBinlog: 1
7171

7272
metrics:
@@ -77,16 +77,21 @@ spec:
7777
cpu: 4
7878
memory: 4Gi
7979
limits:
80+
cpu: 4
8081
memory: 4Gi
8182

8283
myCnf: |
8384
[mariadb]
8485
bind-address=*
8586
default_storage_engine=InnoDB
8687
binlog_format=row
88+
max_allowed_packet=1G
8789
innodb_autoinc_lock_mode=2
8890
innodb_buffer_pool_size=3200MB
89-
max_allowed_packet=1GB
91+
innodb_flush_method=O_DIRECT
92+
thread_handling=pool-of-threads
93+
thread_pool_size=4
94+
slave_parallel_threads=4
9095
9196
tolerations:
9297
- effect: NoSchedule
@@ -107,7 +112,7 @@ spec:
107112
apiVersion: k8s.mariadb.com/v1alpha1
108113
kind: PhysicalBackup
109114
metadata:
110-
name: physicalbackup--tpl
115+
name: physicalbackup-tpl
111116
spec:
112117
mariaDbRef:
113118
name: mariadb
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
apiVersion: v1
22
kind: Secret
33
metadata:
4-
name: mariadb
4+
name: maxscale
55
labels:
66
k8s.mariadb.com/watch: ""
77
stringData:
8-
password: MariaDB11!
9-
root-password: MariaDB11!
8+
password: MaxScale!

mariadb-replication-topolvm/mariadb/maxscale.yaml renamed to mariadb-replication-topolvm/maxscale/maxscale.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
generate: true
1919
adminUsername: mariadb-operator
2020
adminPasswordSecretKeyRef:
21-
name: mariadb
21+
name: maxscale
2222
key: password
2323

2424
metrics:
@@ -29,6 +29,7 @@ spec:
2929
cpu: 2
3030
memory: 1Gi
3131
limits:
32+
cpu: 2
3233
memory: 1Gi
3334

3435
tolerations:

mariadb-replication-topolvm/sysbench/sysbench-cronjob.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
- --mysql-password=MariaDB11!
4040
- --mysql-db=sbtest
4141
- --time=300
42-
- --threads=1
42+
- --threads=4
4343
- --report-interval=1
4444
- run
4545
resources:

0 commit comments

Comments
 (0)