Memory Requirement/Utilization for MongoDB, Riak and HyperTable (or HBase)

雨燕双飞 提交于 2020-01-04 19:47:07

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/7439952/memory-requirement-utilization-for-mongodb-riak-and-hypertable-or-hbase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!