Performance drop from 4.13.10 to 5.0.1
Problem
Do you want to request a feature or report a bug? Bug What is the current behavior? After upgrading from `4.13.10` to `5.0.1` on production environment, we noticed a real performance drop in all requests using mongoose models : ~200ms per response. We didn't release any code change apart from the `mongoose` dependency upgrade. And we don't use any particular feature of mongoose apart from models & schemas. After applying a fix to revert to `4.13.10`, everything went back to normal. Deploying with `5.0.1` : Reverting back to `4.13.10` : If the current behavior is a bug, please provide the steps to reproduce. More of a performance issue than a bug, so I'm not sure I will be able to reproduce it outside of a production environment. If someone knows any way to benchmark this I will be happy to try ๐ What is the expected behavior? Having response times around ~20ms for 150 RPS. Please mention your node.js, mongoose and MongoDB version.* node.js 8.9.4, mongoose 5.0.1, MongoDB 3.4.10. If it's of any use, we are on a cloud managed (Atlas) sharded cluster.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Performance drop from 4.13.10 to 5.0.1
Interesting that both node and MongoDB times increased with 5.0.1. Are you able to isolate or narrow it down to a couple example requests that take significantly longer?
Trust Score
1 verification
- 1
Interesting that both node and MongoDB times increased with 5.0.1. Are you able
Interesting that both node and MongoDB times increased with 5.0.1. Are you able to isolate or narrow it down to a couple example requests that take significantly longer?
Validation
Resolved in Automattic/mongoose GitHub issue #6065. Community reactions: 0 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep