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

mogodb consumes up to 98% of the available memory

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

      Start mongo pod

      Increase the no of records to 50K

      run locust test with client requests as below

      number_of_users = 10
      hatch_rate = 3
      duration = 10m

      Show
      Start mongo pod Increase the no of records to 50K run locust test with client requests as below number_of_users = 10 hatch_rate = 3 duration = 10m
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      Hello,

      Using mongo in kubernates environ ment with centos as base.
      configured 3 replicas with memory limit to 10G

      Limits:
      cpu: 5
      memory: 10Gi
      Requests:
      cpu: 1
      memory: 2Gi

      When the pod started can see it occupies upto 4G of memory and gradually when the parallel connections and queries increases,
      it occupying around 98% of total memory and not releasing the memory post use.

      [root@node00 cloud-user]# kubectl top pod -n test | grep mngo
      e-cmngo-replica-0 92m 9433Mi
      e-mngo-replica-1 89m 6065Mi
      e-mngo-replica-2 96m 6482Mi

      The wiredtiger cache set to default(around 4G )
      is there a way we can release the memory post usage ?

       

      WitreTiger info:
      e:PRIMARY> db.serverStatus().wiredTiger.cache
      {
      "application threads page read from disk to cache count" : 1599135,
      "application threads page read from disk to cache time (usecs)" : 1619303577,
      "application threads page write from cache to disk count" : 1796,
      "application threads page write from cache to disk time (usecs)" : 564252,
      "bytes belonging to page images in the cache" : 3797310198,
      "bytes belonging to the cache overflow table in the cache" : 182,
      "bytes currently in the cache" : 3809181895,
      "bytes dirty in the cache cumulative" : 88830916,
      "bytes not belonging to page images in the cache" : 11871696,
      "bytes read into cache" : 463809362069,
      "bytes written from cache" : 92928011,

        1. image-2021-05-21-15-19-28-106.png
          image-2021-05-21-15-19-28-106.png
          132 kB
        2. image-2021-05-21-15-16-16-407.png
          image-2021-05-21-15-16-16-407.png
          129 kB
        3. image-2021-05-21-15-04-00-522.png
          image-2021-05-21-15-04-00-522.png
          91 kB
        4. image-2021-05-19-21-16-45-610.png
          image-2021-05-19-21-16-45-610.png
          10 kB
        5. image-2021-05-19-21-14-36-006.png
          image-2021-05-19-21-14-36-006.png
          10 kB

            Assignee:
            dmitry.agranat@mongodb.com Dmitry Agranat
            Reporter:
            ece.sagar@gmail.com S P
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: