A re-run on t480 laptop (Intel Core i7-8550U, 8 CPUs)
SERVER_DIR=mysql-5.6-orig
SYSBENCH_TEST=oltp_read_write.lua
Threads, QPS
1 1747.17
5 9350.29
10 15083.44
20 16130.49
40 23688.07
SERVER_DIR=mysql-5.6-range-locking
SYSBENCH_TEST=oltp_read_write.lua
Threads, QPS
1 1757.39
5 9038.06
10 15591.72
20 16592.19
40 23555.30
Threads orig range-locking Slowdown, %
1 1747.17 1757.39 -0.58
5 9350.29 9038.06 3.34
10 15083.44 15591.72 -3.37
20 16130.49 16592.19 -2.86
40 23688.07 23555.3 0.56
There was even a speedup sometimes.
The question is, is this really a "locking system bound" workload, and if there
is a workload that's more bound by the locking system.
Sergei Petrunia
added a comment - A re-run on t480 laptop (Intel Core i7-8550U, 8 CPUs)
SERVER_DIR=mysql-5.6-orig
SYSBENCH_TEST=oltp_read_write.lua
Threads, QPS
1 1747.17
5 9350.29
10 15083.44
20 16130.49
40 23688.07
SERVER_DIR=mysql-5.6-range-locking
SYSBENCH_TEST=oltp_read_write.lua
Threads, QPS
1 1757.39
5 9038.06
10 15591.72
20 16592.19
40 23555.30
Threads orig range-locking Slowdown, %
1 1747.17 1757.39 -0.58
5 9350.29 9038.06 3.34
10 15083.44 15591.72 -3.37
20 16130.49 16592.19 -2.86
40 23688.07 23555.3 0.56
There was even a speedup sometimes.
The question is, is this really a "locking system bound" workload, and if there
is a workload that's more bound by the locking system.
(Posting results from March, 13th) The tests were run on the c5.9xlarge instance.
A possible reason why range locking performance is worse could be that it is simply doing more locking. For example, it acquires locks on secondary indexes. Re-running the sysbench test but without secondary indexes:
QPS is higher without the secondary indexes in both cases. However the difference between range locking and point locking only grows larger.
Sergei Petrunia
added a comment - - edited (Posting results from March, 13th) The tests were run on the c5.9xlarge instance.
A possible reason why range locking performance is worse could be that it is simply doing more locking. For example, it acquires locks on secondary indexes. Re-running the sysbench test but without secondary indexes:
orig range-locking no-secondary, orig no-secondary, range-locking
1 22525.26 23522.95 23449.64 24499.37
5 100552.68 92144.06 110104.93 105632.95
10 172812.39 140631.97 199158.13 172619.56
20 198175.42 122340.31 264702.31 171823.65
40 218914.92 114454.2 325606.21 154786.56
60 222541.1 110822.75 345715.22 150504.49
80 221685.74 108832.36 346243.2 150345.16
100 218005.72 108108.64 355985.66 152040.97
QPS is higher without the secondary indexes in both cases. However the difference between range locking and point locking only grows larger.
the performance in this mode was the same as with range locking. The conclusion: the cause of worse performance is that the range locking system by itself has a higher overhead (or, a lower concurrency). The fact that range locking mode acquires more locks does not seem to play a big role.
Sergei Petrunia
added a comment - Modified the code to add a new mode: range locking subsystem is used, but we only take point locks.
orig range-locking no-secondary, orig no-secondary, range-locking range-locking-force-point
1 22525.26 23522.95 23449.64 24499.37 24397.8
5 100552.68 92144.06 110104.93 105632.95 105774.04
10 172812.39 140631.97 199158.13 172619.56 172205.06
20 198175.42 122340.31 264702.31 171823.65 171822.15
40 218914.92 114454.2 325606.21 154786.56 154483.92
60 222541.1 110822.75 345715.22 150504.49 150290.71
80 221685.74 108832.36 346243.2 150345.16 150074.48
100 218005.72 108108.64 355985.66 152040.97 152179.49
the performance in this mode was the same as with range locking. The conclusion: the cause of worse performance is that the range locking system by itself has a higher overhead (or, a lower concurrency). The fact that range locking mode acquires more locks does not seem to play a big role.
People
Sergei Petrunia
Sergei Petrunia
Votes:
0Vote for this issue
Watchers:
1Start 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":1832.3999996185303,"ttfb":441.2999997138977,"pageVisibility":"visible","entityId":73033,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"94bb4dfd-eb0f-4597-8779-10be56ee6fbf","navigationType":0,"readyForUser":1920.6999998092651,"redirectCount":0,"resourceLoadedEnd":2215.199999809265,"resourceLoadedStart":475.8999996185303,"resourceTiming":[{"duration":252.10000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":475.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":475.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":728,"responseStart":0,"secureConnectionStart":0},{"duration":764.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":476.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":476.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1240.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":773.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":476.2999997138977,"connectEnd":476.2999997138977,"connectStart":476.2999997138977,"domainLookupEnd":476.2999997138977,"domainLookupStart":476.2999997138977,"fetchStart":476.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":476.2999997138977,"responseEnd":1249.5999999046326,"responseStart":1249.5999999046326,"secureConnectionStart":476.2999997138977},{"duration":882,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":476.5,"connectEnd":476.5,"connectStart":476.5,"domainLookupEnd":476.5,"domainLookupStart":476.5,"fetchStart":476.5,"redirectEnd":0,"redirectStart":0,"requestStart":476.5,"responseEnd":1358.5,"responseStart":1358.5,"secureConnectionStart":476.5},{"duration":885.7000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":476.7999997138977,"connectEnd":476.7999997138977,"connectStart":476.7999997138977,"domainLookupEnd":476.7999997138977,"domainLookupStart":476.7999997138977,"fetchStart":476.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":476.7999997138977,"responseEnd":1362.5,"responseStart":1362.5,"secureConnectionStart":476.7999997138977},{"duration":886.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":477,"connectEnd":477,"connectStart":477,"domainLookupEnd":477,"domainLookupStart":477,"fetchStart":477,"redirectEnd":0,"redirectStart":0,"requestStart":477,"responseEnd":1363.3999996185303,"responseStart":1363.3999996185303,"secureConnectionStart":477},{"duration":886.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":477.19999980926514,"connectEnd":477.19999980926514,"connectStart":477.19999980926514,"domainLookupEnd":477.19999980926514,"domainLookupStart":477.19999980926514,"fetchStart":477.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":477.19999980926514,"responseEnd":1363.6999998092651,"responseStart":1363.6999998092651,"secureConnectionStart":477.19999980926514},{"duration":928.7000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":477.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":477.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1406,"responseStart":0,"secureConnectionStart":0},{"duration":886.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":477.5,"connectEnd":477.5,"connectStart":477.5,"domainLookupEnd":477.5,"domainLookupStart":477.5,"fetchStart":477.5,"redirectEnd":0,"redirectStart":0,"requestStart":477.5,"responseEnd":1364.1999998092651,"responseStart":1364.1999998092651,"secureConnectionStart":477.5},{"duration":928.7999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":477.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":477.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1406.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":887,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":477.7999997138977,"connectEnd":477.7999997138977,"connectStart":477.7999997138977,"domainLookupEnd":477.7999997138977,"domainLookupStart":477.7999997138977,"fetchStart":477.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":477.7999997138977,"responseEnd":1364.7999997138977,"responseStart":1364.7999997138977,"secureConnectionStart":477.7999997138977},{"duration":1390,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":478.69999980926514,"connectEnd":478.69999980926514,"connectStart":478.69999980926514,"domainLookupEnd":478.69999980926514,"domainLookupStart":478.69999980926514,"fetchStart":478.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":478.69999980926514,"responseEnd":1868.6999998092651,"responseStart":1868.6999998092651,"secureConnectionStart":478.69999980926514},{"duration":1736.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":478.7999997138977,"connectEnd":478.7999997138977,"connectStart":478.7999997138977,"domainLookupEnd":478.7999997138977,"domainLookupStart":478.7999997138977,"fetchStart":478.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":478.7999997138977,"responseEnd":2215.199999809265,"responseStart":2215.199999809265,"secureConnectionStart":478.7999997138977},{"duration":431.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1448.6999998092651,"connectEnd":1448.6999998092651,"connectStart":1448.6999998092651,"domainLookupEnd":1448.6999998092651,"domainLookupStart":1448.6999998092651,"fetchStart":1448.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1448.6999998092651,"responseEnd":1880.0999999046326,"responseStart":1880.0999999046326,"secureConnectionStart":1448.6999998092651}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":260,"responseStart":441,"responseEnd":457,"domLoading":471,"domInteractive":2265,"domContentLoadedEventStart":2265,"domContentLoadedEventEnd":2324,"domComplete":2983,"loadEventStart":2983,"loadEventEnd":2984,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2217.0999999046326},{"name":"bigPipe.sidebar-id.end","time":2218},{"name":"bigPipe.activity-panel-pipe-id.start","time":2218.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":2224.8999996185303},{"name":"activityTabFullyLoaded","time":2344.5}],"measures":[],"correlationId":"d256606fa9c6c0","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":119,"dbReadsTimeInMs":15,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Results:
SERVER_DIR=mysql-5.6-orig
SYSBENCH_TEST=oltp_read_write.lua
Threads, QPS
1 6104.14
5 19847.76
10 30293.54
20 33025.06
40 34143.55
SERVER_DIR=mysql-5.6-range-locking
SYSBENCH_TEST=oltp_read_write.lua
Threads, QPS
1 6080.82
5 19554.02
10 30053.92
20 32346.45
40 33414.87
Computing the slowdown:
Threads orig range-locking Slowdown, %
1 6104.14 6080.82 0.38
5 19847.76 19554.02 1.48
10 30293.54 30053.92 0.79
20 33025.06 32346.45 2.05
40 34143.55 33414.87 2.13
The machine is AWS c5.2xlarge. 8 user-visible CPUs.