3
我在想MongoDB的內存消耗。我已閱讀了相應的手冊部分和其他有關該主題的問題,但我認爲這種情況有所不同。我可以問你的建議嗎?MongoDB:內存不足
這是從數據庫日誌文件中的錯誤:
Fri Oct 26 20:34:00 [conn1] ERROR: mmap private failed with out of memory. (64 bit build)
Fri Oct 26 20:34:00 [conn1] Assertion: 13636:file /docdata/mongodb/data/xxx_letters.5 open/create failed in createPrivateMap (look in log for more information)
這些數據文件:
total 4.0G
drwxr-xr-x 2 mongodb mongodb 4.0K 2012-10-26 20:21 journal
-rw------- 1 mongodb mongodb 64M 2012-10-25 19:34 xxx_letters.0
-rw------- 1 mongodb mongodb 128M 2012-10-20 22:10 xxx_letters.1
-rw------- 1 mongodb mongodb 256M 2012-10-24 09:10 xxx_letters.2
-rw------- 1 mongodb mongodb 512M 2012-10-26 10:04 xxx_letters.3
-rw------- 1 mongodb mongodb 1.0G 2012-10-26 19:56 xxx_letters.4
-rw------- 1 mongodb mongodb 2.0G 2012-10-03 11:32 xxx_letters.5
-rw------- 1 mongodb mongodb 16M 2012-10-26 19:56 xxx_letters.ns
這是free -tm
輸出:
total used free shared buffers cached
Mem: 3836 3804 31 0 65 2722
-/+ buffers/cache: 1016 2819
Swap: 4094 513 3581
Total: 7930 4317 3612
是它真的有必要擁有足夠的系統內存,以便最大的數據文件適合?爲什麼要擴大這些文件? (從上面顯示的序列中,我預計下一個文件是4GB。)我會嘗試擴展RAM,但數據最終會增長得更多。或者,也許這根本不是一個記憶問題?
我有一個64位的Linux系統,並使用64位的MongoDB 2.0.7-rc1。有足夠的磁盤空間,CPU負載爲0.0。這是uname -a
:
Linux xxx 2.6.32.54-0.3-default #1 SMP 2012-01-27 17:38:56 +0100 x86_64 x86_64 x86_64 GNU/Linux
這些是增加限制的命令:ulimit -v unlimited && ulimit -m unlimited –
不適用於我:p –