oplog file size increase over the oplogSizeMB setting.

163 views
Skip to first unread message

Kanako Nakai

unread,
Oct 30, 2017, 10:31:58 PM10/30/17
to mongodb-user
I set 15GB to oplogSizeMB in mongod.conf and loaded 100GB data using ycsb. 
After data load, I checked oplog size increased 19GB.
I complete thought oplog size can not increase over the 15GB, but I got diffrent result.
Does anyone know reason why oplog size increase over the oplogSizeMB setting or Is this a bug?


------------------------------
mongod.conf
replication:
   oplogSizeMB: 15360  <--
   replSetName: Rpl01
   secondaryIndexPrefetch: all
   enableMajorityReadConcern: false


Rpl01:PRIMARY> rs.printReplicationInfo()
configured oplog size:   15360MB  <--
log length start to end: 65292secs (18.14hrs)
oplog first event time:  Mon Oct 30 2017 15:24:25 GMT+0900 (JST)
oplog last event time:   Tue Oct 31 2017 09:32:37 GMT+0900 (JST)
now:                     Tue Oct 31 2017 09:32:44 GMT+0900 (JST)


Rpl01:PRIMARY> db.getCollectionNames().forEach(function(n){print(n + "," + db[n].stats().storageSize/1024/1024/1024 + "GByte")})
me,0.0000152587890625GByte
oplog.rs,18.406475067138672GByte  <--
replset.election,0.000034332275390625GByte
replset.minvalid,0.000034332275390625GByte
startup_log,0.000034332275390625GByte
system.replset,0.000030517578125GByte

$ ls -la ./data/local
total 19G
drwxr-xr-x 2 mongodb mongodb 4.0K Oct 28 14:05 .
drwxr-xr-x 7 mongodb mongodb  276 Oct 31 09:25 ..
-rw-r--r-- 1 mongodb mongodb  36K Oct 30 18:40 collection-0--2786113240891747328.wt
-rw-r--r-- 1 mongodb mongodb  19G Oct 31 09:25 collection-12--2786113240891747328.wt  <--
-rw-r--r-- 1 mongodb mongodb  36K Oct 30 18:40 collection-20--2786113240891747328.wt
-rw-r--r-- 1 mongodb mongodb  16K Oct 30 18:39 collection-2--2786113240891747328.wt
-rw-r--r-- 1 mongodb mongodb  32K Oct 30 18:39 collection-4--2786113240891747328.wt
-rw-r--r-- 1 mongodb mongodb  36K Oct 30 18:40 collection-6--2786113240891747328.wt
-rw-r--r-- 1 mongodb mongodb  36K Oct 30 18:40 index-1--2786113240891747328.wt
-rw-r--r-- 1 mongodb mongodb  16K Oct 28 14:05 index-21--2786113240891747328.wt
-rw-r--r-- 1 mongodb mongodb  16K Oct 28 14:01 index-3--2786113240891747328.wt
-rw-r--r-- 1 mongodb mongodb  16K Oct 28 14:01 index-5--2786113240891747328.wt
-rw-r--r-- 1 mongodb mongodb  16K Oct 28 14:01 index-7--2786113240891747328.wt

Kevin Adistambha

unread,
Nov 7, 2017, 8:09:10 PM11/7/17
to mongodb-user

Hi

What is your MongoDB version? There was a similar issue that was fixed in MongoDB 3.0.8 (see SERVER-21553)

If your MongoDB version is newer than 3.0.8, do you observe further growth of the oplog as more documents are inserted, or is there an upper limit to the file size?

Best regards
Kevin

Reply all
Reply to author
Forward
0 new messages