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

make server auto-read-ahead on capped collections

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.1
    • Component/s: Storage
    • Labels:
      None

      If the readahead for the filesystem is set to a low value, this can slow writing to capped collections (particularly the oplog) as we need to read before we write it.

      The proposal here is to have the server, in some background fashion, do some prefetching (touching?) of the oplog region where it is going to be inserting new documents soon. so not the position of this write but an upcoming block of data.

      maybe 1MB at a time is touched for example. (note edge case: on a tiny capped collection, this may be a dumb value. maybe for tiny just don't do this logic at all.)

      this touching could probably be done outside of the db locks, kind of like Record::touch().

            Assignee:
            Unassigned Unassigned
            Reporter:
            dwight@mongodb.com Dwight Merriman
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: