MongoDB上GridFS的最大大小是多少? [英] What's the maximum size for GridFS on MongoDB?

查看:95
本文介绍了MongoDB上GridFS的最大大小是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上我有一个非常简单的问题,但是我无法在MongoDB文档或使用Google中找到答案.

Basically I have a quite simple questions, but I was not able to find the answer in the MongoDB documentation or using Google.

我想知道的是,基于MongoDB的GridFS可能有多大的上限?

What I want to know is, whether there is a upper limit of how big a MongoDB based GridFS may become?

(我知道默认的最大文件大小是16 MB,并且可以使用GridFS来超过此限制.但是GridFS中所有文件的上限是多少?)

(I know that the default maximum file size is 16 MByte, and that you can exceed this limit by using GridFS. But what is the upper limit for all files in GridFS?)

推荐答案

MongoDB使用操作系统的映射IO作为存储引擎.如果实现细节没有其他限制,则理论上的最大值就是您的操作系统可以分配给mongod进程的虚拟内存量.在32位操作系统上,您将很快遇到此限制.例如,在Windows上,默认情况下,一半的地址空间是为操作系统保留的,因此您的mongod实例将停止接受大小约​​为2 Gb的写操作

MongoDB uses the operating system's mmapped IO as storage engine. The theoretical maximum, if there are no other limits imposed by implementation details, would be the amount of virtual memory your OS can assign to the mongod process. On a 32 bit OS, you will run into this limit very quickly. On windows for example, by default half the address space is reserved for the OS, so your mongod instance will stop accepting writes at a size of around 2 Gb

在64位OS上,此理论最大值要大得多-值得64位,如果我没有记错的话,其数量级为数百万兆字节.在达到此限制之前,您将达到另一个限制.

On a 64 bit OS, this theoretical maximum is quite a bit larger - 64 bits worth of it, in the order of millions of terabytes if I'm not mistaken. You will reach another limit before you reach this one.

从MongoDB 3.0开始,这可能不再成立.WiredTiger存储引擎以不同的方式工作.

This may no longer be true as of MongoDB 3.0. The WiredTiger storage engine works in a different way.

这篇关于MongoDB上GridFS的最大大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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