Load test with meteor-down and strange slow db queries

Hi all,

I’m new here, so apologies if this is not the correct category to post this.

We have an app deployed on Heroku connected to a DB hosted on Atlas. I’m currently making load tests using the meteorhacks:meteor-down package, and kadira (self-hosted now) to monitor the performance.

I made the load test so not every action is executed one after another, to simulate a more realistic behavior between calls, using a sleep function like this:

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));

What I’m finding is that my methods are taking very long time even when using a load of user small as 500, and when I check on kadira, it seems that some db queries are taking way too long for what they are doing, and I don’t understand why.

For example, in one of my insert methods, I’m getting these numbers:

How is it possible that is taking so long so perform a findOne by ID on the users collection, or insert a document in the classrooms collection? Where should I look for bottlenecks of performance issues that could cause these?

Thank you,

This sounds like it could be your Meteor CPU maxing out at 100%. I had a similar phenomenon happening in my app. See this thread: