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

storageSize on secondary is much bigger than on primary

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.0.6
    • Component/s: None
    • Labels:
      None
    • ALL
      1. mongorestore one bigger collection into a replica set
      2. compare storageSize on primary with storageSize on secondary
    • Storage NYC 2019-05-06

      Hi,

      I restored one collection with mongorestore into a primary-secondary-arbiter (PSA) replicaset. The used disk space (storageSize) on the secondary is unusually big.

      • I would expect similar storage Sizes between nodes.
      • 4.0.6 storageSize is exteme.

       

      Data:

      version storageSize PRIMARY storageSize SECONDARY
      3.6.10 3784097792 5039255552
      4.0.6 3758616576 9119735808
      4.1.8 3813023744 5171081216

      Index (_id only):

      version totalIndexSize PRIMARY totalIndexSize SECONDARY
      3.6.10 505344000 501075968
      4.0.6 501493760 2110971904
      4.1.8 561000448 555438080

       

      I also tested with block_compressor=none on 4.0.6 and got similar results (much bigger files on secondary).

      Initial sync is apparently not affected, addind a new secondary node after the collection is already imported creates similarly sized files on the newly added node.

      Running .reIndex() on the secondary fixes the totalIndexSize to aproximately the same size as the index on primary, however the data storageSize remains - as expected - unaffected.

        1. 3.6.10-primary.json
          10 kB
        2. 3.6.10-secondary.json
          10 kB
        3. 4.0.6-2ndRun-primary.json
          10 kB
        4. 4.0.6-2ndRun-secondary.json
          10 kB
        5. 4.0.6-primary.json
          10 kB
        6. 4.0.6-secondary.json
          10 kB
        7. 4.1.8-primary.json
          10 kB
        8. 4.1.8-secondary.json
          10 kB
        9. configs.zip
          4 kB
        10. testing.tar.gz
          6.52 MB

            Assignee:
            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            Reporter:
            patrik.susko@gmail.com Patrik Susko
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: