Note that there are some explanatory texts on larger screens.

plurals
  1. POShould I increase the size of my MongoDB oplog file?
    text
    copied!<p>I understand that the oplog file will split multi updates into individual updates but what about batch inserts? Are those also split into individual inserts? </p> <p>If I have a write intensive collection with batches of ~20K docs being inserted roughly every 30 seconds, do I / should I consider increasing my oplog size beyond the default? I have a 3 member replica set and mongod is running on a 64 bit Ubuntu server install with the Mongodb data sitting on a 100GB volume.</p> <p>Here is some data which may or may not be helpful:</p> <pre><code> gs_rset:PRIMARY&gt; db.getReplicationInfo() { "logSizeMB" : 4591.3134765625, "usedMB" : 3434.63, "timeDiff" : 68064, "timeDiffHours" : 18.91, "tFirst" : "Wed Oct 24 2012 22:35:10 GMT+0000 (UTC)", "tLast" : "Thu Oct 25 2012 17:29:34 GMT+0000 (UTC)", "now" : "Fri Oct 26 2012 19:42:19 GMT+0000 (UTC)" } gs_rset:PRIMARY&gt; rs.status() { "set" : "gs_rset", "date" : ISODate("2012-10-26T19:44:00Z"), "myState" : 1, "members" : [ { "_id" : 0, "name" : "xxxx:27017", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "uptime" : 77531, "optime" : Timestamp(1351186174000, 1470), "optimeDate" : ISODate("2012-10-25T17:29:34Z"), "self" : true }, { "_id" : 1, "name" : "xxxx:27017", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 76112, "optime" : Timestamp(1351186174000, 1470), "optimeDate" : ISODate("2012-10-25T17:29:34Z"), "lastHeartbeat" : ISODate("2012-10-26T19:44:00Z"), "pingMs" : 1 }, { "_id" : 2, "name" : "xxxx:27017", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 61301, "optime" : Timestamp(1351186174000, 1470), "optimeDate" : ISODate("2012-10-25T17:29:34Z"), "lastHeartbeat" : ISODate("2012-10-26T19:43:59Z"), "pingMs" : 1 } ], "ok" : 1 } gs_rset:PRIMARY&gt; db.printCollectionStats() dev_fbinsights { "ns" : "dev_stats.dev_fbinsights", "count" : 6556181, "size" : 3117699832, "avgObjSize" : 475.53596095043747, "storageSize" : 3918532608, "numExtents" : 22, "nindexes" : 2, "lastExtentSize" : 1021419520, "paddingFactor" : 1, "systemFlags" : 0, "userFlags" : 0, "totalIndexSize" : 1150346848, "indexSizes" : { "_id_" : 212723168, "fbfanpage_id_1_date_1_data.id_1" : 937623680 }, "ok" : 1 } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload