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

Maximum thread cache byte limit should change based on number of connections

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 3.4.2, 3.5.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Platforms 2018-01-01
    • Case:

      Description

      Currently, a mongos instance will attempt to cleanup memory from a thread's cache during threadStateChange() if the thread's cache size is larger than 10,000 bytes. This number was chosen heuristically based on having no more than 1,000 clients connected to a mongos instance. If there are more than 1,000 clients, then the cleanup code is run far more often. This is also problematic as the mongos logs a debug message every time the cleanup is performed.

      The suggested improvement is to adjust the maximum thread cache size value based on the number of currently active client connections.

      The code that this change relates to is located in https://github.com/mongodb/mongo/blob/r3.4.2/src/mongo/util/tcmalloc_server_status_section.cpp#L68-L86

        Attachments

          Activity

            People

            Assignee:
            mark.benvenuto Mark Benvenuto
            Reporter:
            andrew.young Andrew Young
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: