-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.0.7
-
Component/s: None
-
None
-
Environment:ubuntu 12.04,
Hardware: Intel(R) Xeon(R) CPU E5606 @ 2.13GHz', 2133MHz, 4 Core, Sockets: 2
RAM: 32230MB
RAID: Level 10 Disks: 4 Size: 1849GB Type: SATA
-
Linux
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
Trying to delete approx 8m of a 21million collection, its taking ages & appears to be very slow.
I am running a js file locally on server (mongo localhost:27018 remove.js) that contains:
collection.remove({'dts':{'$gte':ISODate('2012-06-21T00:00:00Z')}});
I only have two indexes.
one on _id.
one on above date field & id.
Disk I/O is maxxed out at 100%, please see attached iostat file.
I have an MMS account, please let me know what further details you need if you can look at it, the server is currently running the delete operation.
I also have another shard that I am also doing a delete on, but instead trying out with
var c = collection.find({'dts':{'$gte':ISODate('2012-06-21T00:00:00Z')}},
);
and
c.forEach(function (id) { cursor.remove({_id: id._id});})
It's also maxxing out I/O at 100% with a very slow return on deletes/sec.
Is there a recommended way to delete a large quantity of items?
Am I doing something blatantly wrong?