Galera clusters do not necessary need binary logging enabled on nodes, so configuration with binary logging disabled is quite common. It turned out that after upgrade to 10.1.x, these configurations started to perform worse, as notable time is spent on keeping tc.log updates (in pre-10.1 versions tc.log was not maintained in such cases, see MDEV-16442).
Simple sysbench tests may show this effect. For example, I've prepared the following table on my 2 cores old netbook running under Ubuntu 14.04:
sysbench --test=/usr/local/share/sysbench/tests/include/oltp_legacy/common.lua --mysql-host=127.0.0.1 --db-driver=mysql --mysql-user=root --mysql-db=test --oltp-table-size=2500000 prepare
|
Then I started single node cluster on the same datadir with the following command (all defaults unless specified):
openxs@ao756:~/dbs/maria10.1$ bin/mysqld_safe --no-defaults --binlog_format=row --wsrep_provider=/usr/lib/libgalera_smm.so --wsrep_on=1 --wsrep_cluster_address=gcomm://127.0.0.1:4567 --wsrep-new-cluster &
|
[1] 6991
|
|
openxs@ao756:~/dbs/maria10.1$ bin/mysql -uroot -e"select @@log_bin, @@wsrep_on, @@wsrep_cluster_address"
|
+-----------+------------+-------------------------+
|
| @@log_bin | @@wsrep_on | @@wsrep_cluster_address |
|
+-----------+------------+-------------------------+
|
| 0 | 1 | gcomm://127.0.0.1:4567 |
|
+-----------+------------+-------------------------+
|
and the run sysbench test with N concurrent threads, where N in (4,8,16):
sysbench --test=/usr/local/share/sysbench/tests/include/oltp_legacy/oltp.lua --mysql-host=127.0.0.1 --db-driver=mysql --mysql-user=root --mysql-db=test --oltp-table-size=2500000 --report-interval=1 --max_requests=0 --max-time=300 --threads=*N* run
|
I've got the following (low) TPS values:
threads | TPS
|
4 | 6.08
|
8 | 8.46
|
16 | 8.96
|
Then I stopped the node and restarted it again with log_bin enabled:
openxs@ao756:~/dbs/maria10.1$ bin/mysqld_safe --no-defaults --binlog_format=row --wsrep_provider=/usr/lib/libgalera_smm.so --wsrep_on=1 --wsrep_cluster_address=gcomm://127.0.0.1:4567 --wsrep-new-cluster --log_bin=1 &
|
|
openxs@ao756:~/dbs/maria10.1$ 180618 13:46:14 mysqld_safe Logging to '/home/openxs/dbs/maria10.1/data/ao756.err'.
|
180618 13:46:14 mysqld_safe Starting mysqld daemon with databases from /home/openxs/dbs/maria10.1/data
|
|
openxs@ao756:~/dbs/maria10.1$ bin/mysql -uroot -e"select @@log_bin, @@wsrep_on, @@wsrep_cluster_address"
|
+-----------+------------+-------------------------+
|
| @@log_bin | @@wsrep_on | @@wsrep_cluster_address |
|
+-----------+------------+-------------------------+
|
| 1 | 1 | gcomm://127.0.0.1:4567 |
|
+-----------+------------+-------------------------+
|
I've got the following results, with TPS values still small, but notably higher:
threads | TPS
|
4 | 14.78
|
8 | 15.00
|
16 | 15.56
|
It seems we should do something to reduce the impact of log_bin NOT specified or clearly recommend to set it explicitly in the KB articles for Galera nodes on 10.1.x+
Side node: I do NOT see the same effect without wsrep_on = ON - there without log_bin enabled we run a bit faster.
{"report":{"fcp":1141.6999998092651,"ttfb":293.5,"pageVisibility":"visible","entityId":68187,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"7e8c7724-90f1-485b-90db-7d3b68583a57","navigationType":0,"readyForUser":1248.9000000953674,"redirectCount":0,"resourceLoadedEnd":1298.0999999046326,"resourceLoadedStart":304.09999990463257,"resourceTiming":[{"duration":187,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":304.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":491.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":186.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":304.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":491.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":200.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":304.69999980926514,"connectEnd":304.69999980926514,"connectStart":304.69999980926514,"domainLookupEnd":304.69999980926514,"domainLookupStart":304.69999980926514,"fetchStart":304.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":304.69999980926514,"responseEnd":504.80000019073486,"responseStart":504.69999980926514,"secureConnectionStart":304.69999980926514},{"duration":407.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":305.40000009536743,"connectEnd":305.40000009536743,"connectStart":305.40000009536743,"domainLookupEnd":305.40000009536743,"domainLookupStart":305.40000009536743,"fetchStart":305.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":305.40000009536743,"responseEnd":712.8000001907349,"responseStart":712.8000001907349,"secureConnectionStart":305.40000009536743},{"duration":409,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":307.90000009536743,"connectEnd":307.90000009536743,"connectStart":307.90000009536743,"domainLookupEnd":307.90000009536743,"domainLookupStart":307.90000009536743,"fetchStart":307.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":307.90000009536743,"responseEnd":716.9000000953674,"responseStart":716.9000000953674,"secureConnectionStart":307.90000009536743},{"duration":412.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":308.30000019073486,"connectEnd":308.30000019073486,"connectStart":308.30000019073486,"domainLookupEnd":308.30000019073486,"domainLookupStart":308.30000019073486,"fetchStart":308.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":308.30000019073486,"responseEnd":720.5999999046326,"responseStart":720.5999999046326,"secureConnectionStart":308.30000019073486},{"duration":412,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":309.09999990463257,"connectEnd":309.09999990463257,"connectStart":309.09999990463257,"domainLookupEnd":309.09999990463257,"domainLookupStart":309.09999990463257,"fetchStart":309.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":309.09999990463257,"responseEnd":721.0999999046326,"responseStart":721.0999999046326,"secureConnectionStart":309.09999990463257},{"duration":414.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":309.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":309.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":723.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":411.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":310,"connectEnd":310,"connectStart":310,"domainLookupEnd":310,"domainLookupStart":310,"fetchStart":310,"redirectEnd":0,"redirectStart":0,"requestStart":310,"responseEnd":721.5999999046326,"responseStart":721.5999999046326,"secureConnectionStart":310},{"duration":413.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":310.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":310.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":723.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":411.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":310.40000009536743,"connectEnd":310.40000009536743,"connectStart":310.40000009536743,"domainLookupEnd":310.40000009536743,"domainLookupStart":310.40000009536743,"fetchStart":310.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":310.40000009536743,"responseEnd":722.0999999046326,"responseStart":722.0999999046326,"secureConnectionStart":310.40000009536743},{"duration":507.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":313.5,"connectEnd":313.5,"connectStart":313.5,"domainLookupEnd":313.5,"domainLookupStart":313.5,"fetchStart":313.5,"redirectEnd":0,"redirectStart":0,"requestStart":313.5,"responseEnd":821.4000000953674,"responseStart":821.4000000953674,"secureConnectionStart":313.5},{"duration":892.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":345.80000019073486,"connectEnd":345.80000019073486,"connectStart":345.80000019073486,"domainLookupEnd":345.80000019073486,"domainLookupStart":345.80000019073486,"fetchStart":345.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":345.80000019073486,"responseEnd":1238.3000001907349,"responseStart":1238.3000001907349,"secureConnectionStart":345.80000019073486},{"duration":151.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":669,"connectEnd":669,"connectStart":669,"domainLookupEnd":669,"domainLookupStart":669,"fetchStart":669,"redirectEnd":0,"redirectStart":0,"requestStart":669,"responseEnd":820.9000000953674,"responseStart":820.9000000953674,"secureConnectionStart":669},{"duration":277.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1020.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1020.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1298.0999999046326,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":91,"responseStart":293,"responseEnd":339,"domLoading":297,"domInteractive":1341,"domContentLoadedEventStart":1341,"domContentLoadedEventEnd":1385,"domComplete":2111,"loadEventStart":2111,"loadEventEnd":2113,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1316.1999998092651},{"name":"bigPipe.sidebar-id.end","time":1317.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1317.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1320.1999998092651},{"name":"activityTabFullyLoaded","time":1399}],"measures":[],"correlationId":"f9351a8412899d","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":118,"dbReadsTimeInMs":15,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}