本文介绍了MongoDB,Riak和HyperTable(或HBase)的内存要求/使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经评估了大部分的NoSQL解决方案,并且似乎使用MongoDB,Riak和HyperTable(或HBase)的组合是最好的选择。



这些数据库运行起来的最低要求是什么?

假设我部署了这些数据库(MongoDB,Riak和HyperTable或HBase)以及Web服务器(如nginx或Cherokee)和Java / GlassFish-ALL,运行FreeBSD的32 GB内存的单机,它们将如何执行?请注意,通过采用这种方法,所有应用程序均可共享整个32 GB的RAM。对于Java / GlassFish和HBase,可以使用-Xmx0000m选项来限制它,但对于那些数据库,它们会自动使用整个内存?我知道MongoDB是内存映射 - 等等 - 所以当他们都在为内存而战时会发生什么? (我认为可以通过启动参数限制MongoDB,Riak和HyperTable的内存利用率,但是怎么做?)

另外,这是一种更好的方法来部署带有Solaris容器(或区域)的Solaris(或OpenIndiana)虚拟化来限制每个应用程序,例如为每个MongoDB,Riak和HyperTable / HBase区域分配4 GB?在这种方法中,所有的数据库本质上都只有4 GB的环境运行?所以,为了让它们正常工作,最小的舒适RAM是多少?

解决方案

我在生产中使用了mongodb和hbase,所以我可以评论这些。

Mongodb无法限制内存使用,它使用最大的内存。所以基本上,你对mongodb有更好的记忆。它总是一个好主意,把mongodb放在一个单独的机器上。



对于hbase来说,它并不那么简单,因为它包含了下层服务。服务是:namenode,datanode,zookeeper-server,hmaster,regionserver(如果你要使用mapreduce,你需要jobtracker和tasktraker)。 namenode,zookeeper-server和hmaster并不需要太多。但那么你需要一个好的io / ram余额来存放datanode和更好的内存区域服务器。将这些服务放在同一个盒子里不是一个好主意(即使它们是由于io需求而是虚拟的)。

最后但并非最不重要的是要小心掉期! swap对MongoDB和hbase都是敌人。


I've evaluated most of the NoSQL solutions and it seems that using a combination of MongoDB, Riak and HyperTable (or HBase) is the way to go.

What is the minimum requirement for these databases to run comfortably?

Let's say, if I deploy these databases (MongoDB, Riak and HyperTable - or HBase) - and Web Server (such as nginx or Cherokee) and Java/GlassFish - ALL on a single-machine running FreeBSD with 32 GB of RAM, how will they perform? Note that by going with this approach, the entire 32 GB of RAM is shared equally by all applications. For the case of Java/GlassFish and HBase it is possible to cap it using the "-Xmx0000m" option, but for those databases will they automatically use the entire memory? I understand that MongoDB is memory mapped - and so on - so what will happen when they are all fighting for memory? (I think it is possible to cap memory utilization for MongoDB, Riak and HyperTable via a startup parameter, but how?)

Alternatively, is it a better approach to deploy on Solaris (or OpenIndiana) with Solaris Containers (or "zones") virtualization to cap each application, such as assigning 4 GB to each MongoDB, Riak and HyperTable/HBase zone? In this approach, all the databases are essentially running with just 4 GB environment? So, in order for them to work properly, what is the minimum comfortable RAM?

解决方案

I used mongodb and hbase in production, so I can comment on those.

Mongodb doesn't have way to limit memory usage, it uses the maximum memory it can. So basicly, the more memory you have better for mongodb. And its always a good idea put mongodb on a separate machine.

For hbase issue its not as simple as that, since it consist of underlaying services. the services are : namenode, datanode, zookeeper-server, hmaster, regionserver (and if you are gonna use mapreduce you would need jobtracker and tasktraker). namenode, zookeeper-server and hmaster doesn't need too much. but then you would need a good io/ram balance for datanode and better ram for region server. It's never a good idea to put these services on the same box (not even if they are virtual due to io needs).

And last but not least beware of swap! swap is an enemy for both mongodb and hbase.

这篇关于MongoDB,Riak和HyperTable(或HBase)的内存要求/使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 00:17