Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.3.6-1, 10.4.0-1
Description
MySQL 8.0.0 split the InnoDB buf_pool_t::mutex. MariaDB should do something similar.
Instead of introducing more mutexes or radically changing the latching rules of various buf_pool_t and buf_block_t data members, I think that it is possible to reduce the contention on buf_pool.mutex by other means:
- Move more code to inline functions of buf_pool_t or buf_page_t.
- Reduce the amount of mutex release/reacquire dance in buf0flu.cc and buf0rea.cc.
- Avoid repeated calls to page_id_t::fold() or page_id_t::page_id_t(); use page_id_t directly as loop iterator.
- Move buf_page_t::flush_type to IORequest.
- Split buf_page_io_complete() into separate ‘read completion’ and ‘write completion’ callbacks.
- Avoid holding buf_pool.mutex during buf_pool.page_hash operations. Consider removing the debug field buf_page_t::in_page_hash.
- Split operations on buf_pool.watch[] into two parts. The allocation of buf_pool.watch[] should be only protected by buf_pool.mutex, and the buf_pool.page_hash only by the hash bucket latch.
Attachments
Issue Links
- blocks
-
MDEV-16526 Overhaul the InnoDB page flushing
-
- Closed
-
- causes
-
MDEV-22816 Assertion `node->space == fil_system.sys_space' failed in fil_aio_callback
-
- Closed
-
-
MDEV-23017 range query performance regression in 10.5.4
-
- Closed
-
-
MDEV-23229 Read of Uninitialized memory during buffer pool resizing
-
- Closed
-
-
MDEV-23399 10.5 performance regression with IO-bound tpcc
-
- Closed
-
-
MDEV-23410 buf_LRU_scan_and_free_block() fails to stop at first freed block
-
- Closed
-
-
MDEV-23807 Assertion n_pending_flushes failed in fil_node_t::prepare_to_close_or_detach()
-
- Closed
-
-
MDEV-23909 innodb_flush_neighbors=2 is treated like innodb_flush_neighbors=0
-
- Closed
-
-
MDEV-24054 Assertion `in_LRU_list' failed in buf_page_t::ready_for_flush
-
- Closed
-
-
MDEV-25776 Assertion `bpage->in_page_hash' in buf_pool_t::page_hash_get_low
-
- Closed
-
-
MDEV-29967 innodb_read_ahead_threshold (linear read-ahead) does not work
-
- Closed
-
-
MDEV-33332 SIGSEGV in buf_read_ahead_linear() when bpage is in buf_pool.watch
-
- Closed
-
-
MDEV-33591 MONITOR_INC_VALUE_CUMULATIVE is executed regardless of "if" condition
-
- Closed
-
- is duplicated by
-
MDEV-18724 Replace buf_block_t::mutex with more std::atomic
-
- Closed
-
- relates to
-
MDEV-15384 buf_flush_LRU_list_batch() always reports n->flushed=0, n->evicted=0
-
- Closed
-
-
MDEV-22850 Reduce buf_pool.page_hash latch contention
-
- Closed
-
-
MDEV-22862 compilation failure on centos74-aarch64
-
- Closed
-
-
MDEV-22871 Contention on the buf_pool.page_hash
-
- Closed
-
-
MDEV-23416 innodb.innodb_mutexes failed in buildbot with extra warning
-
- Closed
-
-
MDEV-23439 Assertion `size == space->size' failed in buf_read_ahead_random
-
- Closed
-
-
MDEV-24090 Optimize buf_page_optimistic_get()
-
- Open
-
-
MDEV-15016 multiple page cleaner threads use a lot of CPU on idle server
-
- Closed
-
-
MDEV-15058 Remove multiple InnoDB buffer pool instances
-
- Closed
-
-
MDEV-21330 Lock monitor doesn't print a semaphore's last reserved thread in non-debug builds and INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS is totally broken
-
- Closed
-
-
MDEV-22031 Assertion `bpage->in_page_hash' failed in buf_pool_watch_set upon normal upgrade from 10.1
-
- Closed
-
-
MDEV-25001 [buf0buf.cc] untimely crash v 10.4.14
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Link |
This issue relates to |
Assignee | Marko Mäkelä [ marko ] | Thirunarayanan B [ thiru ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Attachment | bug75534-2.patch [ 45258 ] |
Link |
This issue relates to |
Sprint | 10.3.6 [ 237 ] |
Sprint | 10.3.6-1 [ 237 ] | 10.3.6-1, 10.4.0-1 [ 237, 254 ] |
Rank | Ranked lower |
NRE Projects | RM_105_CANDIDATE |
Fix Version/s | 10.4 [ 22408 ] |
Link |
This issue blocks |
Link |
This issue relates to |
Link |
This issue blocks |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Assignee | Thirunarayanan Balathandayuthapani [ thiru ] | Vladislav Vaintroub [ wlad ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Fix Version/s | 10.5 [ 23123 ] |
Fix Version/s | 10.5 [ 23123 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Assignee | Vladislav Vaintroub [ wlad ] | Marko Mäkelä [ marko ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Link |
This issue blocks |
Link |
This issue relates to |
Link |
This issue relates to |
Description | [MySQL 8.0.0 split the InnoDB {{buf_pool_t::mutex}}|https://github.com/mysql/mysql-server/commit/2bcc00d11f21fe43ba3c0e0f81d3d9cec44c44a0]. MariaDB should do the same. |
[MySQL 8.0.0 split the InnoDB {{buf_pool_t::mutex}}|https://github.com/mysql/mysql-server/commit/2bcc00d11f21fe43ba3c0e0f81d3d9cec44c44a0]. MariaDB should do something similar.
Instead of introducing more mutexes or radically changing the latching rules of various {{buf_pool_t}} and {{buf_block_t}} data members, I think that it is possible to reduce the contention on {{buf_pool.mutex}} by other means: * Move more code to inline functions of {{buf_pool_t}} or {{buf_page_t}}. * Reduce the amount of mutex release/reacquire dance in {{buf0flu.cc}} and {{buf0rea.cc}}. * Avoid repeated calls to {{page_id_t::fold()}} or {{page_id_t::page_id_t()}}; use {{page_id_t}} directly as loop iterator. * Move {{buf_page_t::flush_type}} to {{IORequest}}. * Split {{buf_page_io_complete()}} into separate ‘read completion’ and ‘write completion’ callbacks. * Avoid holding {{buf_pool.mutex}} during {{buf_pool.page_hash}} operations. Consider removing the debug field {{buf_page_t::in_page_hash}}. * Split operations on {{buf_pool.watch[]}} into two parts. The allocation of {{buf_pool.watch[]}} should be only protected by {{buf_pool.mutex}}, and the {{buf_pool.page_hash}} only by the hash bucket latch. |
Summary | Split buf_pool_t::mutex | Reduce buf_pool_t::mutex contention |
Assignee | Marko Mäkelä [ marko ] | Eugene Kosov [ kevg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Link |
This issue relates to |
Assignee | Eugene Kosov [ kevg ] | Marko Mäkelä [ marko ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Link |
This issue is duplicated by |
issue.field.resolutiondate | 2020-06-05 09:40:41.0 | 2020-06-05 09:40:41.558 |
Fix Version/s | 10.5.4 [ 24264 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Link |
This issue causes |
Link |
This issue relates to |
Link |
This issue relates to |
Link |
This issue relates to |
Link |
This issue causes |
Link |
This issue causes |
Link |
This issue causes |
Link |
This issue relates to |
Link |
This issue relates to |
Link |
This issue causes |
Link |
This issue causes |
Link |
This issue causes |
Link |
This issue causes |
Link | This issue relates to MDEV-24090 [ MDEV-24090 ] |
Link |
This issue causes |
Workflow | MariaDB v3 [ 85114 ] | MariaDB v4 [ 133446 ] |
Link |
This issue causes |
Link |
This issue causes |
Link |
This issue causes |
Link |
This issue relates to |
This was originally contributed by kastauyra as MySQL Bug #75534: Solve buffer pool mutex contention by splitting it.