0

Running Mongo 4.4.8 on Ubuntu Focal Docker with the following start up command:

mongod --keyFile /replica.key --replSet rs0 --oplogSize 991 --oplogMinRetentionHours 0.25 --wiredTigerCacheSizeGB 5 --auth --bind_ip_all

I'm getting a huge disk usage in local db. Taking a look at oplog stats:

use local
db.oplog.rs.stats()

Returns

{   
    "ns" : "local.oplog.rs",    
    "size" : 48619725634,   
    "count" : 86513,    
    "avgObjSize" : 561993,  
    "storageSize" : 56373166080,    
    "freeStorageSize" : 46175637504,    
    "capped" : true,    
    "max" : -1, 
    "maxSize" : 1039138816, 
    "sleepCount" : 0,   
    "sleepMS" : 0,  
    "wiredTiger" : {},  
    "nindexes" : 0, 
    "indexBuilds" : [ ],    
    "totalIndexSize" : 0,   
    "totalSize" : 56373166080,  
    "indexSizes" : {    
    },  
    "scaleFactor" : 1,  
    "ok" : 1,   
    "$clusterTime" : {  
        "clusterTime" : Timestamp(1644770996, 1),   
        "signature" : { 
            "hash" : BinData(0,"fLmCn+u2f3xZkYoNbbFGxgHkDWA="), 
            "keyId" : NumberLong("7010126229030305797") 
        }   
    },  
    "operationTime" : Timestamp(1644770996, 1)  
}

Which comes to about 48GB of size, out of 1GB of max size.

What could I have misconfigured?

1
  • 2
    Perhaps caused by --oplogMinRetentionHours 0.25. A mongod started with --oplogMinRetentionHours only removes an oplog entry if: The oplog has reached the maximum configured oplog size and The oplog entry is older than the configured number of hours. See Replication Options Feb 13 at 17:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.