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

Memory growth in __wt_session_get_btree in __checkpoint_worker under WiredTiger

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0.6
    • Affects Version/s: None
    • Component/s: WiredTiger
    • Fully Compatible
    • ALL

      This is ticket is related to the latest issue discussed on SERVER-17456. The key features of the test involve:

      • relatively large number of collections (16k)
      • 16 threads each looping through 1k of the 16k collections writing a record and doing a createIndex (on an existing index, not a new index).

      Memory outside WT cache is observed to steadily grow over a period of hours in a test on 3.0.5:

      • allocated memory outside of WT cache (3rd line) grows steadily.
      • there is a sudden increase corresponding to the known issue with WT journal allocation in 3.0.5.
      • aside from that sudden jump the growth in non-cache memory is linear over time.
      • number of cached cursors is also growing and that is a known potential user of memory, but the shape of the growth curve for number of cursors does not match the linear shape of the growth of non-cached memory.

      Memory profiling using tcmalloc HEAPPROFILE shows the following as a candidate for the culprit: various allocations within in __checkpoint_worker (labeled "A" below) steadily grow, and account for about 1.5 GB of non-cache memory by the end of this run:

        1. close_idle_time=300.png
          54 kB
          Bruce Lucas
        2. heap.png
          313 kB
          Bruce Lucas
        3. heap2.png
          160 kB
          Bruce Lucas
        4. mem.png
          132 kB
          Bruce Lucas
        5. ss.png
          81 kB
          Bruce Lucas

            Assignee:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Reporter:
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: