Hi Luke,
Please be aware that you’re replying to a thread that originates in Jan 2018, almost 2 years ago. It’s also talking about a different thing. For new questions, it’s best to open a new thread and provide all the relevant information, like MongoDB version, driver version, topology description (replica set, sharded cluster, etc), any error message, and what’s your goal.
I am having the similar issue, scanning a collection with 50+ million documents took like 48 hours on google cloud VM vs < 3 hours on my local server.
Depending on the size of the documents, the operation you’re trying to do, and how your VM is provisioned, this is not a surprise if you have a lot of data. Your local deployment would have an advantage moving a lot of data since it doesn’t have to deal with large network latency. I’m not going to describe the nuances of cloud deployment provisioning and performance optimization, but it’s also possible that the VM is not equipped to deal with the work you’re telling it to do.
Some things you can try:
Best regards,
Kevin