MongoDB allocates database fragments starting at 64 MB (dbname.0), followed by 128 MB (.1), 256, etc. up to 2 GB, then each file exits 2 GB from it.
If you use --smallfiles
in the --smallfiles
command-line options, file allocation starts at 16 MB instead of 64 MB, and the maximum value is 512 MB instead of 2 GB.
Combine this with --quotaFiles 1
, and your database cannot grow in one file, or ... 16 MB. I always use --quotaFiles
in conjunction with --quota
in help documents.
source share