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

when too many connections to mongod server, too much heap memory free and keep in physical memory which don't be released

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.8
    • Component/s: Internal Code
    • None
    • ALL

      config:
      wiredTiger Cache size : 2GB
      max connections: 3000
      mongod Version: 3.2.8
      total dataset size: 16GB

      how to find this question:
      we set max connections as 3000, so when connections reach to 3000, we received sms warning. login to server, found that: this mongod use 39GB physical memory, as follows:

        PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+ COMMAND                                                                                                        
      13154 mongod  20   0 46.9g  39g 9240 S  2.0 62.0   3815:20 mongod
      

      connecto to mongod , seeing from serverStatus:

       "generic" : {
                      "current_allocated_bytes" : NumberLong("11833558352"),
                      "heap_size" : NumberLong("48540131328")
              },
              "tcmalloc" : {
                      "pageheap_free_bytes" : NumberLong("31037857792"),
                      "pageheap_unmapped_bytes" : NumberLong("5174722560"),
                      "max_total_thread_cache_bytes" : NumberLong(1073741824),
                      "current_total_thread_cache_bytes" : 384155856,
                      "central_cache_free_bytes" : 90345984,
                      "transfer_cache_free_bytes" : 19490784,
                      "thread_cache_free_bytes" : 384155856,
                      "aggressive_memory_decommit" : 0
              }
      

      but, pageheap_free_bytes not be released.

      Once the connecitons increases, the memory use increases too.

      monitor data from my data collector:

        1. diagnostic.data.zip
          106.22 MB
        2. Screen Shot 2017-02-07 at 4.06.54 PM.png
          Screen Shot 2017-02-07 at 4.06.54 PM.png
          446 kB

            Assignee:
            mark.agarunov Mark Agarunov
            Reporter:
            shawn001 shawn
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: