MongoDB usage is one of the first users to use MongoDB. Our online MongoDB version ranges from MongoDB1.8 to MongoDB2.0 to MongoDB2.2 and then MongoDB2.4. We have experienced problems that almost all users who use MongoDB may encounter, as the MongoDB version is updated, we can see the improvements made by MongoDB over the past few years. Recently with MongoDB
MongoDB usage is one of the first users to use MongoDB. Our online MongoDB versions are from MongoDB 1.8 to MongoDB 2.0 to MongoDB 2.2 and then to MongoDB 2.4, we have experienced problems that may occur to almost all users who use MongoDB. As the MongoDB version is updated, we can see the improvements made by MongoDB over the past few years. Recently with MongoDB
MongoDB usage
As one of the users who initially used MongoDB, our online MongoDB version ranges from MongoDB 1.8 to MongoDB 2.0 to MongoDB 2.2 and then to MongoDB 2.4. We have experienced problems that almost all users who use MongoDB may encounter, as the MongoDB version is updated, we can see the improvements made by MongoDB over the past few years.
With the release of MongoDB 2.6, there has been another popular (tu) tide (cao) at home and abroad. This time, we may not immediately upgrade or deploy a new MongoDB 2.6 version, but we will keep an eye on it.
We started TokuMX 2013 testing last year (1.0) in February. We have been observing TokuMX for more than half a year. In April February this year, I saw the first TokuMX version 1.4.0 during the migration in the production environment. Why is it 1.4.0? Because the previous versions are not perfect and not very friendly, and some bugs have not been solved.
Recently, important online systems have been migrated to TokuMX 1.4.1 (mainly using the tool of semi sync) and started to be used on a large scale. In addition, TokuMX is used by default for new online systems for no special reason.
Why migrate to TokuMX?
Although TokuMX claims many good features, the reason for our migration is as follows:
- Compression. The storage space consumption caused by the MongoDB BSON format is too large. Using TokuMX's default zlib compression can reduce a large amount of disk space (1/3-1/20 ).
- Better storage space utilization efficiency. Releasing MongoDB space is troublesome (you need to drop the entire database or repair). TokuMX drop collect or index can release the space.
- Better memory management. MongoDB nmap is simple, but it is not convenient to allocate fixed memory. Both caching and I/O are scheduled by the operating system. After a long time, large data volumes may cause memory leakage. TokuMX uses the parameter to specify the cacheSize to allocate a fixed size of memory (this is very suitable for multi-instance environments, although it is not recommended to use multiple instances ).
- Write optimization. This is the most basic and fundamental thing of TokuMX. The write speed remains unchanged when the data volume is large. MongoDB's write performance degrades significantly after more than 0.1 billion records or when the data volume is large, all of which is attributed to the 40-year B-tree index, it is also the place where TokuMX fragment tree indexes are optimized.
- Other features, such as document-level locks and transaction support, are not important to us. The actual results still require time tests.
TokuMX current cost or disadvantage
TokuMX solves a series of problems as soon as possible, but it is not a perfect solution.
- Increase O & M costs. Migration from MongoDB requires more learning and O & M costs, such as the emergence of new problems and the development and support of new O & M tools. From the enterprise point of view, this may not be so prominent if most of the domestic products do not have the original factory support.
- Query performance? Since compression affects query performance more or less, it does not affect query performance.
- Currently, some functions are not supported, such as geo indexes and full-text indexes.
Original article address: why should we migrate data from MongoDB to TokuMX? Thanks for sharing with the original author.