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

mongod is swapping with free ram and vm.swappinnes = 0

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 3.2.5
    • WiredTiger
    • None

    Description

      Hello

      We're running MongoDB 3.2.5 in a Docker container (official image).
      Every other week I see mongod using 300-500M of swap. However, we have vm.swappiness = 0 and about 16G of usable RAM (used mostly for cache).

      System info:
      System: Dell PowerEdge R720xd (dual Xeon E5-2650, 32G RAM)

      vm.zone_reclaim_mode = 0
      vm.swappiness = 0

      I assume that mongod is run with numactl --interleave=all

      Engine used is wiredTiger.
      mongod memory stats as reported by htop:
      1532M RSS
      2243M VSZ
      446M swap

      System RAM stats as per free -m:
      Total 32127M
      Free 1111M
      Buffers 423M
      Cache 18772M

      Also, we have another instance of MongoDB on this same machine - 2.6, although it's barely ever used, it uses swap too (~5M with 41M RSS).

      So, why does mongod use swap with free RAM available and vm.swappiness = 0?

      Attachments

        Activity

          People

            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            Gendalph Igor Chelnokov [X]
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: