Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-54713

Oplog compression ratio

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      We're running a mongodb 4.2  with zstd collection block compression. The oplog is set to oplogSizeMB: 3000000 MB, but the actual collection size is ~350GB. It's like 10X compression ration. According to https://source.wiredtiger.com/3.1.0/compression.html, the default compression ration for zstd is 3. What explains the big difference between the data size and total size of oplog collection?

       

      PRIMARY> db.getReplicationInfo()
      {
      	"logSizeMB" : 3000000,
      	"usedMB" : 2996131.66,
      	"timeDiff" : 123687,
      	"timeDiffHours" : 34.36,
      	"tFirst" : "Sun Feb 21 2021 01:55:32 GMT-0700 (MST)",
      	"tLast" : "Mon Feb 22 2021 12:16:59 GMT-0700 (MST)",
      	"now" : "Mon Feb 22 2021 12:16:59 GMT-0700 (MST)"
      }
       
      PRIMARY> db.oplog.rs.totalSize()
      379049607168
       
      PRIMARY> db.oplog.rs.dataSize()
      NumberLong("3118230005927") 

       

      Attachments

        Activity

          People

            eric.sedor@mongodb.com Eric Sedor
            bliu@llnw.com Bowen Liu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: