Why is an empty MongoDB database so big?
<p>When I create a new mongoDB database instance with the command</p>

<pre><code>mongod --dbpath db
</code></pre>

<p>where <code>db</code> is a folder I have made in the directory from which I call the command. After running this and checking the size of the directory, I see that is is over <strong>300MB</strong> in size - when there's no data in there.</p>

<p>What's going on here?</p>

<p>Thanks for any help!</p>

<hr>

<p><strong>EDIT</strong></p>

<p>Thanks to the people talking about the pre-allocated size for <code>journal</code>.</p>

<p>Here is a listing of files/folders in the database directory, sorted by order (there is a little bit of data in the database by now, but its size is neglible here):</p>

<pre><code>$du -ha | sort -n
4.0K    ./WiredTiger
4.0K    ./WiredTiger.lock
4.0K    ./WiredTiger.turtle
4.0K    ./WiredTigerLAS.wt
4.0K    ./mongod.lock
4.0K    ./storage.bson
8.0K    ./.DS_Store
8.0K    ./diagnostic.data/metrics.2016-06-10T11-07-50Z-00000
8.0K    ./diagnostic.data/metrics.interim
 16K    ./_mdb_catalog.wt
 16K    ./index-3-3697658674625742251.wt
 36K    ./collection-0-3697658674625742251.wt
 36K    ./index-1-3697658674625742251.wt
 36K    ./sizeStorer.wt
 44K    ./WiredTiger.wt
 60K    ./collection-2-3697658674625742251.wt
 72K    ./diagnostic.data/metrics.2016-06-10T10-19-31Z-00000
100M    ./journal/WiredTigerLog.0000000003
100M    ./journal/WiredTigerPreplog.0000000001
100M    ./journal/WiredTigerPreplog.0000000002
168K    ./diagnostic.data/metrics.2016-06-10T11-17-58Z-00000
256K    ./diagnostic.data
300M    ./journal
301M    .
</code></pre>

<p>As you can see, the journal directory is taking up almost all of the space.</p>