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

Memory leak and/or excessive allocation in UnorderedFastKeyTable

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.4.1
    • Internal Code
    • None
    • Fully Compatible
    • ALL
    • Platforms 2017-01-23, Platforms 2017-02-13

    Description

      Running the google-perftools heap profiler reveals a lot of memory allocation in the AuthorizationManager, coming from StringData and its underlying UnorderedFastKeyTable. The test I ran set up a simple sharded cluster with 2 shards, each 3 node replica sets. The test was doing this:

      for ( var i = 0; i < 100000000; i++) { var conn = new Mongo(); conn.getDB('test').foo.findOne({_id:1}); conn = null; sleep(10); }

      I have attached a screenshot of the heap profiler output that shows lots of allocations happening within UnorderedFastKeyTable (look at the rightmost branch of the tree)

      Attachments

        1. heapprofile.out.0684.heap
          1024 kB
        2. heapProfiler.png
          heapProfiler.png
          117 kB

        Activity

          People

            mira.carey@mongodb.com Mira Carey
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: