In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Difficulties in group submission
one。 Brings unfairness to the leader process
two。 Taking into account the correspondence of redo and binlog order
three。 The writing process and fsync timing of transaction redo and binlog (without introducing the process when the group is committed)
four。 Why should the group submit? (disadvantages of simple group submission, inconsistent speed of hardware resources, advantages)
Key parameters and flush stage of process
Write Binlog to memory, (as if there is no Binlog buffer, write directly to memory, memory writes to stripe files).
How many seconds does binlog_max_flush_queue_time write Binlog to memory (officially). The amount of time that a batch of transactions wait in the flush phase. It is similar to using a Bodycheck card to block a certain number of people at a time at the ticket office. The default is 0, and this parameter has been discarded in the sync- > commit phase, mainly in sync,sync (flushing binlog). If the sync_binlog is not 1, multiple groups should be stuck here. Doesn't it cause commit ack to slow down? No, just speeding up.
Binlog_group_commit_sync_delay should be used to control the progress of leader, that is, the interval between departures. This is the main reason for the unfairness of leader. The unit is subtle. At a subtle level, the unfairness of leader seems negligible relative to the time it takes to refresh the disk.
The minimum number of binlog_group_commit_sync_no_delay_count departure seats is similar to that of a fixed-seat running water bus. When the number of people on board reaches a certain number, the bus will start directly, instead of waiting for a minimum departure interval of commit stage redo log buffer to swipe the plate.
The meaning of sync_binlog changes. Suppose it is set to 1000, which means that instead of doing fsync after 1000 transactions, it means 1000 transaction groups. The default of 1 is that 1 transaction group submits fsync Binlog once
That is, for example, for 1-1000 transactions, none of the first 999 transactions has sync, and sync succeeds by default. Perform a real binlog sync on the 1000th transaction. If the middle fails and the sync fails, then the binlog of 1-1000 transactions is not recorded.
The time of waiting for the first time may not be easy to understand, and it should be the first batch current restriction. For example, it is considered pre-grouped to ensure that the inflows into the sync phase are segmented by time, rather than discrete ones. Can not find a very suitable example to illustrate the summary
In the case that there is a big gap between the speed of reading and writing IO and memory, a single discrete write is merged into batch continuous writing. The seek time of the hard disk is much slower than the time it takes to write the hard disk sequentially. It is also a way of thinking to seek the way as little as possible.
Referenc
Ali monthly report 201501
Https://www.kancloud.cn/taobaomysql/monthly/67157
Official manual
Https://dev.mysql.com/doc/refman/5.7/en/replication-options-reference.html
Jiang Chengyao
"Innodb Storage engine P322"
Extended reading
Fb article on group submission release time: Thursday, October 7, 2010, 02:16
Https://www.facebook.com/notes/mysql-at-facebook/group-commit/438641125932/
Lack of energy
In fact, the source code is the most direct and has no energy.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.