In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
What is the question of Wiredtiger in MONGODB? in view of this question, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
There is also the concept of plug-in of the database engine similar to MYSQL in MongoDB. Although MYSQL is now aware of this database engine by ORACLE, in fact, the previous storage engine of MYSQL is rich and colorful, and so is the storage engine of MONGODB. At present, the main (official) database engine of MONGODB is WIREDTIGER, before MONGODB's official database engine is MMAP1, and in fact MONGODB also has a database engine foot ROCKS DB. I heard that it is good, at least on a par with WIRETIGER, or even slightly better.
Well, today we will mainly look at why WIREDTIGER is the main database engine of MONGODB at present, where it is, and what is the principle of the shallow layer.
You may see the picture, the traditional DBA will immediately be another reverse, cursors, a poor performance, slow, should be extinct word. In fact, in MONGODB, cursors does a lot of work to return results quickly. First of all, do not think about MONGODB with the traditional database thinking. The data result set returned by MONGODB is much larger than the traditional data result set. (the implication is that the amount of data processed by MONGODB is much larger than that of the traditional database. Using the traditional method, caching the result set in OUTPUT is obviously not a good way to deal with MONGODB.
OK, we're not doing too much entanglement here.
Like many databases, to improve the performance of the system is not to modify the data on the disk immediately, but to decide which data should be displayed and which data should be modified and refreshed through multi-version control, in which the MVCC activity of the traditional database is carried out through transactions and snapshots, and the data is given through CACHE.
At the same time, wiredtiger has the following advantages compared with mmvp1 engine
1 uses more CPU CORES and memory than traditional engines
2 insert lock-free logic, multi-thread will not block
(3) adopt higher compression ratio, reduce the use of Icano, and improve the performance of Icano.
4 put the b + TREE of the file into cache to speed up the reading of data
5. Hazard pointers is used to deal with the problem of dirty page, so the insertion lock-free logic is achieved.
Note: deletion requires a lock, so in MONGODB, deletion should be carefully considered how to handle it.
2 as the two log systems in WIREDTIGER, Journal and oplog, they are responsible for different tasks (if it is not clear what Journal & oplog is, please Baidu), then there is a question whether Journal and oplog are in the same physical order in recording logs.
The answer is that the oplog is in the same order as the actual operation while the Journal log is in the same order as the result of the operation. This is also due to the different primary responsibilities of the two in the function of the MONGODB database. One is responsible for the recovery of the system after crash, and naturally the result is ORDER, while OPLOG is responsible for REPL, so the order of operation is ORDER.
Finally, the high-speed insertion of mongodb is also related to the lSM used by wiredtiger. Find a time to study the principle of LSM, and you can better understand the secret of fast MONGODB insertion.
The answer to the question about Wiredtiger in MONGODB is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
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.