On MySQL and MariaDB 5.5 this is instantaneous. On 5.6 - 8.0 it takes a few
seconds, worst case I measured over the weekend is 77s, which is
pretty terrible, but with MariaDB 10.4 - 11.4 it never seems to
complete at all.
If I kill sysbench, it completes immediately.
On 10.3 it works, in line with MySQL 5.6 - 8.0. Slow (I would expect this to be instantaneous, like it was in 5.5), but at least it completes in a reasonable amount of time most of the time.
Whatever the cause, it got substantially worse in 10.4.34.
With 10.4.0-10.4.33 it isn't great, but it typically finishes in
between a few seconds up to 5 minutes.
With 10.4.34, it never finishes in the seconds, I saw only one example
in hours of testing where `flush slow logs;` under heavy load
completed in under a minute, in most cases it takes upward of 10
minutes.
A very bad workaround is something like this:
set global slow_query_log=0;
\!mv slow.log slow.log.1
flush slow logs;
set global slow_query_log=1;
but the big problem with that is that it is lossy - the above operation is not atomic, so some queries will be omitted from the log.
Started mariadbd with your settings.
I used mariadb-slap (with concurrency set to `nproc`) instead of sysbench, but it shouldn't matter, I think, it just needed to generate a constant load. I saw the slow log file growing at about few Mb/sec.
Then mv and flush slow logs. Which finished pretty much immediately (less than 1ms) and the new file kept growing at the same rate.
May be there was something else in your config that caused this effect?
Sergei Golubchik
added a comment - - edited I don't seem to be able to repeat it.
Started mariadbd with your settings.
I used mariadb-slap (with concurrency set to `nproc`) instead of sysbench, but it shouldn't matter, I think, it just needed to generate a constant load. I saw the slow log file growing at about few Mb/sec.
Then mv and flush slow logs . Which finished pretty much immediately (less than 1ms) and the new file kept growing at the same rate.
May be there was something else in your config that caused this effect?
People
Unassigned
Gordan Bobic
Votes:
0Vote for this issue
Watchers:
2Start 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":1146.5999999046326,"ttfb":607.3000001907349,"pageVisibility":"visible","entityId":131655,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"49d96b6a-ab2e-46cd-bffb-23be4429ba1b","navigationType":0,"readyForUser":1203.2000002861023,"redirectCount":0,"resourceLoadedEnd":1029.2000002861023,"resourceLoadedStart":614.5,"resourceTiming":[{"duration":24.300000190734863,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bsh/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":614.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":614.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":638.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":30.799999713897705,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bsh/820016/12ta74/eb142f92e4bd16bd1ef8b08c1b9d5d56/_/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":614.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":614.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":645.5,"responseStart":0,"secureConnectionStart":0},{"duration":86.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/c54b129276d75dc2a3460e1d78f37913-CDN/lu2bsh/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":614.9000000953674,"connectEnd":614.9000000953674,"connectStart":614.9000000953674,"domainLookupEnd":614.9000000953674,"domainLookupStart":614.9000000953674,"fetchStart":614.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":653.3000001907349,"responseEnd":701.0999999046326,"responseStart":668.5999999046326,"secureConnectionStart":614.9000000953674},{"duration":99.7000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/f867843cd2fdb209d4d1d4f760f86346-CDN/lu2bsh/820016/12ta74/eb142f92e4bd16bd1ef8b08c1b9d5d56/_/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":615,"connectEnd":615,"connectStart":615,"domainLookupEnd":615,"domainLookupStart":615,"fetchStart":615,"redirectEnd":0,"redirectStart":0,"requestStart":659.2000002861023,"responseEnd":714.7000002861023,"responseStart":686.4000000953674,"secureConnectionStart":615},{"duration":74.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/ffdb17665775c5b4d6f097f3974ee359-CDN/lu2bsh/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":615.0999999046326,"connectEnd":615.0999999046326,"connectStart":615.0999999046326,"domainLookupEnd":615.0999999046326,"domainLookupStart":615.0999999046326,"fetchStart":615.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":659.9000000953674,"responseEnd":689.2000002861023,"responseStart":688.5999999046326,"secureConnectionStart":615.0999999046326},{"duration":77.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":615.2000002861023,"connectEnd":615.2000002861023,"connectStart":615.2000002861023,"domainLookupEnd":615.2000002861023,"domainLookupStart":615.2000002861023,"fetchStart":615.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":662.4000000953674,"responseEnd":692.7000002861023,"responseStart":692.2000002861023,"secureConnectionStart":615.2000002861023},{"duration":76.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":615.3000001907349,"connectEnd":615.3000001907349,"connectStart":615.3000001907349,"domainLookupEnd":615.3000001907349,"domainLookupStart":615.3000001907349,"fetchStart":615.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":663.5,"responseEnd":692,"responseStart":691.5,"secureConnectionStart":615.3000001907349},{"duration":46.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bsh/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":615.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":615.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":662.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":65.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":615.5,"connectEnd":667.2000002861023,"connectStart":667.2000002861023,"domainLookupEnd":667.2000002861023,"domainLookupStart":667.2000002861023,"fetchStart":615.5,"redirectEnd":0,"redirectStart":0,"requestStart":667.4000000953674,"responseEnd":680.5999999046326,"responseStart":678.9000000953674,"secureConnectionStart":667.2000002861023},{"duration":49.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bsh/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":615.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":615.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":665,"responseStart":0,"secureConnectionStart":0},{"duration":71.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/81b5d7c27af3ebc078cc4a36383678ba-CDN/lu2bsh/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":615.8000001907349,"connectEnd":615.8000001907349,"connectStart":615.8000001907349,"domainLookupEnd":615.8000001907349,"domainLookupStart":615.8000001907349,"fetchStart":615.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":669.5999999046326,"responseEnd":687.5,"responseStart":680.7000002861023,"secureConnectionStart":615.8000001907349},{"duration":398.2000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":630.0999999046326,"connectEnd":630.0999999046326,"connectStart":630.0999999046326,"domainLookupEnd":630.0999999046326,"domainLookupStart":630.0999999046326,"fetchStart":630.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":873.9000000953674,"responseEnd":1028.3000001907349,"responseStart":1024.3000001907349,"secureConnectionStart":630.0999999046326},{"duration":397.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bsh/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":631.5999999046326,"connectEnd":631.5999999046326,"connectStart":631.5999999046326,"domainLookupEnd":631.5999999046326,"domainLookupStart":631.5999999046326,"fetchStart":631.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":874.3000001907349,"responseEnd":1029.2000002861023,"responseStart":1025.7000002861023,"secureConnectionStart":631.5999999046326},{"duration":175.2999997138977,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":896.3000001907349,"connectEnd":896.3000001907349,"connectStart":896.3000001907349,"domainLookupEnd":896.3000001907349,"domainLookupStart":896.3000001907349,"fetchStart":896.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1036,"responseEnd":1071.5999999046326,"responseStart":1069.2000002861023,"secureConnectionStart":896.3000001907349}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":192,"responseStart":607,"responseEnd":631,"domLoading":610,"domInteractive":1251,"domContentLoadedEventStart":1251,"domContentLoadedEventEnd":1290,"domComplete":2091,"loadEventStart":2092,"loadEventEnd":2092,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1233.0999999046326},{"name":"bigPipe.sidebar-id.end","time":1233.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1234.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":1234.9000000953674},{"name":"activityTabFullyLoaded","time":1305.5}],"measures":[],"correlationId":"1d8259ef78e1e1","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":72,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I don't seem to be able to repeat it.
Started mariadbd with your settings.
I used mariadb-slap (with concurrency set to `nproc`) instead of sysbench, but it shouldn't matter, I think, it just needed to generate a constant load. I saw the slow log file growing at about few Mb/sec.
Then mv and flush slow logs. Which finished pretty much immediately (less than 1ms) and the new file kept growing at the same rate.
May be there was something else in your config that caused this effect?