-1

I'm experiencing slow performance when testing simple queries on Mongo. Here's the context:

  1. A 8 vCPU, 16 GB RAM VM (ESXi) running Debian 10 / MongoDB Community Edition 4.4.1 as a standalone server.
  2. Debian has been configured with XFS and with the limits set to the recommended values noted here: https://docs.mongodb.com/manual/reference/ulimit/#recommended-ulimit-settings
  3. I have two collections, Sales Order and Quote, where the Quote collection data contains IDs for the Sales Order collection in a one-to-one relationship.
  4. Both collections have ~50k records and each is roughly 10MB in size according to Compass.
  5. Both collections' ID fields are indexed as well as the field in the Quote collection that points to the Sales Order collection.
  6. The database is being accessed by .NET driver which has recently been updated using NuGet.
  7. The server hosting MongoDB is hosted on-prem on a gigabit network.

I understand that relationships are not the focal point of the design of NoSQL databases, so here's an example that doesn't even take the join into account.

It takes 1.7 seconds just to have MongoDB bring back all ~100k documents across the two collections totaling 20MB. The amount of time to bring that much data over the wire/network is ~0.16 seconds, so it isn't a huge contributing factor.

Access 2016, a product that isn't meant for production, brings back both tables joined in less than a quarter of a second. (It takes Mongo 3.7 seconds). Now, it doesn't have to transfer the info over the wire so we can add 0.16 seconds to that, but it's still wildly off.

Considering that I've read plenty that Mongo can do some amazing things, including in the performance category, I must be doing something wrong.

What could cause the results I'm getting?

  • Just read the Code of Conduct, but I'm still not sure what about the post deserves a downvote. Can someone explain? I'd be glad to edit the post to fix any issues with it. – boogagiga Oct 12 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.