In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains what are the advantages and disadvantages of mysql 5.7. the content of the explanation is simple and clear, and it is easy to learn and understand. please follow the editor's train of thought to study and learn what are the advantages and disadvantages of mysql 5.7.What are the advantages and disadvantages of it?
Principle
Innodb transparent page IO compression, using punch hole and data compression to achieve. It is a normal page in memory and is compressed only when it is written to disk. Call the function os_file_io_complete for punch hole operation. Os_file_io_complete calls the fallocate () operating system function and uses the FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE tag to reclaim the free block of the page on disk. The specific method is to first write the compressed content to the disk. At this time, the page on the disk is still 16K. After the writing is completed, call the fallocate function to recover the idle block in the disk page. The block is measured in system block_size.
Advantages
1. It is easy to manage in memory. There are only normal pages and there are no compressed pages.
2. More simple and flexible use of compression algorithm
3. The code can be compressed for various types of pages
Shortcoming
Quote the contents of Taobao Database Kernel monthly report:
Unable to compress perfectly: for example, data from 9KB may need to be stored by 12kb, depending on block size
Unable to compress Buffer pool, compared with traditional innodb compression, the previous compression method can only store compressed page copies in memory (however, there may also be both compressed and unzipped pages), so users may need to buy devices with higher iops, and oracle happens to sell these. .
The file may be fragmented by punch hole, and the underlying file management is more complex.
The possible consequence of punch hole innodb files is that the page of each file becomes a separate segment, and the file system needs to be managed by separate journal and metadata. There may also be performance problems: it can be five times more expensive than non-sparse writes (depending on the specific kernel)
Deleting a data file with millions of segment management objects can be very expensive.
Mariadb
Only two compression algorithms are supported in mysql's innodb, while zlib, lz4, lzo, lzma, bzip2, snappy and other five algorithms are supported in mariadb's XTRADB. In addition to zlib, lz4, the other need to download the code to compile and install.
Thank you for your reading, the above is the content of "what are the advantages and disadvantages of mysql 5.7". After the study of this article, I believe you have a deeper understanding of what are the advantages and disadvantages of mysql 5.7. the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.