Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Node v0.12.0 is very slow #9197

Closed
dackon opened this issue Feb 12, 2015 · 6 comments
Closed

Node v0.12.0 is very slow #9197

dackon opened this issue Feb 12, 2015 · 6 comments

Comments

@dackon
Copy link

dackon commented Feb 12, 2015

Recently, I updated node to 0.12.0, and run some tests with mocha. I found the new version is very slow compared to 0.10.36.

MongoDB: v2.6.7
Mongoose: v3.8.23
Mocha: v2.1.0
CentOS 7.0 x86_64 (In virtualbox)

The test is to call two functions with same parameter in sequence:

  1. Retrieve one doc from collection A of MongoDB.
  2. Save one doc to collection B of MongoDB.

First, I run the test script with v0.10.36 for ten times, repeatedly, here are results:

  1. 68ms
  2. 57ms
  3. 81ms
  4. 74ms
  5. 51ms
  6. 63ms
  7. 64ms
  8. 75ms
  9. 58ms
  10. 60ms
    ----------------Avg: 65.1ms

Then, I run the test script with 0.12.0 for ten times, repeatedly, here are results:

  1. 104ms
  2. 101ms
  3. 112ms
  4. 106ms
  5. 97ms
  6. 126ms
  7. 82ms
  8. 111ms
  9. 86ms
    10.116ms
    ----------------Avg: 104.1ms

The result shows that the new version is 60% slower than the old version!!!

@trevnorris
Copy link

Thanks for reporting. Unfortunately there's nothing actionable for us until we have some steps to reproduce the issue.

@amitport
Copy link

I think this could be related to a mongodb driver issue:
bson_module load fail on node.js 0.12 and io.js all version

@moadqassem
Copy link

Yes, we have recognized that during our test scenarios, where we are querying a very simple query that returns 100 documents, we are using mongodb + nodejs v0.12.0 + mongoose, and @amitport not really its something with mongoose itself, because I have taken out the mongoose module and I have noticed some enhancements, PS(forget about the multiple request because trust me its not problem its a catastrophe) , anyway try to increase the --max-old-space-size=2000 because in default its 1G for the 64bit, and if you try to increase it to more than 2000 let's say 2048 it will through you this error :

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Aborted (core dumped)

@bsnote
Copy link

bsnote commented Feb 17, 2015

@moadqassem, it's a different issue. See #9200.

@moadqassem
Copy link

@bsnote yeah I know its. but still if leave all the configs as the default case in v0.12.0 which 1G, the system is slow and apparently all those problems(I wont call them bugs) sounds not reproducible!! btw thank you very much for giving me the link for the issue that matches my point

@dackon dackon closed this as completed Mar 17, 2015
@dackon
Copy link
Author

dackon commented Mar 17, 2015

We have updated mongodb to 3.0 and mongoose to 3.8.25. It seems node v0.12 beats the old version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants