在Linode 512 VPS上运行MongoDB的可行性? [英] Feasability of running MongoDB on Linode 512 VPS?

查看:98
本文介绍了在Linode 512 VPS上运行MongoDB的可行性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了MongoDB文档,并附带有关32位系统的警告.特别是它们限制了Mongo的2 GB可用RAM.

I've read the MongoDB documentation, and it comes with a warning about 32-bit systems; particularly that they're capped at 2 GB of available RAM for Mongo.

因此,我想知道该语句对在低内存设置(例如Linode基于512mb RAM的VPS)中运行MongoDB是否有意义?我怀疑这很重要,但是有一个64位发行版供以后添加资源.

So I was wondering if that statement meant anything in regards in running MongoDB in a low memory setting like Linode's 512mb of RAM based VPS. I doubt it matters but with a 64-bit distro for later resource adding.

是否有任何警告或有人建议在MongoDB的VPS中选择最少的RAM?我知道项目需求会影响这一点,但我的意思是说,即使没有将MongoDB分解起来,该做的事情也是可笑的.

Any warnings or would someone recommend a minimum of a RAM to choose in a VPS for MongoDB? I know project requirements figure into this, but I mean minimum in the sense of what'd be laughable to do without for even spinning MongoDB up.

推荐答案

我在Linode 512& amp;中运行的一些小型生产站点上使用它.它几乎没有使用任何内存,只有大约5-6MB.我的数据集目前很小.

I use it on some small production sites which are running within my Linode 512 & it's using barely any memory, only a about 5 - 6MB. My dataset is very small for now.

MongoDB使用映射的内存存储引擎,这意味着它依靠OS系统缓存将常用数据保留在内存中.

MongoDB uses a mapped memory storage engine, which means it relies on the OS system cache to keep frequently used data in memory.

http://www.mongodb.org/display/DOCS/Caching

因此,除非您有一个庞大的数据集,否则Linode 512应该没问题.

So unless you have a huge dataset to start out with, a Linode 512 should be OK.

研究此事时,我有点担心的是MongoDB似乎在内存不足时崩溃,没有太多警告.也很难准确地确定将要使用的内存或磁盘空间与您拥有的数据量成正比.也没有办法以降低性能为代价来指定硬性限制.这可能是您可能要监视的东西.

The one thing I am a little concerned with when researching this is that MongoDB seems to crash when it runs out of memory, without much warning. It's also hard to pin down exactly how much memory or disk space it's going to use proportional to how much data you have. There also is no way to specify hard limits, at the cost of degraded performance. It's something you'll probably want to monitor.

您可以尝试使用--smallfiles --noprealloc选项运行MongoDB,因为这允许较小的数据库文件开始而不是预先分配它们,如果您的数据集很小,则可以节省磁盘空间.

You might try running MongoDB with the --smallfiles --noprealloc options, as this allows for smaller database files to start with and not preallocate them, saving disk space if you have a small dataset.

这是一个用户的体验:

http://groups.google.com/group/mongodb- user/browse_thread/thread/223810a749f0e1eb

不幸的是,如果他们有崩溃的原因,该线程没有解决,那将是很好的事情.

Unfortunately that thread was not resolved, would have been nice if they had a reason for the crash.

这也很好读:

http://groups.google.com/group/mongodb-user/browse_thread/thread/2646a52c4f41d832/d43f3ba7bbbbd63d

这篇关于在Linode 512 VPS上运行MongoDB的可行性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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