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

High Memory Usage on MongoDB Secondary Server Not Matching Cache + Free Heap | MongoDB v7.0.14

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL

      Hi Team,

      We are experiencing high memory usage on  our Mongodb secondary servers in a 5-node replica set. The memory usage does not align with the configured cache and free heap values, leading to unexpected memory growth. Despite a recent upgrade from MongoDB v7.0.9 to v7.0.14, this issue persists.

      MongoDB Version:
      7.0.14

      Operating System:
      Ubuntu 22.04.3 LTS (Jammy Jellyfish)

      Issue Details:

      1. Current Configuration: MongoDB cache is set to default values.
      2. Memory Usage Pattern: Over two days, memory usage on the secondary server increases by around 12 GB, which does not correspond with cache + free heap usage expectations.
      3. Observation Post-Upgrade: The issue persisted after upgrading from MongoDB v7.0.9 to 7.0.14.

      root@dbserver04-cds:/home/mydbops# free -h 
                     total        used        free      shared  buff/cache   available
      Mem:           123Gi        65Gi       796Mi       1.0Mi        56Gi        56Gi
      Swap:           49Gi       585Mi        49Gi
      root@dbserver04-cds:/home/mydbops#

          PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                 
      2916728 mongodb   20   0   64.9g  63.3g  36096 S  68.0  61.4 678:07.12 mongod      

      Actions Taken So Far:
      Upgraded MongoDB to the latest stable version within the 7.x series.

      Expected Outcome:
      Memory usage should correspond with cache and heap configurations without unaccounted increases over time.

      Assistance Required:

      Help identify potential causes of excessive memory usage beyond cache + heap limits.
      Provide recommendations for further configuration adjustments or diagnostic steps to track down the source of high memory usage.

       

        1. diagnostic_data_heapProfilingEnabled_part_1.zip
          78.38 MB
        2. diagnostic_data_heapProfilingEnabled_part_2.zip
          112.65 MB
        3. image-2024-11-27-16-30-18-874.png
          image-2024-11-27-16-30-18-874.png
          81 kB
        4. image-2024-11-27-16-37-37-582.png
          image-2024-11-27-16-37-37-582.png
          103 kB
        5. part1.tar.gz
          94.90 MB
        6. part2.tar.gz
          93.79 MB

            Assignee:
            Unassigned Unassigned
            Reporter:
            ramkumars@mydbops.com Ramkumar S
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: