remove performance

43 views
Skip to first unread message

Jamie McCrindle

unread,
Nov 29, 2010, 4:42:10 PM11/29/10
to mongodb-user
I'm seeing quite different performance of removes vs. upserts and it
would be good to get some feedback / suggestions. Here is the context:

Replication: Master + multiple slaves
Total records in collection: 150 million
Upsert speed: 3000 per second
Remove speed: 300 per second
Mongo version: 1.6.2

The query to find the items to remove is not being done off an index
but _id is indexed. I tried to ways to identify the items. First, I
tried running the query through a java client pointing at a slave and
then issuing a delete against the master using the _id. Next I just
ran the query as a remove on the collection as in
db.xxxx.remove({timestamp: {$lt: 2345665432}});

Both of them had fairly similar removal performance. While items need
to be removed at a similar rate as they're added, I don't think a
capped collection is the answer.

Eliot Horowitz

unread,
Nov 29, 2010, 8:02:44 PM11/29/10
to mongod...@googlegroups.com
A bit confused.

Can you send

- upserts you did with timing
- remove you did with timing
- indexes
- sample document?

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages