-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
ALL
I was testing the performance of MongoDB 2.6 and insert is taking more time.
people = ["Marc", "Bill", "George", "Eliot", "Matt", "Trey", "Tracy", "Greg", "Steve", "Kristina", "Katie", "Jeff"]; for(var i=0; i<1000000; i++){ name = people[Math.floor(Math.random()*people.length)]; user_id = i; boolean = [true, false][Math.floor(Math.random()*2)]; added_at = new Date(); number = Math.floor(Math.random()*10001); db.test_collection.save( {"name":name, "user_id":user_id, "boolean": boolean, "added_at":added_at, "number":number },{writeConcern: {w:0}}); }
This insert 1M records. MongoDB 2.4 took 7 minutes, MongoDB 2.6 took 14 minutes. The test was done on two servers also. It is AWS server with 4 CPU, 15GB Memory and same I/O speed( Server : m3.xlarge) . Also test was done when no one is accessing the server other than the test.