MongoDB Storage size scaling


I have a Java + MongoDB web application deployed on an OpenShift production medium gear, with no scaling enabled, with 11GB storage.

At the moment, I have some data stored, so MongoDB accurately reports a Data Size of 720.4K. This grows appropriately when I add new objects, everything is ok.

What I am concerned about is the reported Storage Size of 1.52M. Since this is a production gear, I am expecting that this allocated storage space will grow as needed (at the current rate of data production, I estimate the 1.52M limit will be reached in a few days). Is my expectation correct?

ETA: In the meantime, the Storage Size has increased to 2.02M, so I guess that answers my question.

Best Answer

You can more or less estimate that but you cannot be 100% sure.

A piece of advice I can give you is to change your storage engine to wiredTiger. I had 20.0GB of disk used by a mongodb instance using the MMAPv2 (which was the default storage engine before Mongodb 3.2). When I converted that to use wiredTiger my disk space dropped to unbelievable 1.9GB.

That might help you for a while.