Multi-threaded Linux programs (like Firefox or MySQL since 8.0.27 or so) usually set a name for each thread. This name will appear in the output of top and other utilities and would help to answer questions like "What thread uses most of CPU" etc.
Consider this example of MySQL 8.0.29:
openxs@ao756:~/dbs/8.0$ for task in $(ls /proc/$(pidof mysqld)/task/); do name=$(cat /proc/$(pidof mysqld)/task/${task}/comm); echo "TASK: ${task} (${name})"; done
TASK: 567049 (mysqld)
TASK: 567079 (ib_io_ibuf)
TASK: 567080 (ib_io_log)
TASK: 567081 (ib_io_rd-1)
TASK: 567082 (ib_io_rd-2)
TASK: 567083 (ib_io_rd-3)
TASK: 567084 (ib_io_rd-4)
TASK: 567085 (ib_io_wr-1)
TASK: 567086 (ib_io_wr-2)
TASK: 567087 (ib_io_wr-3)
TASK: 567088 (ib_io_wr-4)
TASK: 567089 (ib_pg_flush_co)
TASK: 567096 (ib_log_checkpt)
TASK: 567097 (ib_log_fl_notif)
TASK: 567098 (ib_log_flush)
TASK: 567099 (ib_log_wr_notif)
TASK: 567100 (ib_log_writer)
TASK: 567114 (ib_srv_lock_to)
TASK: 567115 (ib_srv_err_mon)
TASK: 567116 (ib_srv_mon)
TASK: 567117 (ib_buf_resize)
TASK: 567118 (ib_src_main)
TASK: 567119 (ib_dict_stats)
TASK: 567120 (ib_fts_opt)
TASK: 567122 (xpl_worker-1)
TASK: 567123 (xpl_worker-2)
TASK: 567124 (xpl_accept-1)
TASK: 567893 (ib_buf_dump)
TASK: 567894 (ib_clone_gtid)
TASK: 567895 (ib_srv_purge)
TASK: 567896 (ib_srv_wkr-1)
TASK: 567897 (ib_srv_wkr-2)
TASK: 567898 (ib_srv_wkr-3)
TASK: 567899 (evt_sched)
TASK: 567900 (sig_handler)
TASK: 567902 (xpl_accept-3)
TASK: 567903 (gtid_zip)
For MariaDB (10.6 here for example) we get:
openxs@ao756:~/dbs/maria10.6$ for task in $(ls /proc/$(pidof mariadbd)/task/); do name=$(cat /proc/$(pidof mariadbd)/task/${task}/comm); echo "TASK: ${task} (${name})"; done
Compared to MySQL, MariaDB has only few single purpose threads. There is timer thread, there is page cleaner thread, there is a main thread, that accepts connections, and nothing interesting otherwise. there can be a bunch of background threads, from a threadpool, that handle innodb background work, and a bunch of foreground threads, that handle user queries ( from thread pool or not). I'm wondering if you can gain much from such info
Vladislav Vaintroub
added a comment - Compared to MySQL, MariaDB has only few single purpose threads. There is timer thread, there is page cleaner thread, there is a main thread, that accepts connections, and nothing interesting otherwise. there can be a bunch of background threads, from a threadpool, that handle innodb background work, and a bunch of foreground threads, that handle user queries ( from thread pool or not). I'm wondering if you can gain much from such info
I'd really be happy to know if CPU is used by a specific foreground user thread, some of slave applier threads or some background InnoDB thread.
Valerii Kravchuk
added a comment - I'd really be happy to know if CPU is used by a specific foreground user thread, some of slave applier threads or some background InnoDB thread.
if (mysql_thread_create(key_thread_timer, &timer_thread, &thr_attr,
timer_handler, NULL))
so in mysql_thread_create() performance schema can use pthread_setname_np() or whatever for the return value of pthread_create(), setting the name for the new thread. And users will see the same name in ps and in select * from performance_schema.threads. Less confusion.
Sergei Golubchik
added a comment - May be, let's avoid multiplying entities without a necessity?
There's performance schema, it already has names for all threads. For example
static PSI_thread_info all_mysys_threads[]=
{
{ &key_thread_timer, "statement_timer" , PSI_FLAG_GLOBAL}
};
the thread is started as
if (mysql_thread_create(key_thread_timer, &timer_thread, &thr_attr,
timer_handler, NULL))
so in mysql_thread_create() performance schema can use pthread_setname_np() or whatever for the return value of pthread_create() , setting the name for the new thread. And users will see the same name in ps and in select * from performance_schema.threads . Less confusion.
You assume the name can be always set from outside. It can't, portably. On macOS, our supported platform, there is no thread handle or ID that you can use this pthread_setname_np() with.
It can make sense, to change thread name, sometimes. For example, if the connection id is 10, one might want, in debug version say, change name of the thread to conn_10. Makes it easier to find your connection
Not all threads are created with mysql_thread_create. There are some with std::thread.
There are some that are created by the OS-controlled threadpool , e.g on Windows where OS
takes over the thread lifecycle. I'd like to have a thread name nonetheless, to distinguish between connection thread pool and Innodb's background threads.
Thread names are for debugging and profiling, and that's it.
Vladislav Vaintroub
added a comment - - edited serg , this does not work.
You assume the name can be always set from outside. It can't, portably. On macOS, our supported platform, there is no thread handle or ID that you can use this pthread_setname_np() with.
It can make sense, to change thread name, sometimes. For example, if the connection id is 10, one might want, in debug version say, change name of the thread to conn_10. Makes it easier to find your connection
Not all threads are created with mysql_thread_create. There are some with std::thread.
There are some that are created by the OS-controlled threadpool , e.g on Windows where OS
takes over the thread lifecycle. I'd like to have a thread name nonetheless, to distinguish between connection thread pool and Innodb's background threads.
Thread names are for debugging and profiling, and that's it.
I thought another option could be to set the name inside the thread, but have a DBUG_ASSERT that it matches the name in perfschema. Then it'll still be "one entity" from the user point of view, even if we'll specify the name in two places (or one can #define STATEMENT_TIMER_THREAD_NAME and use it everywhere).
As for many threads with the same name, I thought it'd be useful to print them like, say, "statement_timer:1234" where "1234" is, ideally, the id in the performance_schema.threads.
The point is still to show not some arbitrary info but something that correlates with other information sources. For example, one can use ps to find the thread that takes 100% CPU and then use performance_schema to find out more.
Sergei Golubchik
added a comment - I thought another option could be to set the name inside the thread, but have a DBUG_ASSERT that it matches the name in perfschema. Then it'll still be "one entity" from the user point of view, even if we'll specify the name in two places (or one can #define STATEMENT_TIMER_THREAD_NAME and use it everywhere).
As for many threads with the same name, I thought it'd be useful to print them like, say, "statement_timer:1234" where "1234" is, ideally, the id in the performance_schema.threads .
The point is still to show not some arbitrary info but something that correlates with other information sources. For example, one can use ps to find the thread that takes 100% CPU and then use performance_schema to find out more.
serg I sort-of did this verification in the last patch. Not sure it is a good idea, and strictly speaking we can't have the very same entity from the user's point of view.
Because, Linux does not accept long names (where long is > 15 characters), one can't have thread names like "thread/innodb/page_cleaner", you can't even have names like 'innodb/page_cleaner'. Only names like 'page_cleaner' are possible, due to Linux limitations.
I thought a bit about many threads with the same name, I actually would prefer them to have the same name by default (unless maybe an option is set).
The profiler I use does a nice aggregation based on thread names, so I can figure out how much CPU foreground threads are using, and how much background ones, I'd rather not lose it. Besides, already some work was done to show OS thread id and what not in processlist and performance_schema.threads, this can help find thread during debugging
Vladislav Vaintroub
added a comment - - edited serg I sort-of did this verification in the last patch. Not sure it is a good idea, and strictly speaking we can't have the very same entity from the user's point of view.
Because, Linux does not accept long names (where long is > 15 characters), one can't have thread names like "thread/innodb/page_cleaner", you can't even have names like 'innodb/page_cleaner'. Only names like 'page_cleaner' are possible, due to Linux limitations.
I thought a bit about many threads with the same name, I actually would prefer them to have the same name by default (unless maybe an option is set).
The profiler I use does a nice aggregation based on thread names, so I can figure out how much CPU foreground threads are using, and how much background ones, I'd rather not lose it. Besides, already some work was done to show OS thread id and what not in processlist and performance_schema.threads, this can help find thread during debugging
Thanks. That explains why firefox names threads like
AudioIP~ver RPC
Backgro~ #51598
BgIOThr~ol #600
CanvasRenderer
Compositor
Cookie
DNS Res~r #1879
DNS Res~r #1882
DNS Res~r #1883
Agree about not appending numeric ids, not even for your profiler sake, but simply because the length is such a scarce resource, we shouldn't waste it on something that can be stored elsewhere, such a thread id.
Then what about — the same name as the last component of name in perfschema. Assert if such a last component is longer than 15 characters, it'll limit our imagination a bit, but I'm sure we'll manage.
PERFORMANCE_SCHEMA.THREADS has columns NAME and OS_THREAD_ID, they should match the values from
ps H -o tid,comm
("match" in the above sense. for tid it's "equal", for "comm" it's "last component of")
Sergei Golubchik
added a comment - Thanks. That explains why firefox names threads like
AudioIP~ver RPC
Backgro~ #51598
BgIOThr~ol #600
CanvasRenderer
Compositor
Cookie
DNS Res~r #1879
DNS Res~r #1882
DNS Res~r #1883
Agree about not appending numeric ids, not even for your profiler sake, but simply because the length is such a scarce resource, we shouldn't waste it on something that can be stored elsewhere, such a thread id.
Then what about — the same name as the last component of name in perfschema. Assert if such a last component is longer than 15 characters, it'll limit our imagination a bit, but I'm sure we'll manage.
PERFORMANCE_SCHEMA.THREADS has columns NAME and OS_THREAD_ID , they should match the values from
ps H -o tid,comm
("match" in the above sense. for tid it's "equal", for "comm" it's "last component of")
serg I would be happy to see current connection id in the thread name, if that's a connection thread, and if the worker is currently active or sleeping. Would really help navigating while debugging. That is, not necessary to have it in the release mode.
Nikita Malyavin
added a comment - serg I would be happy to see current connection id in the thread name, if that's a connection thread, and if the worker is currently active or sleeping. Would really help navigating while debugging. That is, not necessary to have it in the release mode.
lstartseva, I' giving that out to testing , alas I do not know what exactly to test, apart from starting debugger and looking up thread names in all-threads-stacktraces. Perhaps valerii can come up with a creative idea, it is his request after all
Vladislav Vaintroub
added a comment - lstartseva , I' giving that out to testing , alas I do not know what exactly to test, apart from starting debugger and looking up thread names in all-threads-stacktraces. Perhaps valerii can come up with a creative idea, it is his request after all
To check what thread names are set (if any) we can use something like that command in the initial description:
for task in $(ls /proc/$(pidof mariadbd)/task/); do name=$(cat /proc/$(pidof mariadbdd)/task/${task}/comm); echo "TASK: ${task} (${name})"; done
Valerii Kravchuk
added a comment - To check what thread names are set (if any) we can use something like that command in the initial description:
for task in $(ls /proc/$(pidof mariadbd)/task/); do name=$(cat /proc/$(pidof mariadbdd)/task/${task}/comm); echo "TASK: ${task} (${name})"; done
When I do that (also after fixing typo "mariadbdd"), I get
TASK: 241287 (mariadbd)
TASK: 241288 (statement_timer)
TASK: 241289 (checkpoint_bg)
TASK: 241290 (my_getevents)
TASK: 241291 (page_cleaner)
TASK: 241292 (ib_tpool_worker)
TASK: 241294 (manager)
TASK: 241296 (signal_handler)
TASK: 241339 (one_connection)
Is this good enough?
Vladislav Vaintroub
added a comment - When I do that (also after fixing typo "mariadbdd"), I get
TASK: 241287 (mariadbd)
TASK: 241288 (statement_timer)
TASK: 241289 (checkpoint_bg)
TASK: 241290 (my_getevents)
TASK: 241291 (page_cleaner)
TASK: 241292 (ib_tpool_worker)
TASK: 241294 (manager)
TASK: 241296 (signal_handler)
TASK: 241339 (one_connection)
Is this good enough?
For me the names are OK, but some of them are not that obvious:
TASK: 241294 (manager)
and I see comments that for these:
TASK: 241339 (one_connection)
connection_id would be also good to see in the name...
Valerii Kravchuk
added a comment - For me the names are OK, but some of them are not that obvious:
TASK: 241294 (manager)
and I see comments that for these:
TASK: 241339 (one_connection)
connection_id would be also good to see in the name...
You're not alone guessing about reason a "manager" exists, but it is its name in perfschema, so it should not be new for you. I also have no idea what it does and why it exists.
one_connection is also how it is called in perfschema. Actually, everything is like in performance schema, it was requested so by serg.
I'm not sure about connection_id in thread name, I would not like to have it like this. xperf on Windows aggregates by thread names, and I rather see aggregate than 4000 individual threads, whenever I run a benchmark. In a debugger you might want to see one thing, in profiler another thing.
UPD: "manager" is a single-threaded tpool, which is used exclusively by replication (as-if we do not have enough threadpool implementations)
Vladislav Vaintroub
added a comment - - edited You're not alone guessing about reason a "manager" exists, but it is its name in perfschema, so it should not be new for you. I also have no idea what it does and why it exists.
one_connection is also how it is called in perfschema. Actually, everything is like in performance schema, it was requested so by serg .
I'm not sure about connection_id in thread name, I would not like to have it like this. xperf on Windows aggregates by thread names, and I rather see aggregate than 4000 individual threads, whenever I run a benchmark. In a debugger you might want to see one thing, in profiler another thing.
UPD: "manager" is a single-threaded tpool, which is used exclusively by replication (as-if we do not have enough threadpool implementations)
Checked threads name with Valerii's script. Everything looks good.
About "one_connection" - in MySQL the same threads have the same name "connection", but the name "one_connection" looks a little strange because I didn't see "two_connection" or something like that.
Also checked threads name under Windows with Visual Studio. Some of them had correct names, some were generated by the system. But as far as I understand, this is a feature of the implementation for Windows, which creates some threads itself.By the way, in Windows the process name is still "mysql.exe". Maybe it's time to rename, wlad, serg?
I think that all the listed notes are not related to the implementation of this task, so this task can be pushed.
Lena Startseva
added a comment - Checked threads name with Valerii's script. Everything looks good.
About "one_connection" - in MySQL the same threads have the same name "connection", but the name "one_connection" looks a little strange because I didn't see "two_connection" or something like that.
Also checked threads name under Windows with Visual Studio. Some of them had correct names, some were generated by the system. But as far as I understand, this is a feature of the implementation for Windows, which creates some threads itself.By the way, in Windows the process name is still "mysql.exe". Maybe it's time to rename, wlad , serg ?
I think that all the listed notes are not related to the implementation of this task, so this task can be pushed.
About Windows threads that do not have "correct" names - those are the threads that did not run our code yet, or maybe never will.
When I just start the mysqld.exe, and set breakpoint in main(), there are already 2 threads created by default process threadpool, probably when loading shared libraries.
Vladislav Vaintroub
added a comment - - edited About Windows threads that do not have "correct" names - those are the threads that did not run our code yet, or maybe never will.
When I just start the mysqld.exe, and set breakpoint in main(), there are already 2 threads created by default process threadpool, probably when loading shared libraries.
There is some discussion about it in https://stackoverflow.com/questions/34822072/why-does-windows-10-start-extra-threads-in-my-program
About "one_connection" as thread name - unlike in MySQL, thread names are synchronized with performance schema, so it is just the result of this.
Vladislav Vaintroub
added a comment - About "one_connection" as thread name - unlike in MySQL, thread names are synchronized with performance schema, so it is just the result of this.
wladserg maybe later we can add a build-time option to add more details into a thread name, what'd you say?
Sometimes it's tricky to find a thread that executes your query. Okay in thread-per-connection mode it's fine, but in tpool you'll have to traverse all thread stacks to find one, if, say, you're just pausing the execution in gdb.
I solve this problem with parallel stacks in clion, it looks like this:
Yet I would definitely love to rely on such mouse-addicted interface less.
Nikita Malyavin
added a comment - wlad serg maybe later we can add a build-time option to add more details into a thread name, what'd you say?
Sometimes it's tricky to find a thread that executes your query. Okay in thread-per-connection mode it's fine, but in tpool you'll have to traverse all thread stacks to find one, if, say, you're just pausing the execution in gdb.
I solve this problem with parallel stacks in clion, it looks like this:
Yet I would definitely love to rely on such mouse-addicted interface less.
I solve this problem with Visual Studio, and others solve this problem with "SHOW PROCESSLIST", if they need an id. the os thread id is also there. Is thread-per-connection much better? How do you find your thread with 100 of threads?
Vladislav Vaintroub
added a comment - I solve this problem with Visual Studio, and others solve this problem with "SHOW PROCESSLIST", if they need an id. the os thread id is also there. Is thread-per-connection much better? How do you find your thread with 100 of threads?
@nikita, I would say, changing thread name twice per query (as in threadpool, to indicate thread ID, and to indicate "idle/waiting" state without THD) would be too expensive for optimized binary. For debug, it probably does not make any difference, so personally I would not care (but I did not care about thread names being perfschema-compatible in the first place, just did it on @serg's request)
Vladislav Vaintroub
added a comment - @nikita, I would say, changing thread name twice per query (as in threadpool, to indicate thread ID, and to indicate "idle/waiting" state without THD) would be too expensive for optimized binary. For debug, it probably does not make any difference, so personally I would not care (but I did not care about thread names being perfschema-compatible in the first place, just did it on @serg's request)
People
Vladislav Vaintroub
Valerii Kravchuk
Votes:
1Vote for this issue
Watchers:
7Start 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":989.1999998092651,"ttfb":230.59999990463257,"pageVisibility":"visible","entityId":125896,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"5199bbc2-b640-4347-a986-dc5293fa2af9","navigationType":0,"readyForUser":1076.6999998092651,"redirectCount":0,"resourceLoadedEnd":1137.0999999046326,"resourceLoadedStart":236,"resourceTiming":[{"duration":266.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":236,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":236,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":502.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":266.90000009536743,"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":236.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":236.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":503.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":276.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":236.40000009536743,"connectEnd":236.40000009536743,"connectStart":236.40000009536743,"domainLookupEnd":236.40000009536743,"domainLookupStart":236.40000009536743,"fetchStart":236.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":236.40000009536743,"responseEnd":512.6999998092651,"responseStart":512.6999998092651,"secureConnectionStart":236.40000009536743},{"duration":307.6000003814697,"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":236.69999980926514,"connectEnd":236.69999980926514,"connectStart":236.69999980926514,"domainLookupEnd":236.69999980926514,"domainLookupStart":236.69999980926514,"fetchStart":236.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":236.69999980926514,"responseEnd":544.3000001907349,"responseStart":544.1999998092651,"secureConnectionStart":236.69999980926514},{"duration":311.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":236.80000019073486,"connectEnd":236.80000019073486,"connectStart":236.80000019073486,"domainLookupEnd":236.80000019073486,"domainLookupStart":236.80000019073486,"fetchStart":236.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":236.80000019073486,"responseEnd":547.9000000953674,"responseStart":547.9000000953674,"secureConnectionStart":236.80000019073486},{"duration":311.40000009536743,"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":237,"connectEnd":237,"connectStart":237,"domainLookupEnd":237,"domainLookupStart":237,"fetchStart":237,"redirectEnd":0,"redirectStart":0,"requestStart":237,"responseEnd":548.4000000953674,"responseStart":548.4000000953674,"secureConnectionStart":237},{"duration":311.5,"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":237.19999980926514,"connectEnd":237.19999980926514,"connectStart":237.19999980926514,"domainLookupEnd":237.19999980926514,"domainLookupStart":237.19999980926514,"fetchStart":237.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":237.19999980926514,"responseEnd":548.6999998092651,"responseStart":548.6999998092651,"secureConnectionStart":237.19999980926514},{"duration":418.2999997138977,"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":237.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":655.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":311.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":237.5,"connectEnd":237.5,"connectStart":237.5,"domainLookupEnd":237.5,"domainLookupStart":237.5,"fetchStart":237.5,"redirectEnd":0,"redirectStart":0,"requestStart":237.5,"responseEnd":549.1999998092651,"responseStart":549.1999998092651,"secureConnectionStart":237.5},{"duration":418.09999990463257,"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":237.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":655.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":311.7999997138977,"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":237.90000009536743,"connectEnd":237.90000009536743,"connectStart":237.90000009536743,"domainLookupEnd":237.90000009536743,"domainLookupStart":237.90000009536743,"fetchStart":237.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":237.90000009536743,"responseEnd":549.6999998092651,"responseStart":549.6999998092651,"secureConnectionStart":237.90000009536743},{"duration":889.1000003814697,"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":247.69999980926514,"connectEnd":247.69999980926514,"connectStart":247.69999980926514,"domainLookupEnd":247.69999980926514,"domainLookupStart":247.69999980926514,"fetchStart":247.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":247.69999980926514,"responseEnd":1136.8000001907349,"responseStart":1136.8000001907349,"secureConnectionStart":247.69999980926514},{"duration":879.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":257.19999980926514,"connectEnd":257.19999980926514,"connectStart":257.19999980926514,"domainLookupEnd":257.19999980926514,"domainLookupStart":257.19999980926514,"fetchStart":257.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":257.19999980926514,"responseEnd":1137.0999999046326,"responseStart":1137.0999999046326,"secureConnectionStart":257.19999980926514},{"duration":80.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":667.9000000953674,"connectEnd":667.9000000953674,"connectStart":667.9000000953674,"domainLookupEnd":667.9000000953674,"domainLookupStart":667.9000000953674,"fetchStart":667.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":667.9000000953674,"responseEnd":748.8000001907349,"responseStart":748.8000001907349,"secureConnectionStart":667.9000000953674}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":22,"responseStart":230,"responseEnd":256,"domLoading":234,"domInteractive":1181,"domContentLoadedEventStart":1181,"domContentLoadedEventEnd":1244,"domComplete":1696,"loadEventStart":1696,"loadEventEnd":1697,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1142.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1143.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1143.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1150.5999999046326},{"name":"activityTabFullyLoaded","time":1275.1999998092651}],"measures":[],"correlationId":"61d76597857ec5","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":132,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Compared to MySQL, MariaDB has only few single purpose threads. There is timer thread, there is page cleaner thread, there is a main thread, that accepts connections, and nothing interesting otherwise. there can be a bunch of background threads, from a threadpool, that handle innodb background work, and a bunch of foreground threads, that handle user queries ( from thread pool or not). I'm wondering if you can gain much from such info