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

Delete by query is really slow

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.4
    • Component/s: Performance
    • Labels:
      None
    • Environment:
      Linux RHEL5

      I have a collection with 35m objects with avg size 430 bytes. There are several indices including

      {f:1}

      and when I run a count on {"f": 0, wc: {$gt: 4}}) I get about 530k matches - this took a minute or so.

      Next I tried a delete using the same query, which is live but not very loaded right now. After over 8 hours it is still running. I see a lot of wait time in top - so I guess it's i/o bound.

      The machine has 70G of ram and the filesystem is ext4 with RAID5.

        1. clients-slowdelete.html
          62 kB
        2. mongostat-slowdelete.txt
          5 kB
        3. top-slowdelete.txt
          5 kB

            Assignee:
            gregor Gregor Macadam
            Reporter:
            niccottrell Nic Cottrell (Personal)
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: