mysql redo log _mysql8.0 source code introduction of lock-free redo log

mysql redo log _mysql8.0 source code introduction of lock-free redo log

InnoDB, like most storage engines, uses WAL to write data. All data is first written to the redolog, and then flushed from the bufferpool to the data page or when the backup is restored. Restoring from redolog to bufferpoll, and then flushing dirty data pages, it is very important for WAL to convert random writes into sequential writes. Therefore, in the era of mechanical disks, the performance of sequential writes is far greater than that of random writes. Make full use of It improves the performance of the disk. But it also brings a problem, that is, any write operation must be locked for access to ensure that the next write operation can only be performed after the previous write operation is completed. This is also implemented in the early versions of InnoDB, but With the increase of the number of CPU cores, such frequent locking will not be able to exert multi-core performance, so in InnoDB8.0 it has been changed to lock-free implementation. This is the official introduction: https://mysqlserverteam.com/mysql-8-0 -new-lock-free-scalable-wal-design Version 5.6 implementation There are two operations that need to obtain the global mutex, log_sys_t::mutex, log_sys_t::flush_order_mutex Each user connection has a thread. Before writing data, log_sys_t::mutex must be obtained…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索