Marko Mäkelä
5155a300fa
MDEV-22871: Reduce InnoDB buf_pool.page_hash contention
...
The rw_lock_s_lock() calls for the buf_pool.page_hash became a
clear bottleneck after MDEV-15053 reduced the contention on
buf_pool.mutex. We will replace that use of rw_lock_t with a
special implementation that is optimized for memory bus traffic.
The hash_table_locks instrumentation will be removed.
buf_pool_t::page_hash: Use a special implementation whose API is
compatible with hash_table_t, and store the custom rw-locks
directly in buf_pool.page_hash.array, intentionally sharing
cache lines with the hash table pointers.
rw_lock: A low-level rw-lock implementation based on std::atomic<uint32_t>
where read_trylock() becomes a simple fetch_add(1).
buf_pool_t::page_hash_latch: The special of rw_lock for the page_hash.
buf_pool_t::page_hash_latch::read_lock(): Assert that buf_pool.mutex
is not being held by the caller.
buf_pool_t::page_hash_latch::write_lock() may be called while not holding
buf_pool.mutex. buf_pool_t::watch_set() is such a caller.
buf_pool_t::page_hash_latch::read_lock_wait(),
page_hash_latch::write_lock_wait(): The spin loops.
These will obey the global parameters innodb_sync_spin_loops and
innodb_sync_spin_wait_delay.
buf_pool_t::freed_page_hash: A singly linked list of copies of
buf_pool.page_hash that ever existed. The fact that we never
free any buf_pool.page_hash.array guarantees that all
page_hash_latch that ever existed will remain valid until shutdown.
buf_pool_t::resize_hash(): Replaces buf_pool_resize_hash().
Prepend a shallow copy of the old page_hash to freed_page_hash.
buf_pool_t::page_hash_table::n_cells: Declare as Atomic_relaxed.
buf_pool_t::page_hash_table::lock(): Explain what prevents a
race condition with buf_pool_t::resize_hash().
2020-06-18 14:16:01 +03:00
..
2020-03-10 19:24:22 +01:00
2020-03-14 09:51:36 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2017-02-10 06:30:42 -05:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2017-02-10 06:30:42 -05:00
2016-10-05 01:11:08 +03:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-02-05 17:22:26 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2014-05-06 23:20:50 +02:00
2016-10-05 01:11:08 +03:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2016-10-05 01:11:08 +03:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2016-10-05 01:11:08 +03:00
2014-05-06 23:20:50 +02:00
2016-10-05 01:11:08 +03:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2016-10-05 01:11:08 +03:00
2016-10-05 01:11:08 +03:00
2016-10-05 01:11:08 +03:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2016-10-05 01:11:08 +03:00
2016-10-05 01:11:08 +03:00
2014-05-06 23:20:50 +02:00
2016-10-05 01:11:08 +03:00
2016-10-05 01:11:08 +03:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2016-10-05 01:11:08 +03:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2015-08-03 13:05:40 +02:00
2020-03-10 19:24:23 +01:00
2015-05-07 20:45:46 +04:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-14 09:51:36 +01:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2020-03-14 09:51:36 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2016-10-05 01:11:08 +03:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-05-23 12:29:10 +03:00
2020-05-23 12:29:10 +03:00
2020-05-23 12:29:10 +03:00
2020-05-23 12:29:10 +03:00
2020-05-23 12:29:10 +03:00
2020-05-23 12:29:10 +03:00
2020-05-23 12:29:10 +03:00
2020-05-23 12:29:10 +03:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-06-13 21:22:07 +02:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-04-08 06:09:42 +00:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-04-08 06:09:42 +00:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-14 09:51:36 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-14 09:51:36 +01:00
2014-06-05 09:03:55 +02:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2018-05-26 12:49:25 +03:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-14 09:51:36 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-05-09 20:43:36 +02:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 23:49:47 +04:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-14 09:51:36 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2018-07-04 19:13:55 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-14 09:51:36 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2020-03-14 09:51:36 +01:00
2014-05-06 23:20:50 +02:00
2016-03-31 10:11:16 +04:00
2020-03-14 09:51:36 +01:00
2020-03-10 19:24:22 +01:00
2020-03-14 09:51:36 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2017-05-16 13:53:15 +03:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-04-19 17:33:51 +03:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2014-05-06 23:22:16 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-11 08:29:48 +02:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-16 10:33:38 +01:00
2020-03-23 10:45:08 +01:00
2020-03-10 19:24:23 +01:00
2020-06-18 14:16:01 +03:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-14 09:51:36 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00
2014-05-06 23:20:50 +02:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:22 +01:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:22 +01:00
2020-05-23 12:29:10 +03:00
2020-03-14 09:51:36 +01:00
2020-03-10 19:24:23 +01:00
2015-08-03 13:05:40 +02:00
2020-03-10 19:24:23 +01:00
2020-03-10 19:24:23 +01:00