1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-16264 Use threadpool for Innodb background work.

Almost all threads have gone
- the "ticking" threads, that sleep a while then do some work)
(srv_monitor_thread, srv_error_monitor_thread, srv_master_thread)
were replaced with timers. Some timers are periodic,
e.g the "master" timer.

- The btr_defragment_thread is also replaced by a timer , which
reschedules it self when current defragment "item" needs throttling

- the buf_resize_thread and buf_dump_threads are substitutes with tasks
Ditto with page cleaner workers.

- purge workers threads are not tasks as well, and purge cleaner
coordinator is a combination of a task and timer.

- All AIO is outsourced to tpool, Innodb just calls thread_pool::submit_io()
and provides the callback.

- The srv_slot_t was removed, and innodb_debug_sync used in purge
is currently not working, and needs reimplementation.
This commit is contained in:
Vladislav Vaintroub
2019-10-29 22:37:12 +01:00
parent 00ee8d85c9
commit 5e62b6a5e0
47 changed files with 1152 additions and 5854 deletions

View File

@ -5,14 +5,5 @@ FROM performance_schema.threads
WHERE name LIKE 'thread/innodb/%'
GROUP BY name;
name type processlist_user processlist_host processlist_db processlist_command processlist_time processlist_state processlist_info parent_thread_id role instrumented
thread/innodb/io_ibuf_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/io_log_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/io_read_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/io_write_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/page_cleaner_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/srv_error_monitor_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/srv_lock_timeout_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/srv_master_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/srv_monitor_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/srv_purge_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
thread/innodb/thd_destructor_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL 1 NULL YES
thread/innodb/thread_pool_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES