Will MongoDB use multiCore CPU?

1,087 views
Skip to first unread message

Peng Guo

unread,
Sep 7, 2010, 4:48:57 AM9/7/10
to mongod...@googlegroups.com
When MongoDB doing parallel query, will it use  multiCore CPU?

Thanks.

--
Regards
    Peng Guo

Andreas Jung

unread,
Sep 7, 2010, 5:04:49 AM9/7/10
to mongod...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peng Guo wrote:
> When MongoDB doing parallel query, will it use multiCore CPU?

What do you mean with parallel query? A single query won't be executed
in parallel but running several queries in parallel will use multiple
cpus. Limitation: map-reduce will not run in parallel.

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJMhgAwAAoJEADcfz7u4AZjQ2MLwN68p+WqgtQKtOFsaOnRFpih
TJLPOo2uEbCAlqX/lj1n9hdnXU6KjoOgX4HtFJ0wt+wF7PH2W9ojMl4ddrdqPovr
NlD9W9kumwJLjpkIN079Acwg2VUinZSgiau99Kabzg2JXDID6hR8v4NfrZdKdcFr
oNezrITOV+Cm3saxMvr4nr63VrRT8ULc37m5cGUB+PmxukNehMADssmwROnJ4dbI
7FGkxBqyW7e1TmwwWweCClyxlePu9fENc/mqoo6bSsaR5UT8SgiNg89zQoKFfe52
P2NSIfLcPNVOKp+ECqbM4Px3l3XS3+DSS1BbuClnMLHt6zHwmm37FfwmBRqozWft
9BSv4MNT8ZM2G0oj5fqw+5PLJqvUj4OgPaauQg2h8SecR00uxf6qy7sdPzCg2aDF
3je9yDRoB57Y8W8JAhfS+4WujKnly2iLJh6/bLq/G2HS/PWfIiIvGklFxYinAbOu
dwaT4cUV+hY7MiluUjJiPOkLVbVkfbw=
=kZXk
-----END PGP SIGNATURE-----

lists.vcf

Dwight Merriman

unread,
Sep 7, 2010, 5:13:50 AM9/7/10
to mongod...@googlegroups.com
correct.

in a future version a single map/reduce will saturate all cores, this
is planned but not scheduled for a specific release (not imminent, not
1.8)

> --
> 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.
>
>

Peng Guo

unread,
Sep 7, 2010, 6:59:01 AM9/7/10
to mongod...@googlegroups.com
How about multiple db.eval()?

I will remove the lock in eval for not block the whole system.
--
Regards
    Peng Guo

Andreas Jung

unread,
Sep 7, 2010, 9:47:07 AM9/7/10
to mongod...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peng Guo wrote:
> How about multiple db.eval()?
>
> I will remove the lock in eval for not block the whole system.

Also without knowing the internals: also serialized - unless
there is strong build-in parallel support inside the MongoDB backend
(which is not yet the case afaik (likely the same issue as with map-reduce).

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJMhkJbAAoJEADcfz7u4AZjd0MLvivPwSMonF+OJJeJcoMkiTAz
DogEBAVc5T0hwt3Z6BplVHIbu8r6hE+kptEnvcc5C9rOB4ooTfNerX2eWcJRk6q4
ZfLouUmsM5Fhm+zbKhSy2TOYltYQwfq3gRydKKckYFJ4w41TiTW7AsC5yJ5ro/VD
pcGOBxHZ3ju7xWMy587GA0tBzmx66f7sutiEEQ/+FwCnaPCkKGSDJZgTdwC0pmEn
kwKbFRF8nhdispElIItfR42ubXOE/WB3LLkTqPBj8+phJzkK7638SQYUpLvdj2tX
1nraJKp3RnA3UOqM6rN6iYaEtOPxZSiS+uuFLsJPy2sZtMk5Ie0bu5ztlZ2h9TPB
f83sOM7gg8yXE74DnV1e9Pd/E+mqWnQGFTuD2VoYIqN5jNqDVGmAd78ugZM8RWoP
D7sJXzh60q3VvHcJpjssagfzew4rbWX1hBHk+e/CZ9L6ZDY0mFllNxuyMmnCuWtg
sCQMzmI2eeyYkPQI4wGyqN+bGs6JwN8=
=ZYH8
-----END PGP SIGNATURE-----

lists.vcf

Eliot Horowitz

unread,
Sep 7, 2010, 10:04:12 AM9/7/10
to mongod...@googlegroups.com
db.eval is also single thread like map/reduce.
The general problem being poor support for concurrency in javascript engines.

-----END PGP SIGNATURE-----

Markus Gattol

unread,
Sep 7, 2010, 4:06:35 PM9/7/10
to mongod...@googlegroups.com

Peng> When MongoDB doing parallel query, will it use multiCore CPU?
Peng> Thanks.

I think it is better to think in terms of "read operations" and "write
operations". With "read operations" we then split again in server-side
(JavaScript, run on the server) and client side (all various drivers
e.g. PyMongo). I have pimped my FAQs a bit to better reflect the
distinction:

http://www.markus-gattol.name/ws/mongodb.html#does_mongodb_use_more_than_one_cpu_core

Peng Guo

unread,
Sep 8, 2010, 1:41:46 PM9/8/10
to mongod...@googlegroups.com
Thanks for you help :)


--
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.




--
Regards
    Peng Guo
Reply all
Reply to author
Forward
0 new messages