Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-4

Recipe for pre-allocation of oplog produces inefficiency

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Last comment by Customer:
      true

      Description

      The manual page titled "Halted Replication" gives directions to manually pre-allocate the oplog files using a shell script. In my experience, following these directions produces 2GB of wasted space.

      I used the script to produce 13 2GB files, then started mongod using --oplogSize 26000, but then mongod created another 2GB file, consuming 28GB for a 26GB oplog.

      It would be nice if the recipe could be updated to correctly pre-generate the oplog files as mongodb would do if it generated them itself. Even better would be to add a feature to mongod to generate files for an empty oplog. e.g. mongod --generateOplogOnly --master --oplogSize 26000 --dbpath /data/prealloc would generate the files and then just exit. It may be possible to do this now (by leaving off generateOplogOnly), but my worry is that the generated files may have metadata in them (in particular the oplog.$main collection) which doesn't match the recommended procedure in the docs.

      Ultimately, the docs should reflect a procedure that allows for offline generation but ultimately produces the same outcome as if the server had been started with no oplog.

        Attachments

          Activity

            People

            Assignee:
            kristina Kristina Chodorow (Inactive)
            Reporter:
            jason.coombs@yougov.com Jason R. Coombs
            Participants:
            Last commenter:
            Jonathan Dahl Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              9 years, 39 weeks, 1 day ago
              Date of 1st Reply: