For a production sharded MongoDB installation we need 3 configuration servers. According to the documentation "the config server mongod process is fairly lightweight and can be ran on machines performing other work". However, in the default configuration, they all have journalling enabled, and with preallocation this takes up 3 GB of disk space. I assume that the actual data and transaction volume of a config server is quite small, so that this seems a bit too much.
Is there a way to (safely!) run these config servers with much less disk use for the journal? Do I need journalling at all on config servers? Can I set the journal size to be smaller?
Yes - there is a way to minimize the default size of the journal files, subject to a couple of caveats. From the MongoDB configuration documentation:
Here is the
smallfiles
config information:You can some members, of replication, use journaling and others not. [1]
You can set the jounral size to be smaller by using the command line "--smallfiles". [2]
You can start mongod with the --nojournal option, but I would be very certain about your config server backups.