Type:
Bug
Priority:
Major
Resolution:
Unresolved
Affects Version/s:
10.6
Fix Version/s:
None
Environment:
SUSE Enterprise Linux 15 SP4, openSUSE Tumbleweed
MariaDB 10.6 has O_DIRECT value as default for innodb_flush_method instead of fsync. This lead to a performance regression in the default configuration, regardless of the filesystem used.
To benchmark the performance, I have used sysbench-0.4.8 oltp read test on btrfs (the most affected), ext4 and xfs.
Filesystem
threads
innodb_flush_method=fsync
innodb_flush_method=O_DIRECT
ext4
1
6.5s
7.0s
ext4
16
0.97s
1.15s
brtfs
1
6.5s
77s
brtfs
16
0.8s
3.1s
xfs
1
6.4s
7.2s
xfs
16
0.8s
1.1s
I have used a mount point in /abuild and the following configuration in /etc/my.cnf.d/sysbench_testing.cnf :
[mysqld]
port = 3306
datadir=/abuild/mysql-sysbench
socket=/abuild/mysql-sysbench/sysbench-mysql.sock
#innodb_flush_method=fsync
To reproduce, run the following commands:
$ # prepare the db
$ sysbench --test=oltp --mysql-user=root \
--mysql-socket=/abuild/mysql-sysbench/sysbench-mysql.sock \
--mysql-db=test --mysql-port=3306 \
--oltp-dist-type=uniform --oltp-read-only --oltp-order-ranges=0 \
--oltp-table-size=1000000 --oltp-range-size=1000 prepare
$ # run the benchmark
$ sysbench --test=oltp --mysql-user=root \
--mysql-socket=/abuild/mysql-sysbench/sysbench-mysql.sock \
--mysql-db=test --mysql-port=3306 \
--oltp-dist-type=uniform --oltp-read-only --oltp-order-ranges=0 \
--oltp-table-size=1000000 --oltp-range-size=1000 \
--num-threads=$NTHREADS run
$ # cleanup the db
$ sysbench --test=oltp --mysql-user=root \
--mysql-socket=/abuild/mysql-sysbench/sysbench-mysql.sock \
--mysql-db=test --mysql-port=3306 cleanup >/dev/null 1>&2
I am also aware that some testing by some colleague lead to similar regression in xfs (353.5476s in 10.6 vs 16.9560s in 10.5).
{"report":{"fcp":1504.7999999523163,"ttfb":547.7000000476837,"pageVisibility":"visible","entityId":107707,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"6a651960-d4e7-4db4-a259-1ba62be1e8c0","navigationType":0,"readyForUser":1898.7999999523163,"redirectCount":0,"resourceLoadedEnd":1562.9000000953674,"resourceLoadedStart":554.2999999523163,"resourceTiming":[{"duration":198.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":554.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":554.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":752.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":401.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":554.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":554.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":955.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":409.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":554.7999999523163,"connectEnd":554.7999999523163,"connectStart":554.7999999523163,"domainLookupEnd":554.7999999523163,"domainLookupStart":554.7999999523163,"fetchStart":554.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":554.7999999523163,"responseEnd":964.2000000476837,"responseStart":964.2000000476837,"secureConnectionStart":554.7999999523163},{"duration":465.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":555.0999999046326,"connectEnd":555.0999999046326,"connectStart":555.0999999046326,"domainLookupEnd":555.0999999046326,"domainLookupStart":555.0999999046326,"fetchStart":555.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":555.0999999046326,"responseEnd":1020.5999999046326,"responseStart":1020.5999999046326,"secureConnectionStart":555.0999999046326},{"duration":472.09999990463257,"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":555.5,"connectEnd":555.5,"connectStart":555.5,"domainLookupEnd":555.5,"domainLookupStart":555.5,"fetchStart":555.5,"redirectEnd":0,"redirectStart":0,"requestStart":555.5,"responseEnd":1027.5999999046326,"responseStart":1027.5999999046326,"secureConnectionStart":555.5},{"duration":473,"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":555.7000000476837,"connectEnd":555.7000000476837,"connectStart":555.7000000476837,"domainLookupEnd":555.7000000476837,"domainLookupStart":555.7000000476837,"fetchStart":555.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":555.7000000476837,"responseEnd":1028.7000000476837,"responseStart":1028.7000000476837,"secureConnectionStart":555.7000000476837},{"duration":474.2000000476837,"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":555.7999999523163,"connectEnd":555.7999999523163,"connectStart":555.7999999523163,"domainLookupEnd":555.7999999523163,"domainLookupStart":555.7999999523163,"fetchStart":555.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":555.7999999523163,"responseEnd":1030,"responseStart":1030,"secureConnectionStart":555.7999999523163},{"duration":626.2000000476837,"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":556,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":556,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1182.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":476.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":556.2000000476837,"connectEnd":556.2000000476837,"connectStart":556.2000000476837,"domainLookupEnd":556.2000000476837,"domainLookupStart":556.2000000476837,"fetchStart":556.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":556.2000000476837,"responseEnd":1032.7000000476837,"responseStart":1032.7000000476837,"secureConnectionStart":556.2000000476837},{"duration":626.2000000476837,"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":556.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":556.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1182.5,"responseStart":0,"secureConnectionStart":0},{"duration":480,"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":556.5,"connectEnd":556.5,"connectStart":556.5,"domainLookupEnd":556.5,"domainLookupStart":556.5,"fetchStart":556.5,"redirectEnd":0,"redirectStart":0,"requestStart":556.5,"responseEnd":1036.5,"responseStart":1036.5,"secureConnectionStart":556.5},{"duration":1003.5,"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":557.9000000953674,"connectEnd":557.9000000953674,"connectStart":557.9000000953674,"domainLookupEnd":557.9000000953674,"domainLookupStart":557.9000000953674,"fetchStart":557.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":557.9000000953674,"responseEnd":1561.4000000953674,"responseStart":1561.4000000953674,"secureConnectionStart":557.9000000953674},{"duration":1004.9000000953674,"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":558,"connectEnd":558,"connectStart":558,"domainLookupEnd":558,"domainLookupStart":558,"fetchStart":558,"redirectEnd":0,"redirectStart":0,"requestStart":558,"responseEnd":1562.9000000953674,"responseStart":1562.9000000953674,"secureConnectionStart":558},{"duration":249,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1255.7999999523163,"connectEnd":1255.7999999523163,"connectStart":1255.7999999523163,"domainLookupEnd":1255.7999999523163,"domainLookupStart":1255.7999999523163,"fetchStart":1255.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1255.7999999523163,"responseEnd":1504.7999999523163,"responseStart":1504.7999999523163,"secureConnectionStart":1255.7999999523163}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":85,"responseStart":548,"responseEnd":551,"domLoading":552,"domInteractive":2027,"domContentLoadedEventStart":2027,"domContentLoadedEventEnd":2125,"domComplete":2711,"loadEventStart":2712,"loadEventEnd":2712,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1976.7000000476837},{"name":"bigPipe.sidebar-id.end","time":1977.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1977.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1979.4000000953674},{"name":"activityTabFullyLoaded","time":2147.0999999046326}],"measures":[],"correlationId":"965394a3a8b662","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":109,"dbReadsTimeInMs":19,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}