Abnormal Swap Usage

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.2.15
    • Component/s: None
    • None
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hi,
      I found an issue running mongodb on a single server.

      Server has following specs:
      8 Core
      16GB RAM
      4GB Swap

      Server has following main application:
      MySQL
      MongoDB

      Sufficient memory is available, but Swap usage remains at 100%.

      $ free -m

                    total        used        free      shared  buff/cache   available
      Mem:          15726       11364         157          53        4204        3932
      Swap:          4095        4095           0
      

      $ ps -ef

      mongod    6453     1  0  2017 ?        1-02:38:03 /usr/bin/mongod -f /etc/mongod-config.conf
      mongod    6879     1  0  2017 ?        1-00:46:58 /usr/bin/mongod -f /etc/mongod-arbiter.conf
      

      $ cat /proc/6453/status |grep -i vmswap

      VmSwap:  3346268 kB
      

      $ cat /proc/6879/status |grep -i vmswap

      VmSwap:    30456 kB
      

      I changed the swappiness setting, but it is the same.
      $ sysctl vm.swappiness

      vm.swappiness = 1
      

      Is there a way to limit mongodb's swap usage?

      + Because I do not speak English well, you may feel my question is strange.

        1. config-diagnostic.data.tar.gz
          66.25 MB
        2. arbiter-diagnostic.data.tar.gz
          55.86 MB

            Assignee:
            Unassigned
            Reporter:
            MinwooLee
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: