MongoDB Documentation, Release 3.0.4 • For 32-bit systems, MongoDB allocates about 48 megabytes of space to the oplog. Workloads that Might Require a Larger Oplog Size Oplog Status Replica Set Data Synchronization Initial Sync If you can predict your replica set’s workload to resemble one of the following patterns, then you might want to create an oplog that is larger than the default. Conversely, if your application predominantly performs reads with a minimal amount of write operations, a smaller oplog may be sufficient. The following workloads might require a larger oplog size. Updates to Multiple Documents at Once The oplog must translate multi-updates into individual operations in order to maintain idempotency . This can use a great deal of oplog space without a corresponding increase in data size or disk use. Deletions Equal the Same Amount of Data as Inserts If you delete roughly the same amount of data as you insert, the database will not grow significantly in disk use, but the size of the operation log can be quite large. Significant Number of In-Place Updates If a significant portion of the workload is updates that do not increase the size of the documents, the database records a large number of operations but does not change the quantity of data on disk. To view oplog status, including the size and the time range of operations, issue the rs.printReplicationInfo() method. For more information on oplog status, see Check the Size of the Oplog (page 649). Under various exceptional situations, updates to a secondary’s oplog might lag behind the desired performance time. Use db.getReplicationInfo() from a secondary member and the replication status output to assess the current state of replication and determine if there is any unintended replication delay. See Replication Lag (page 647) for more information. In order to maintain up-to-date copies of the shared data set, members of a replica set sync or replicate data from other members. MongoDB uses two forms of data synchronization: initial sync (page 594) to populate new members with the full data set, and replication to apply ongoing changes to the entire data set. Initial sync copies all the data from one member of the replica set to another member. A member uses initial sync when the member has no data, such as when the member is new, or when the member has data but is missing a history of the set’s replication. When you perform an initial sync, MongoDB: 1. Clones all databases. To clone, the mongod queries every collection in each source database and inserts all data into its own copies of these collections. At this time, _id indexes are also built. The clone process only copies valid data, omitting invalid documents. Chapter 9. Replication 594