Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the changes in the performance design of MYSQL 8

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces how MYSQL 8 changes in performance design, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.

The performance design of MYSQL 8 is a breakthrough in the history of MYSQL, and it is also a change from the underlying architecture. Maybe in the future, MYSQL is less and less like the original MYSQL. In the long run, MYSQL is going towards the direction of enterprise and Internet take-all. In fact, there is a gap between the design of MYSQL itself and other databases, such as the performance loss of doublewrite. And GAP on RR may actually be the object of complaint to users of some other databases.

From the point of view of the new design on MYSQL8, the design of REDO LOG (WAL) has changed, which is one of the reasons why we look forward to the sound of MYSQL8.

The design of the old MYQL is more and more, and the more complex the task, the more excellent the design of REDO LOG is.

In the new design, what is sudden is its concurrency, which is actually not easy in programming. What determines concurrency in the end? in programming, if it is serial, the solution is relatively simple, and it is not easy to make mistakes. However, as long as the design of concurrency is such a problem, there are a lot of questions to be considered. Whether the unrelated one can be carried out at the same time. Whether parallelism is acceptable to the current disk pressure, and so on, and how to maintain an order in parallelism. (personally, I think it's similar to the part of MTS.)

In multithreaded operations, a single thread has its own internal lock to guarantee the refresh order, but the difference from the previous design is that the LSN number is no longer used as a refresh order. But what needs to be considered is the overall order of checkpoint and flushing, because the ultimate goal of REDO LOG is to roll back at DATABASE CRASH, rollback must be in order.

The following figure is a (rough) explanation, above is the original MYSQL design, below is the MYSQL8 design, if from a time point of view, MYSQL8's redo refresh design is to save time (if the length represents time)

The final result is that a whole segment of dirty pages writes is no longer sequential, (the position of curly braces is unwritten data) there will be a log_closer thread to scan which segments are completed and update which are the largest LSN numbers that have been completed.

So much for sharing the changes in the performance design of MYSQL 8. I hope the above content can be of some help and learn more knowledge. If you think the article is good, you can share it for more people to see.

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report