MongoDB的数据库体系结构 [英] MongoDB database architecture

查看:195
本文介绍了MongoDB的数据库体系结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解更多关于MongoDB的系统和数据库架构。

I want to understand more about the system and DB architecture of MongoDB.

我想了解MongoDB的存储和检索的文件。如果这一切都在内存等。

I am trying to understand how MongoDB stores and retrieves the documents. If it's all in memory etc.

的MongoDB和Oracle之间的比较分析,将是一个奖金,但,我主要专注于理解MongoDB的建筑本身。

A comparative analysis between MongoDB and Oracle will be a bonus but, I am mostly focusing on understanding the MongoDB architecture per se.

任何指针会有所帮助。

推荐答案

的MongoDB的存储器映射数据库文件。它允许操作系统控制这个和RAM的最大金额分配给存储器映射。作为MongoDB的更新,并从它读取和写入到RAM的数据库中读取。对数据库中的文档中的所有指标都在RAM举行也。在RAM中的文件被刷新到磁盘每60秒。要在断电的情况下,prevent数据丢失,默认的是运行与日志接通。日志文件刷新到磁盘每100ms,如果有使用的功率损耗,使数据库恢复到一致状态。
与蒙戈一个重要的设计决定是对RAM的数量。你需要弄清楚你的工作集大小 - 也就是说,如果你将要阅读,并在数据库那么这个10%的工作集写入只有数据的最近的10%,并应在内存中保持最高性能。所以,如果你的工作集10GB你要neen 10GB的最大性能 - 否则为内存页是从磁盘分页到内存中查询/更新的运行速度会变慢。
MongoDB中的其他重要方面是备份和分片的比例复制。
有学习了很多伟大的在线资源。 MongoDB是免费的,开源的。

MongoDB memory maps the database files. It allows the OS to control this and allocate the maximum amount of RAM to the memory mapping. As MongoDB updates and reads from the DB it is reading and writing to RAM. All indexes on the documents in the database are held in RAM also. The files in RAM are flushed to disk every 60 seconds. To prevent data loss in the event of power failure, the default is to run with journaling switched on. The journal file is flushed to disk every 100ms and if there is power loss is used to bring the database back to a consistent state. An important design decision with mongo is on the amount of RAM. You need to figure out your working set size - i.e if you are going to be reading and writing to only the most recent 10% of your data in the database then this 10% is your working set and should be held in memory for maximum performance. So if your working set is 10GB you are going to neen 10GB for max performance - otherwise your queries/updates will run slower as pages of memory are paged from disk into memory. Other important aspects of mongoDB are replication for backups and sharding for scaling. There are a lot of great online resources for learning. MongoDB is free and opensource.

编辑:
这是检查出的教程是个好主意
http://www.mongodb.org/display/DOCS/Tutorial
和手动
http://www.mongodb.org/display/DOCS/Manual
和管理区是太有用
<一href=\"http://www.mongodb.org/display/DOCS/Admin+Zone\">http://www.mongodb.org/display/DOCS/Admin+Zone
如果你觉得无聊的读书那么presentations都值得一试。
http://www.10gen.com/$p$psentations

这篇关于MongoDB的数据库体系结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆