Reputation: 33242
I would like to know if there is some "rule of thumb" to have an approximated formula that measure how much the storage file will take knowing the average size and the documents count, and how much this increase if I create one or more indexes for the documents.
Upvotes: 1
Views: 195
Reputation: 18595
There is but it would involve knowing what kind of indexes you specify and so forth. If you know the average document size and the resulting padding factor than you know your data size. Add index sizes (roughly the cumulative size of all values of all index fields plus ~20 bytes per document) and journaling files if enabled. Then round up to the nearest 2Gb (or up to the nearest 0.5Gb if --smallfiles option is enabled).
It's a lot easier to extrapolate if you have real-life data since storage space goes up pretty much linearly as you add more, roughly similar data.
Upvotes: 3