Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Benefits of V8 JavaScript engine in MongoDB for map reduce

Tags:

mongodb

v8

It's sounding like the V8 JavaScript engine might be replacing SpiderMonkey in MongoDB v2.2+.

What benefits, if any, will this bring to MongoDB map-reduce performance?

For example:

  • Will overall JavaScript evaluation performance improve (I'm assuming this one's a given?)
  • Will concurrent map and reduce operations be better able to run in parallel on a single instance?
  • Will map-reduces still block eachother?
like image 936
Chris Fulstow Avatar asked Sep 07 '11 00:09

Chris Fulstow


1 Answers

Yes, it will help with parallelism, and help performance. The Spidermonkey engine restricts MongoDB to single threads, however the operations are usually short and allow other threads to interleave so the exact impact is hard to quantify. Of course, testing is always the way to really figure out the benefits.

As you can see here: https://jira.mongodb.org/browse/SERVER-4258

And here: https://jira.mongodb.org/browse/SERVER-4191

Some of the improvements are already available for testing in the development release. To test with V8, just build using V8 as outlined here:

http://www.mongodb.org/display/DOCS/Building+with+V8

like image 54
Adam Comerford Avatar answered Nov 15 '22 13:11

Adam Comerford