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

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.2.5
    • Component/s: WiredTiger
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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?

            Assignee:
            Ramon Fernandez Marina
            Reporter:
            Igor Chelnokov [X]
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: