title: Insert operation became very slow for MongoDB
body: <p>The client is pymongo. </p>
  
  <p>The program has been running for one week. It's indeed very fast to insert data before: about 10 million / 30 minutes. </p>
  
  <p>But today i found the insert operation became very very slow.</p>
  
  <p>There are about 120 million records in the goods collection now.</p>
  
  <pre><code>&gt; db.goods.count()
  
  123535156
  </code></pre>
  
  <p>And the indexs for goods collection is as following:</p>
  
  <blockquote>
    <p>db.goods.getIndexes();</p>
  </blockquote>
  
  <pre><code>[
          {
                  "v" : 1,
                  "key" : {
                          "_id" : 1
                  },
                  "ns" : "shop.goods",
                  "name" : "_id_"
          },
          {
                  "v" : 1,
                  "key" : {
                          "item_id" : 1,
                          "updated_at" : -1
                  },
                  "unique" : true,
                  "ns" : "shop.goods",
                  "name" : "item_id_1_updated_at_-1"
          },
          {
                  "v" : 1,
                  "key" : {
                          "updated_at" : 1
                  },
                  "ns" : "shop.goods",
                  "name" : "updated_at_1"
          },
          {
                  "v" : 1,
                  "key" : {
                          "item_id" : 1
                  },
                  "ns" : "shop.goods",
                  "name" : "item_id_1"
          }
  ]
  </code></pre>
  
  <p>And there is enough RAM and CPU.</p>
  
  <p>Someone told me because there are too many records. But didn't tell me how to solve this problem. I was a bit disappointed with the MongoDB. </p>
  
  <p>There will be more data needs to be stored in future(about 50 million new records per day). Is there any solution?</p>
  
  <p>Met same situation on another sever(Less data this time, total about 40 million), the current insert speed is about 5 records per second.</p>
  
  <pre><code>&gt; db.products.stats()
  {
          "ns" : "c2c.products",
          "count" : 42389635,
          "size" : 554721283200,
          "avgObjSize" : 13086.248164203349,
          "storageSize" : 560415723712,
          "numExtents" : 283,
          "nindexes" : 3,
          "lastExtentSize" : 2146426864,
          "paddingFactor" : 1.0000000000132128,
          "systemFlags" : 1,
          "userFlags" : 0,
          "totalIndexSize" : 4257185968,
          "indexSizes" : {
                  "_id_" : 1375325840,
                  "product_id_1" : 1687460992,
                  "created_at_1" : 1194399136
          },
          "ok" : 1
  }
  </code></pre>