Type:
Task
Priority:
Critical
Resolution:
Fixed
Component/s:
None
Per-thread memory usage statistics
Base code and idea from comes from
http://mysql.taobao.org/index.php/Patch_source_code#per-thread_memory_usage_statistics .
User visiable changes:
information_schema.processlist has a new columns: MEMORY_USAGE
SHOW STATUS has a new variable: Memory_used.
The idea is that we mark all memory that are thread specific with MY_THREAD_SPECIFIC.
Memory counting is done per thread in the my_malloc_size_cb_func callback function from my_malloc().
The following changes in interfaces was needed to get this to work:
init_alloc_root() amd init_sql_alloc() has extra option so that one can mark memory with MY_THREAD_SPECIFIC
One now have to use alloc_root_set_min_malloc() to set min memory to be allocated by alloc_root()
my_init_dynamic_array() has extra option so that one can mark memory with MY_THREAD_SPECIFIC
my_net_init() has extra option so that one can mark memory with MY_THREAD_SPECIFIC
Added flag for hash_init() so that one can mark hash table to be thread specific.
Added flags to init_tree() so that one can mark tree to be thread specific.
Added flag to Warning_info::Warning_info() if the structure should be fully initialized.
String elements can now be marked as thread specific.
Other things:
Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
{"report":{"fcp":865.5999999940395,"ttfb":212.79999999701977,"pageVisibility":"visible","entityId":22486,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"904b94ef-ecfa-4052-a3c0-aeb0e2015c5a","navigationType":0,"readyForUser":938.5999999940395,"redirectCount":0,"resourceLoadedEnd":967.5999999940395,"resourceLoadedStart":218.29999999701977,"resourceTiming":[{"duration":31,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":218.29999999701977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":218.29999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":249.29999999701977,"responseStart":0,"secureConnectionStart":0},{"duration":31.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":218.59999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":218.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":250.09999999403954,"responseStart":0,"secureConnectionStart":0},{"duration":121.90000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":218.79999999701977,"connectEnd":218.79999999701977,"connectStart":218.79999999701977,"domainLookupEnd":218.79999999701977,"domainLookupStart":218.79999999701977,"fetchStart":218.79999999701977,"redirectEnd":0,"redirectStart":0,"requestStart":218.79999999701977,"responseEnd":340.70000000298023,"responseStart":340.70000000298023,"secureConnectionStart":218.79999999701977},{"duration":240.70000000298023,"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":219,"connectEnd":219,"connectStart":219,"domainLookupEnd":219,"domainLookupStart":219,"fetchStart":219,"redirectEnd":0,"redirectStart":0,"requestStart":219,"responseEnd":459.70000000298023,"responseStart":459.70000000298023,"secureConnectionStart":219},{"duration":244.5,"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":219.20000000298023,"connectEnd":219.20000000298023,"connectStart":219.20000000298023,"domainLookupEnd":219.20000000298023,"domainLookupStart":219.20000000298023,"fetchStart":219.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":219.20000000298023,"responseEnd":463.70000000298023,"responseStart":463.70000000298023,"secureConnectionStart":219.20000000298023},{"duration":244.79999999701977,"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":219.40000000596046,"connectEnd":219.40000000596046,"connectStart":219.40000000596046,"domainLookupEnd":219.40000000596046,"domainLookupStart":219.40000000596046,"fetchStart":219.40000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":219.40000000596046,"responseEnd":464.20000000298023,"responseStart":464.09999999403954,"secureConnectionStart":219.40000000596046},{"duration":245,"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":219.5,"connectEnd":219.5,"connectStart":219.5,"domainLookupEnd":219.5,"domainLookupStart":219.5,"fetchStart":219.5,"redirectEnd":0,"redirectStart":0,"requestStart":219.5,"responseEnd":464.5,"responseStart":464.5,"secureConnectionStart":219.5},{"duration":267.29999999701977,"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":219.70000000298023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":219.70000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":487,"responseStart":0,"secureConnectionStart":0},{"duration":245.19999998807907,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":219.90000000596046,"connectEnd":219.90000000596046,"connectStart":219.90000000596046,"domainLookupEnd":219.90000000596046,"domainLookupStart":219.90000000596046,"fetchStart":219.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":219.90000000596046,"responseEnd":465.09999999403954,"responseStart":465.09999999403954,"secureConnectionStart":219.90000000596046},{"duration":267.20000000298023,"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":220,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":220,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":487.20000000298023,"responseStart":0,"secureConnectionStart":0},{"duration":245.5,"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":220.20000000298023,"connectEnd":220.20000000298023,"connectStart":220.20000000298023,"domainLookupEnd":220.20000000298023,"domainLookupStart":220.20000000298023,"fetchStart":220.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":220.20000000298023,"responseEnd":465.70000000298023,"responseStart":465.70000000298023,"secureConnectionStart":220.20000000298023},{"duration":389.90000000596046,"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":221.09999999403954,"connectEnd":221.09999999403954,"connectStart":221.09999999403954,"domainLookupEnd":221.09999999403954,"domainLookupStart":221.09999999403954,"fetchStart":221.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":221.09999999403954,"responseEnd":611,"responseStart":611,"secureConnectionStart":221.09999999403954},{"duration":667,"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":221.20000000298023,"connectEnd":221.20000000298023,"connectStart":221.20000000298023,"domainLookupEnd":221.20000000298023,"domainLookupStart":221.20000000298023,"fetchStart":221.20000000298023,"redirectEnd":0,"redirectStart":0,"requestStart":221.20000000298023,"responseEnd":888.2000000029802,"responseStart":888.2000000029802,"secureConnectionStart":221.20000000298023},{"duration":112.79999999701977,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":498.5,"connectEnd":498.5,"connectStart":498.5,"domainLookupEnd":498.5,"domainLookupStart":498.5,"fetchStart":498.5,"redirectEnd":0,"redirectStart":0,"requestStart":498.5,"responseEnd":611.2999999970198,"responseStart":611.2999999970198,"secureConnectionStart":498.5},{"duration":202.09999999403954,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/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":765.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":765.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":967.5999999940395,"responseStart":0,"secureConnectionStart":0},{"duration":281.40000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/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":766.5,"connectEnd":766.5,"connectStart":766.5,"domainLookupEnd":766.5,"domainLookupStart":766.5,"fetchStart":766.5,"redirectEnd":0,"redirectStart":0,"requestStart":766.5,"responseEnd":1047.9000000059605,"responseStart":1047.9000000059605,"secureConnectionStart":766.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":60,"responseStart":212,"responseEnd":216,"domLoading":216,"domInteractive":994,"domContentLoadedEventStart":994,"domContentLoadedEventEnd":1037,"domComplete":1819,"loadEventStart":1819,"loadEventEnd":1820,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":981.7000000029802},{"name":"bigPipe.sidebar-id.end","time":982.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":982.5999999940395},{"name":"bigPipe.activity-panel-pipe-id.end","time":983.5},{"name":"activityTabFullyLoaded","time":1056.7000000029802}],"measures":[],"correlationId":"3d9f6c6daeebb5","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":98,"dbReadsTimeInMs":14,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
pushed in 10.0-base