Disadvantages of switching mongo db --smallfiles

I want to use mongodb for my new project. The problem is that mongo uses pre-alocate files:

Each data file is pre-allocated to a specific size. (This is done to prevent fragmentation of the file system, among other reasons.) The first file name for the database: .0, then.1, etc..0 will be 64 MB, .1 128 MB, etc., Up to 2 GB When files reach 2 GB, each subsequent file is also 2 GB. Thus, if the last data file is present, say, 1 GB, this file can be 90% empty if it was recently created.

from here: http://www.mongodb.org/display/DOCS/Excessive+Disk+Space

And its normal to have many 2 GB files in which there is nothing. there is a switch -smallfiles to limit these files to 512 MB

- smallfiles => Use a smaller initial file size (16 MB) and a maximum size (512 MB)

I want to know that using smallfiles is good for production? and what are its flaws.

There is a noprealloc switch, but it is not very good at production. but there is no information about small files.

+5
source share
2 answers

Usually you use only small files, if you create a whole bunch of databases, if you work from only a few databases, this does not allow you to save enough.

- , DBS ( ). . , Mongo, , , - .

+6

, AWS m3.small SSD, 4 . mongodb SSD node.

+1

All Articles