title: MongoDB large index build very slow
body: <p>I have a collection with 400 million documents. Each has 6 DateTime, 1 Boolean, 8 Double, 9 Integer, and 6 String fields. I am trying to build the following index:</p>
  
  <pre><code>db.MyCollection.ensureIndex( 
      { "String1" : 1, "String2" : 1, "String3" : 1, "DateTime1" : 1, "Integer1" : 1, "DateTime2" : 1 }, 
      {background: true} 
  );
  </code></pre>
  
  <p>After running for 5 days it is only half done.</p>
  
  <p>The server is running Windows Server Enterprise and has 4TB disk space and 256GB RAM.  Very few other processes are running against the database.  No sharding or other special configuration.</p>
  
  <p>Is there any way to speed this up? (Without dropping the <code>background = true</code> qualifier, because I don't want it to completely shut me out of the database, which it does in that case.)</p>