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

Delete by query is really slow

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.0.4
    • Performance
    • None
    • Linux RHEL5

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: