[SERVER-30164]  local.oplog.rs storageSize increase to 140G [mongo version 3.0.2] Created: 17/Jul/17  Updated: 27/Oct/23  Resolved: 18/Jul/17

Status: Closed
Project: Core Server
Component/s: Replication, Storage, WiredTiger
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: lijuan Assignee: Mark Agarunov
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

my mongo version is 3.0.2,wiredtiger engine; and "oplogSizeMB" set as 10240M, but my local.oplog.rs storageSize is 140G;and valid data only 10G

db.oplog.rs.stats()
{
        "ns" : "local.oplog.rs",
        "count" : 7416525,
        "size" : 10737295893,
        "avgObjSize" : 1447,
        "storageSize" : 149559255040,
        "capped" : true,
        "max" : -1,
        "maxSize" : NumberLong("10737418240"),
        "wiredTiger" : {
                "metadata" : {
                        "formatVersion" : 1,
                        "oplogKeyExtractionVersion" : 1
                },
                "creationString" : "allocation_size=4KB,app_metadata=(formatVersion=1,oplogKeyExtractionVersion=1),block_allocation=best,block_compressor=zlib,cache_resident=0,checkpoint=(WiredTigerCheckpoint.874489=(addr=\"01e40136055a81e419d8847fe4022d0326c0e5e4746768cde4022c1493c0ade4a53eb837808080e522d26cffc0e523898cafc0\",order=874489,time=1500253703,size=152631562240,write_gen=67446065)),checkpoint_lsn=(42287,71868672),checksum=uncompressed,collator=,columns=,dictionary=0,format=btree,huffman_key=,huffman_value=,id=9,internal_item_max=0,internal_key_max=0,internal_key_truncate=,internal_page_max=4KB,key_format=q,key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=32KB,leaf_value_max=1MB,memory_page_max=10m,os_cache_dirty_max=0,os_cache_max=0,prefix_compression=0,prefix_compression_min=4,split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90,value_format=u,version=(major=1,minor=1)",
                "type" : "file",
                "uri" : "statistics:table:local/collection/6--5846934347363493562",
                "LSM" : {
                        "bloom filters in the LSM tree" : 0,
                        "bloom filter false positives" : 0,
                        "bloom filter hits" : 0,
                        "bloom filter misses" : 0,
                        "bloom filter pages evicted from cache" : 0,
                        "bloom filter pages read into cache" : 0,
                        "total size of bloom filters" : 0,
                        "sleep for LSM checkpoint throttle" : 0,
                        "chunks in the LSM tree" : 0,
                        "highest merge generation in the LSM tree" : 0,
                        "queries that could have benefited from a Bloom filter that did not exist" : 0,
                        "sleep for LSM merge throttle" : 0
                },
                "block-manager" : {
                        "file allocation unit size" : 4096,
                        "blocks allocated" : 30903430,
                        "checkpoint size" : 152631562240,
                        "allocations requiring file extension" : 1296614,
                        "blocks freed" : 25543549,
                        "file magic number" : 120897,
                        "file major version number" : 1,
                        "minor version number" : 0,
                        "file bytes available for reuse" : 504307712,
                        "file size in bytes" : 149559255040
                },
                "btree" : {
                        "btree checkpoint generation" : 429555,
                        "column-store variable-size deleted values" : 0,
                        "column-store fixed-size leaf pages" : 0,
                        "column-store internal pages" : 0,
                        "column-store variable-size leaf pages" : 0,
                        "pages rewritten by compaction" : 0,
                        "number of key/value pairs" : 0,
                        "fixed-record size" : 0,
                        "maximum tree depth" : 4,
                        "maximum internal page key size" : 368,
                        "maximum internal page size" : 4096,
                        "maximum leaf page key size" : 3276,
                        "maximum leaf page size" : 32768,
                        "maximum leaf page value size" : 1048576,
                        "overflow pages" : 0,
                        "row-store internal pages" : 0,
                        "row-store leaf pages" : 0
                },
                "cache" : {
                        "bytes read into cache" : NumberLong("3850014232885"),
                        "bytes written from cache" : NumberLong("4027624357716"),
                        "checkpoint blocked page eviction" : 1161085,
                        "unmodified pages evicted" : 8215686,
                        "page split during eviction deepened the tree" : 0,
                        "modified pages evicted" : 22280545,
                        "data source pages selected for eviction unable to be evicted" : 26634717,
                        "hazard pointer blocked page eviction" : 22965569,
                        "internal pages evicted" : 218785,
                        "pages split during eviction" : 4128192,
                        "in-memory page splits" : 1445,
                        "overflow values cached in memory" : 0,
                        "pages read into cache" : 27243649,
                        "overflow pages read into cache" : 1183,
                        "pages written from cache" : 30084968
                },
                "compression" : {
                        "raw compression call failed, no additional data available" : 2034106,
                        "raw compression call failed, additional data available" : 210907,
                        "raw compression call succeeded" : 33617030,
                        "compressed pages read" : 26963420,
                        "compressed pages written" : 721249,
                        "page written failed to compress" : 2,
                        "page written was too small to compress" : 767398
                },
                "cursor" : {
                        "create calls" : 2499,
                        "insert calls" : 1319355924,
                        "bulk-loaded cursor-insert calls" : 0,
                        "cursor-insert key and value bytes inserted" : NumberLong("2862189380167"),
                        "next calls" : 2678675450,
                        "prev calls" : 57305,
                        "remove calls" : 28541616,
                        "cursor-remove key bytes removed" : 256874544,
                        "reset calls" : 1603760914,
                        "search calls" : 200610980,
                        "search near calls" : 57211446,
                        "update calls" : 0,
                        "cursor-update value bytes updated" : 0
                },
                "reconciliation" : {
                        "dictionary matches" : 0,
                        "internal page multi-block writes" : 236028,
                        "leaf page multi-block writes" : 4420086,
                        "maximum blocks required for a page" : 88,
                        "internal-page overflow keys" : 0,
                        "leaf-page overflow keys" : 0,
                        "overflow values written" : 431,
                        "pages deleted" : 9925972,
                        "page checksum matches" : 1968486,
                        "page reconciliation calls" : 25343235,
                        "page reconciliation calls for eviction" : 23052320,
                        "leaf page key bytes discarded using prefix compression" : 0,
                        "internal page key bytes discarded using suffix compression" : 0
                },
                "session" : {
                        "object compaction" : 0,
                        "open cursor count" : 2499
                },
                "transaction" : {
                        "update conflicts" : 0
                }
        },
        "nindexes" : 0,
        "totalIndexSize" : 0,
        "indexSizes" : {
 
        },
        "ok" : 1,
        "$gleStats" : {
                "lastOpTime" : Timestamp(0, 0),
                "electionId" : ObjectId("57e2f7739c87007ce802ce27")
        }
}
 
 



 Comments   
Comment by Mark Agarunov [ 18/Jul/17 ]

Hello lijuan,

Thank you for the report. The storageSize includes space that is allocated but not yet used due to the use of data extents, additionally as you are using WiredTiger, the data on disk is compressed. Therefore the storageSize metric is expected to be larger than the size metric.

Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group.

Thanks,
Mark

Generated at Thu Feb 08 04:22:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.