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":2357,"ttfb":426.09999990463257,"pageVisibility":"visible","entityId":68187,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"38fdacc1-e614-4b8c-9e1c-dcf615cc9902","navigationType":0,"readyForUser":2448.0999999046326,"redirectCount":0,"resourceLoadedEnd":2108.0999999046326,"resourceLoadedStart":447.09999990463257,"resourceTiming":[{"duration":832,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":447.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":447.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1279.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":838.4000000953674,"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":447.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":447.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1285.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":1413.1999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":447.5,"connectEnd":447.5,"connectStart":447.5,"domainLookupEnd":447.5,"domainLookupStart":447.5,"fetchStart":447.5,"redirectEnd":0,"redirectStart":0,"requestStart":1293.0999999046326,"responseEnd":1860.6999998092651,"responseStart":1344.8000001907349,"secureConnectionStart":447.5},{"duration":1561.4000000953674,"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":447.69999980926514,"connectEnd":447.69999980926514,"connectStart":447.69999980926514,"domainLookupEnd":447.69999980926514,"domainLookupStart":447.69999980926514,"fetchStart":447.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":1292.5,"responseEnd":2009.0999999046326,"responseStart":1336.1999998092651,"secureConnectionStart":447.69999980926514},{"duration":895.7999997138977,"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":447.90000009536743,"connectEnd":447.90000009536743,"connectStart":447.90000009536743,"domainLookupEnd":447.90000009536743,"domainLookupStart":447.90000009536743,"fetchStart":447.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":1294.1999998092651,"responseEnd":1343.6999998092651,"responseStart":1332.5,"secureConnectionStart":447.90000009536743},{"duration":896.5,"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":448,"connectEnd":448,"connectStart":448,"domainLookupEnd":448,"domainLookupStart":448,"fetchStart":448,"redirectEnd":0,"redirectStart":0,"requestStart":1294.6999998092651,"responseEnd":1344.5,"responseStart":1341,"secureConnectionStart":448},{"duration":896.3999996185303,"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":448.30000019073486,"connectEnd":448.30000019073486,"connectStart":448.30000019073486,"domainLookupEnd":448.30000019073486,"domainLookupStart":448.30000019073486,"fetchStart":448.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":1294.9000000953674,"responseEnd":1344.6999998092651,"responseStart":1341.9000000953674,"secureConnectionStart":448.30000019073486},{"duration":833.8999996185303,"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":454.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":454.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1288.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":897.2000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":454.59999990463257,"connectEnd":454.59999990463257,"connectStart":454.59999990463257,"domainLookupEnd":454.59999990463257,"domainLookupStart":454.59999990463257,"fetchStart":454.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":1310.6999998092651,"responseEnd":1351.8000001907349,"responseStart":1347.5999999046326,"secureConnectionStart":454.59999990463257},{"duration":848.6999998092651,"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":454.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":454.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1303.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":926.5,"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":455,"connectEnd":455,"connectStart":455,"domainLookupEnd":455,"domainLookupStart":455,"fetchStart":455,"redirectEnd":0,"redirectStart":0,"requestStart":1339.9000000953674,"responseEnd":1381.5,"responseStart":1369.4000000953674,"secureConnectionStart":455},{"duration":1652,"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":456.09999990463257,"connectEnd":456.09999990463257,"connectStart":456.09999990463257,"domainLookupEnd":456.09999990463257,"domainLookupStart":456.09999990463257,"fetchStart":456.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":1578.4000000953674,"responseEnd":2108.0999999046326,"responseStart":2099.0999999046326,"secureConnectionStart":456.09999990463257},{"duration":1647.3000001907349,"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":456.19999980926514,"connectEnd":456.19999980926514,"connectStart":456.19999980926514,"domainLookupEnd":456.19999980926514,"domainLookupStart":456.19999980926514,"fetchStart":456.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":1794.9000000953674,"responseEnd":2103.5,"responseStart":2092.5,"secureConnectionStart":456.19999980926514},{"duration":194.59999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":2030,"connectEnd":2030,"connectStart":2030,"domainLookupEnd":2030,"domainLookupStart":2030,"fetchStart":2030,"redirectEnd":0,"redirectStart":0,"requestStart":2193.199999809265,"responseEnd":2224.5999999046326,"responseStart":2223.9000000953674,"secureConnectionStart":2030}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":175,"responseStart":426,"responseEnd":437,"domLoading":444,"domInteractive":2513,"domContentLoadedEventStart":2513,"domContentLoadedEventEnd":2564,"domComplete":3186,"loadEventStart":3186,"loadEventEnd":3186,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2489},{"name":"bigPipe.sidebar-id.end","time":2489.800000190735},{"name":"bigPipe.activity-panel-pipe-id.start","time":2489.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":2491.199999809265},{"name":"activityTabFullyLoaded","time":2626.9000000953674}],"measures":[],"correlationId":"6d31abeda8848","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":179,"dbReadsTimeInMs":41,"dbConnsTimeInMs":51,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}