Based on the experiments in MDEV-21784, it is interesting to see what would be the performance of dynamic-length mem-comparable key encoding. MyRocks already uses such encoding so it should be fairly easy to try.
Attachments
Issue Links
relates to
MDEV-21784Performance testing for packed sort keys
Sergei Petrunia
added a comment - A branch with a crude patch implementing this:
https://github.com/MariaDB/server/tree/10.5-mdev21955
Benchmark results:
https://docs.google.com/spreadsheets/d/1Y7FDgbmhXFigrgLd9pbZnNqbj5PCaxu9a1ahUU_QFRQ/edit?usp=sharing
Using Packed Keys with Variable-Length Mem-comparable Encoding produces a 10..30% speedup over current implementation of packed keys.
Looks like this is worth considering implementing for 10.6...
(Note that this encoding could also be used with priority queue. If one is sorting VARCHAR(255) there should be a gain from sort keys being smaller).
Sergei Petrunia
added a comment - - edited Summary of benchmark results so far:
Using Packed Keys with Variable-Length Mem-comparable Encoding produces a 10..30% speedup over current implementation of packed keys.
Looks like this is worth considering implementing for 10.6...
(Note that this encoding could also be used with priority queue. If one is sorting VARCHAR(255) there should be a gain from sort keys being smaller).
Sergei Petrunia
added a comment - Relative popularities of charsets according to the feedback plugin: https://gist.github.com/cvicentiu/143ad0750c59b523a47a1aebe0706068
People
Sergei Petrunia
Sergei Petrunia
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":790,"ttfb":171.60000038146973,"pageVisibility":"visible","entityId":84156,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"695c9de8-555e-412b-881b-3aee72b843e4","navigationType":0,"readyForUser":854.6999998092651,"redirectCount":0,"resourceLoadedEnd":696.1999998092651,"resourceLoadedStart":176.80000019073486,"resourceTiming":[{"duration":139.89999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":176.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":176.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":316.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":139.80000019073486,"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":177,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":177,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":316.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":150.29999923706055,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":177.10000038146973,"connectEnd":177.10000038146973,"connectStart":177.10000038146973,"domainLookupEnd":177.10000038146973,"domainLookupStart":177.10000038146973,"fetchStart":177.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":177.10000038146973,"responseEnd":327.3999996185303,"responseStart":327.3999996185303,"secureConnectionStart":177.10000038146973},{"duration":253.89999961853027,"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":177.30000019073486,"connectEnd":177.30000019073486,"connectStart":177.30000019073486,"domainLookupEnd":177.30000019073486,"domainLookupStart":177.30000019073486,"fetchStart":177.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":177.30000019073486,"responseEnd":431.19999980926514,"responseStart":431.19999980926514,"secureConnectionStart":177.30000019073486},{"duration":249.89999961853027,"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":177.30000019073486,"connectEnd":177.30000019073486,"connectStart":177.30000019073486,"domainLookupEnd":177.30000019073486,"domainLookupStart":177.30000019073486,"fetchStart":177.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":177.30000019073486,"responseEnd":427.19999980926514,"responseStart":427.19999980926514,"secureConnectionStart":177.30000019073486},{"duration":254.4000005722046,"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":177.39999961853027,"connectEnd":177.39999961853027,"connectStart":177.39999961853027,"domainLookupEnd":177.39999961853027,"domainLookupStart":177.39999961853027,"fetchStart":177.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":177.39999961853027,"responseEnd":431.80000019073486,"responseStart":431.80000019073486,"secureConnectionStart":177.39999961853027},{"duration":254.80000019073486,"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":177.5,"connectEnd":177.5,"connectStart":177.5,"domainLookupEnd":177.5,"domainLookupStart":177.5,"fetchStart":177.5,"redirectEnd":0,"redirectStart":0,"requestStart":177.5,"responseEnd":432.30000019073486,"responseStart":432.30000019073486,"secureConnectionStart":177.5},{"duration":255.10000038146973,"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":177.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":177.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":432.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":255,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":177.80000019073486,"connectEnd":177.80000019073486,"connectStart":177.80000019073486,"domainLookupEnd":177.80000019073486,"domainLookupStart":177.80000019073486,"fetchStart":177.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":177.80000019073486,"responseEnd":432.80000019073486,"responseStart":432.80000019073486,"secureConnectionStart":177.80000019073486},{"duration":255.30000019073486,"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":177.89999961853027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":177.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":433.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":255.19999980926514,"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":178,"connectEnd":178,"connectStart":178,"domainLookupEnd":178,"domainLookupStart":178,"fetchStart":178,"redirectEnd":0,"redirectStart":0,"requestStart":178,"responseEnd":433.19999980926514,"responseStart":433.19999980926514,"secureConnectionStart":178},{"duration":461.3999996185303,"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":183.5,"connectEnd":183.5,"connectStart":183.5,"domainLookupEnd":183.5,"domainLookupStart":183.5,"fetchStart":183.5,"redirectEnd":0,"redirectStart":0,"requestStart":183.5,"responseEnd":644.8999996185303,"responseStart":644.8999996185303,"secureConnectionStart":183.5},{"duration":508.5,"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":183.60000038146973,"connectEnd":183.60000038146973,"connectStart":183.60000038146973,"domainLookupEnd":183.60000038146973,"domainLookupStart":183.60000038146973,"fetchStart":183.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":183.60000038146973,"responseEnd":692.1000003814697,"responseStart":692.1000003814697,"secureConnectionStart":183.60000038146973},{"duration":166.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":478.8999996185303,"connectEnd":478.8999996185303,"connectStart":478.8999996185303,"domainLookupEnd":478.8999996185303,"domainLookupStart":478.8999996185303,"fetchStart":478.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":478.8999996185303,"responseEnd":645.3999996185303,"responseStart":645.3999996185303,"secureConnectionStart":478.8999996185303},{"duration":3.6999998092651367,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":692.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":692.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":696.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":221.89999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":693.3000001907349,"connectEnd":693.3000001907349,"connectStart":693.3000001907349,"domainLookupEnd":693.3000001907349,"domainLookupStart":693.3000001907349,"fetchStart":693.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":693.3000001907349,"responseEnd":915.1999998092651,"responseStart":915.1999998092651,"secureConnectionStart":693.3000001907349},{"duration":226.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":693.6999998092651,"connectEnd":693.6999998092651,"connectStart":693.6999998092651,"domainLookupEnd":693.6999998092651,"domainLookupStart":693.6999998092651,"fetchStart":693.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":693.6999998092651,"responseEnd":920,"responseStart":920,"secureConnectionStart":693.6999998092651}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":46,"responseStart":172,"responseEnd":180,"domLoading":175,"domInteractive":902,"domContentLoadedEventStart":902,"domContentLoadedEventEnd":947,"domComplete":1128,"loadEventStart":1128,"loadEventEnd":1129,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":882.5},{"name":"bigPipe.sidebar-id.end","time":883.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":883.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":884.6000003814697},{"name":"activityTabFullyLoaded","time":960.1000003814697}],"measures":[],"correlationId":"6f20f71f260392","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":69,"dbReadsTimeInMs":11,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
A branch with a crude patch implementing this:
https://github.com/MariaDB/server/tree/10.5-mdev21955
Benchmark results:
https://docs.google.com/spreadsheets/d/1Y7FDgbmhXFigrgLd9pbZnNqbj5PCaxu9a1ahUU_QFRQ/edit?usp=sharing