You can add following to the config file provided when running mongod --config mongod.conf
For MongoDB 3.x (latest version)
storage:
mmapv1:
smallFiles: true
For version 2.6+
storage:
smallFiles: true
For version 2.4 and less
smallfiles = true
Then just execute mongod to accept your config file (here it assumes that location of the config is /etc/mongodb.conf):
mongod -f /etc/mongodb.conf
Documentation for smallfiles parameter:
Set to true to modify MongoDB to use a smaller default data file size.
Specifically, smallfiles reduces the initial size for data files and
limits them to 512 megabytes. The smallfiles setting also reduces the
size of each journal files from 1 gigabyte to 128 megabytes.