How to Change Your Deployment’s Storage Engine with Automation



A killer feature of MongoDB 3.0 is the new WiredTiger storage engine. It improves performance for many different kinds of workloads and its compression helps reduce storage costs. Check out some of our benchmarking results and some information straight from our docs. MMS Automation makes it easier than ever to take your MMAPv1 data and convert it to WiredTiger.

How to Convert your Replica Set to WiredTiger

Here’s my deployment:


I’ve decided to convert my “newMmap” replica set to the WiredTiger storage engine. First I click on the wrench menu for my replica set to bring up the template modifying sidebar. I expand the “Advanced Options” pane, which presents me with the command line options this replica set is using:

Advanced options

Now I just click the “Add Option” button, and on the menu that comes up select “engine” which is under “storage”. Once the “engine” option is added, I can select “wiredTiger” and press “Apply”. Once successfully applied, I get the “Unpublished Changes” frame, click “Review and Deploy” and see the nature of my changes:

Changing storage engine

Once I confirm, the automation agent does the following:

  1. Connects to a secondary mongod process and shuts it down
  2. Empties its data directory (if there’s enough room, it makes a backup of the MMAPv1 files)
  3. Changes the config file for the process
  4. Starts the mongod process up and waits for it to resync
  5. Once the mongod process has completed its sync and is a healthy member of the replica set, it will start over at step 1 until all secondaries are done. Then it will do it once more with the primary, allowing the storage engine switch to lead to only one election.

By the way, this process would be the same with a sharded cluster, single member replica set, or even a standalone node. And if I wanted to be more conservative about it, I could have used the wrench for a single process to convert it alone to WiredTiger to see how it behaves before moving the entire replica set.

Once this is complete for all my nodes, I will see “Goal State”, and I can enjoy the benefits of WiredTiger without any downtime or ops work beyond a few mouse clicks.