You can set the storage.smallFiles configuration option to true. This will make the initial data and journal files smaller.
From the MongoDB docs:
The storage.smallFiles option reduces the initial size for data files
and limits the maximum size to 512 megabytes. storage.smallFiles also
reduces the size of each journal file from 1 gigabyte to 128
megabytes. Use storage.sma. lFiles if you have a large number of
databases that each holds a small quantity of data.
Depending on your workload, you can also change the record allocation strategy. The exact fit allocation will use less storage space than power of 2 (which is a default allocation strategy for v2.6+). But exact fit allocation is ideal only for collections without update and delete workloads.
Edit
For an empty database With a smallFiles option (let's call it db01), MongoDB will create two files in your dbpath that are 16MB large:
- db01.0 - file holding the data
- db01.ns - namespace file
As you add documents to your collection MongoDB will create additional files for the data with size: the next one will be 32MB (db01.1), one after that will be 64MB (db01.2) ... up to 512MB. So MongoDB will not preallocate e.g. 1GB for your database if you have only 50MB of data in the collection (if that's what you're worried about).
If you're only worried about the exceeding disk size (on a small SSD), you can also use storage.directoryPerDB. Each database will have it's own directory which you can link to an another disk.