Today I spent time configuring a mongoDB instance to use the wired tiger storage engine. This is the default in version 3.2 but has to be manually configured for prior versions. I found that the official documentation lists all the available options that can be specified, but does not show any useful YAML formatted examples of how the completed configuration file should look.
As such I though that this post would be useful for anyone else in a similar predicament.
To start, the storage.engine needs to be set to wiredTiger.
engine: "wiredTiger"
The other options we need to amend / update / include are:
cacheSizeGB - This value is a number and we should use the larger of either:
60% of RAM minus 1 GB, or 1 GB.
journalCompressor - The Default is snappy. The option is used to set the type
of compression which will be used to compress the WiredTiger journal data. Other
available compressors options are: none or zlib.
directoryForIndexes - The Default is false. This
option determines whether mongodb should stores indexes and collections
in separate sub-directories under the data directory.
blockCompressor - The Default is again snappy. This
option determines the default type of compression to use to compress
collection data. Other options are: none or zlib.
prefixCompression - The Default is true . This option enables or disables prefix compression for index data.
Links:
DBA Stack Exchange - Sample YAML Configuration Files for MongoDB