[MDEV-26828] Spinning on buf_pool.page_hash is wasting CPU cycles Created: 2021-10-14  Updated: 2021-10-22  Resolved: 2021-10-22

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.5, 10.6, 10.7
Fix Version/s: 10.6.5, 10.7.1

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: performance

Issue Links:
Blocks
blocks MDEV-26769 InnoDB internal latches do not suppor... Closed
Problem/Incident
is caused by MDEV-22871 Contention on the buf_pool.page_hash Closed

 Description   

This came up in MDEV-26769 and was also pointed out by krunalbauskar.

When I introduced a new type of rw-lock for buf_pool.page_hash in MDEV-22871, I thought that conflicts would be extremely rare and the critical sections very short. Therefore, only a spinloop was implemented. In 10.6, we could easily use an alternative that was introduced in MDEV-24167.

Only on systems for which we have not implemented a futex interface (see also MDEV-26476), we’d better keep the spinloop, because small size of the rw-lock is important.



 Comments   
Comment by Marko Mäkelä [ 2021-10-19 ]

Fixing this in 10.5 would require backporting some code like MDEV-24167 from 10.6.

Generated at Thu Feb 08 09:48:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.