mongodb内存不足时会发生什么? [英] What happens when mongodb is out of memory?

查看:449
本文介绍了mongodb内存不足时会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我的数据库具有20 GB的数据,只有2 GB的ram,交换功能已关闭.我能找到并插入数据吗?性能会有多差?

For example i have db with 20 GB of data and only 2 GB ram,swap is off. Will i be able to find and insert data? How bad perfomance would be?

推荐答案

最好在Google上进行搜索,但是许多消息来源说,当您的工作集超出RAM大小时,性能将大大下降.

it's best to google this, but many sources say that when your working set outgrows your RAM size the performance will drop significantly.

共享可能是一个有趣的选择,而不是添加更多的RAM.

Sharding might be an interesting option, rather than adding more RAM..

http://www.mongodb.org/display/DOCS /Checking +服务器+内存+使用情况

http://highscalability.com/blog/2011/9/13/must-see-5-steps-to-scaling-mongodb-or-any-db-in-8分钟.html

http://blog. boxedice.com/2010/12/13/mongodb-monitoring-keep-in-it-ram/

http://groups.google.com/group/mongodb -user/browse_thread/thread/37f80ff39258e6f4

当数据库大小大于RAM?

这意味着什么适合工作集"进入MongoDB的RAM?

您可能还想了解去年4square停机的情况:

You might also want to read-up on the 4square outage last year:

http://groups.google.com/group/mongodb -user/browse_thread/thread/528a94f287e9d77e

http://blog.foursquare. com/2010/10/05/so-that-was-a-bummer/

旁注:

您说交换已关闭" ...?为什么?在UNIX系统上,您应该始终有足够的交换空间!交换大小= 1 ... 2倍RAM大小是一个好主意.使用快速分区是一个好主意.如果您的UNIX系统RAM用完了并且没有Swap ..进程只是莫名其妙地死了,那真是一件很糟糕的事情.特别是在生产中.磁盘便宜!添加一个慷慨的交换分区! :-)

you said "swap is off" ... ? why? You should always have a sufficient swap space on a UNIX system! Swap-size = 1...2-times RAM size is a good idea. Using a fast partition is a good idea. Really bad things happen if your UNIX system runs out of RAM and doesn't have Swap .. processes just die inexplicably.. that is a bad very thing! especially in production. Disk is cheap! add a generous swap partition! :-)

这篇关于mongodb内存不足时会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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