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

Weird behavior in caching collections with different average size documents in MongoDB

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.0.2
    • Component/s: WiredTiger
    • None
    • Environment:
      Windows
    • Storage Engines
    • ALL
    • Hide
      • I have tested this in 4.0.2.
      • Create few large collections with different average document sizes (same number of documents)
      • do random acces with same frequency to them until the cache gets full and eviction takes place
      • check the stats of each of the collection (wiredTiger.cache.bytes currently in cache)
      • larger collections will have a smaller memory footprint
      Show
      I have tested this in 4.0.2. Create few large collections with different average document sizes (same number of documents) do random acces with same frequency to them until the cache gets full and eviction takes place check the stats of each of the collection (wiredTiger.cache.bytes currently in cache) larger collections will have a smaller memory footprint

      When collections with different average sized documents (x,2x,3x,4x,5x) but having same number of documents within them the cache is behaving differently than expected. Before the eviction takes into place the distribution of the cache for the data is as follows. ( The collections are accessed in the same frequency and the memory is smaller than the collections)

      This is the expected behavior as bigger sized documents mean bigger memory footprint. But, after the cache eviction takes place the distribution of the cache is as follows.

      This means the eviction policy is evicting more of the bigger collection and giving priority to smaller ones (the opposite trend)

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Moditha Moditha
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: