We are about to enable sync-binlog by default in 10.2. Please check how it affects performance on some standard read-write load with binary log enabled. No need for accurate numbers, but we should have at least a rough picture.
I've run a series of OLTP benchmarks with varying write intensity (10, 22, 80 and 100% writes). I tested 3 different log settings:
innodb_flush_log_at_trx_commit=0, sync-binlog=0
innodb_flush_log_at_trx_commit=1, sync-binlog=0
innodb_flush_log_at_trx_commit=1, sync-binlog=1
Naturally there is a big difference between 1. and 2., but also between 2. and 3. Here I see a performance drop between 10% and 50%. The effect is more pronounced when the datadir resides on a hard (rotating) disk. But even on a (fast) SSD the effect is clearly visible. For details see the attached spread sheets.
I tested MariaDB 10.1 and 10.2 and also MySQL 5.7. The numbers are in the same ballpark for all 3 of them with some slight advantage for 10.2. This however is no reason to celebrate, because in absolute numbers 10.2 comes out at the bottom.
I also spotted an irregularity here: it seems that MariaDB 10.2 does two fsyncs per commit on the InnoDB redo log as soon as one sets innodb_flush_log_at_trx_commit=1 and enables the binlog (no matter if sync-binlog=0 or 1). This is someting to investigate in a separate task.
I also checked the bytes written per transaction to the redo log and the binlog. There is a moderate increase of ~6 bytes per binlog event in 10.2 compared to 10.1. No numbers here for MySQL (it does not have a status variable for binlog writes).
Axel Schwenke
added a comment - I've run a series of OLTP benchmarks with varying write intensity (10, 22, 80 and 100% writes). I tested 3 different log settings:
innodb_flush_log_at_trx_commit=0, sync-binlog=0
innodb_flush_log_at_trx_commit=1, sync-binlog=0
innodb_flush_log_at_trx_commit=1, sync-binlog=1
Naturally there is a big difference between 1. and 2., but also between 2. and 3. Here I see a performance drop between 10% and 50%. The effect is more pronounced when the datadir resides on a hard (rotating) disk. But even on a (fast) SSD the effect is clearly visible. For details see the attached spread sheets.
I tested MariaDB 10.1 and 10.2 and also MySQL 5.7. The numbers are in the same ballpark for all 3 of them with some slight advantage for 10.2. This however is no reason to celebrate, because in absolute numbers 10.2 comes out at the bottom.
I also spotted an irregularity here: it seems that MariaDB 10.2 does two fsyncs per commit on the InnoDB redo log as soon as one sets innodb_flush_log_at_trx_commit=1 and enables the binlog (no matter if sync-binlog=0 or 1). This is someting to investigate in a separate task.
I also checked the bytes written per transaction to the redo log and the binlog. There is a moderate increase of ~6 bytes per binlog event in 10.2 compared to 10.1. No numbers here for MySQL (it does not have a status variable for binlog writes).
I'd say 50% is not too bad, that's something that I would initially expect, my results were much worse (but they aren't reliable).
I don't see it mentioned anywhere, did you run with the default statement binlog_format, or were there different ones? I wonder if it might make a difference.
Our new default is expected to be mixed, which can easily switch to row.
Elena Stepanova
added a comment - I'd say 50% is not too bad, that's something that I would initially expect, my results were much worse (but they aren't reliable).
I don't see it mentioned anywhere, did you run with the default statement binlog_format, or were there different ones? I wonder if it might make a difference.
Our new default is expected to be mixed, which can easily switch to row.
People
Axel Schwenke
Elena Stepanova
Votes:
0Vote for this issue
Watchers:
4Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1081.1999998092651,"ttfb":566.0999999046326,"pageVisibility":"visible","entityId":59950,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"7dd95a92-abec-42ac-b66c-22fe8f2ab7ed","navigationType":0,"readyForUser":1137.3999998569489,"redirectCount":0,"resourceLoadedEnd":1000.7999999523163,"resourceLoadedStart":578.5999999046326,"resourceTiming":[{"duration":14.099999904632568,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":578.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":578.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":592.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":16.600000143051147,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":578.8999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":578.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":595.5,"responseStart":0,"secureConnectionStart":0},{"duration":55.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":579.0999999046326,"connectEnd":579.0999999046326,"connectStart":579.0999999046326,"domainLookupEnd":579.0999999046326,"domainLookupStart":579.0999999046326,"fetchStart":579.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":598.1999998092651,"responseEnd":635,"responseStart":609.0999999046326,"secureConnectionStart":579.0999999046326},{"duration":70.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":579.8999998569489,"connectEnd":579.8999998569489,"connectStart":579.8999998569489,"domainLookupEnd":579.8999998569489,"domainLookupStart":579.8999998569489,"fetchStart":579.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":598.7999999523163,"responseEnd":650.7999999523163,"responseStart":614.6999998092651,"secureConnectionStart":579.8999998569489},{"duration":46.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":580,"connectEnd":580,"connectStart":580,"domainLookupEnd":580,"domainLookupStart":580,"fetchStart":580,"redirectEnd":0,"redirectStart":0,"requestStart":604.3999998569489,"responseEnd":626.8999998569489,"responseStart":626.0999999046326,"secureConnectionStart":580},{"duration":48,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":580.0999999046326,"connectEnd":580.0999999046326,"connectStart":580.0999999046326,"domainLookupEnd":580.0999999046326,"domainLookupStart":580.0999999046326,"fetchStart":580.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":605.5999999046326,"responseEnd":628.0999999046326,"responseStart":627,"secureConnectionStart":580.0999999046326},{"duration":39.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":580.1999998092651,"connectEnd":607.6999998092651,"connectStart":607.6999998092651,"domainLookupEnd":607.6999998092651,"domainLookupStart":607.6999998092651,"fetchStart":580.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":608.5,"responseEnd":619.7999999523163,"responseStart":618.5999999046326,"secureConnectionStart":607.6999998092651},{"duration":27.700000047683716,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":580.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":580.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":608,"responseStart":0,"secureConnectionStart":0},{"duration":29.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":580.3999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":580.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":609.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":40.700000047683716,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":580.3999998569489,"connectEnd":580.3999998569489,"connectStart":580.3999998569489,"domainLookupEnd":580.3999998569489,"domainLookupStart":580.3999998569489,"fetchStart":580.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":610.5,"responseEnd":621.0999999046326,"responseStart":620.1999998092651,"secureConnectionStart":580.3999998569489},{"duration":44.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":580.5999999046326,"connectEnd":580.5999999046326,"connectStart":580.5999999046326,"domainLookupEnd":580.5999999046326,"domainLookupStart":580.5999999046326,"fetchStart":580.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":612.3999998569489,"responseEnd":625.5,"responseStart":622.6999998092651,"secureConnectionStart":580.5999999046326},{"duration":356,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":581.6999998092651,"connectEnd":581.6999998092651,"connectStart":581.6999998092651,"domainLookupEnd":581.6999998092651,"domainLookupStart":581.6999998092651,"fetchStart":581.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":858,"responseEnd":937.6999998092651,"responseStart":934.2999999523163,"secureConnectionStart":581.6999998092651},{"duration":418.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":581.8999998569489,"connectEnd":581.8999998569489,"connectStart":581.8999998569489,"domainLookupEnd":581.8999998569489,"domainLookupStart":581.8999998569489,"fetchStart":581.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":989.7999999523163,"responseEnd":1000.7999999523163,"responseStart":1000.0999999046326,"secureConnectionStart":581.8999998569489},{"duration":171.60000014305115,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":828.1999998092651,"connectEnd":828.1999998092651,"connectStart":828.1999998092651,"domainLookupEnd":828.1999998092651,"domainLookupStart":828.1999998092651,"fetchStart":828.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":971.1999998092651,"responseEnd":999.7999999523163,"responseStart":998.8999998569489,"secureConnectionStart":828.1999998092651},{"duration":74.79999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1054.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1054.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1129.2999999523163,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":94,"domainLookupEnd":134,"connectStart":135,"connectEnd":153,"secureConnectionStart":143,"requestStart":154,"responseStart":567,"responseEnd":582,"domLoading":571,"domInteractive":1188,"domContentLoadedEventStart":1188,"domContentLoadedEventEnd":1225,"domComplete":1586,"loadEventStart":1586,"loadEventEnd":1587,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1167.5},{"name":"bigPipe.sidebar-id.end","time":1168.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":1168.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1169.5999999046326},{"name":"activityTabFullyLoaded","time":1242.2999999523163}],"measures":[],"correlationId":"f2659fb70fcd0f","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":76,"dbReadsTimeInMs":10,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I've run a series of OLTP benchmarks with varying write intensity (10, 22, 80 and 100% writes). I tested 3 different log settings:
Naturally there is a big difference between 1. and 2., but also between 2. and 3. Here I see a performance drop between 10% and 50%. The effect is more pronounced when the datadir resides on a hard (rotating) disk. But even on a (fast) SSD the effect is clearly visible. For details see the attached spread sheets.
I tested MariaDB 10.1 and 10.2 and also MySQL 5.7. The numbers are in the same ballpark for all 3 of them with some slight advantage for 10.2. This however is no reason to celebrate, because in absolute numbers 10.2 comes out at the bottom.
I also spotted an irregularity here: it seems that MariaDB 10.2 does two
fsyncs per commit on the InnoDB redo log as soon as one sets innodb_flush_log_at_trx_commit=1 and enables the binlog (no matter if sync-binlog=0 or 1). This is someting to investigate in a separate task.
I also checked the bytes written per transaction to the redo log and the binlog. There is a moderate increase of ~6 bytes per binlog event in 10.2 compared to 10.1. No numbers here for MySQL (it does not have a status variable for binlog writes).