Can't have mongodb use multiple cores for reads

749 views
Skip to first unread message

Nike

unread,
Dec 13, 2011, 4:49:54 AM12/13/11
to mongodb-user
Hi!

I've read many discussions from this group about multiple cpus, read
http://www.mongodb.org/display/DOCS/How+does+concurrency+work but
mongo still stuck with single core. I use a few instances of a script
to test, each of them creates new connection. They send the same and
the only query (no writes, python code below)

mongo.posts_daily.find({'site_id': YYYYY, 'ts': {'$gte': XXXXXX}},
fields={'ts': 1, 't': 1, 'post_id': 1})

tried with totally identical queries and with different params, no
luck.
Made sharding just to try something different, but obviously each
mongod instance still uses one core only

What am i missing?

Thanks

Nat

unread,
Dec 13, 2011, 5:02:22 AM12/13/11
to mongod...@googlegroups.com
It uses one core per query. If you have multiple queries running at the same time, it will be able to use multicore.
--
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.

Nike

unread,
Dec 13, 2011, 6:46:29 AM12/13/11
to mongodb-user
I should be missing something
I run *a few* instances of a script, and each of them sends a query.
Aren't they "multiple" queries?

Eliot Horowitz

unread,
Dec 13, 2011, 8:24:04 AM12/13/11
to mongod...@googlegroups.com
Can you send mongostat and iostat -x 2 output when running test?

Nike

unread,
Dec 13, 2011, 11:44:15 AM12/13/11
to mongodb-user
sorry, it turned out that my test server (where I run the scripts)
wasn't powerful enough for this task
now I see 150% cpu usage and this seems to be fine

thanks

Reply all
Reply to author
Forward
0 new messages