Mongo performance based on load

I have made one observation in our system, so there are some days where load on mongoDB will be higher, it performs properly during that time but after some days when load is reduced then we are seeing some performance spikes in mongo. These spikes are majorly around 10 sec but the frequency increases.
For eg if there is a sale, during that time we see increase in throughput on application but as soon as sale ends we see these spikes.

Is there any chance that some internal operations are getting triggered based on load.
Also just to add on during sale we see lot of delete operations as well, so is there a chance that as soon as load is reduced mongodb is internally removing those documents? Or does delete happens instantly?

Maybe Mongodb uses that low traffic window to better manage the delete operations. Delete doesn’t take effect immediately, it’s just marked as “deleted” internally and then the server will process necessary operations asynchronously. for instance, space management.

im guessing that it will de-prioritize the delete management in case of high load. But once traffic is reduced, it gets back to the task.

Is there a way to delete to those documents immediately even if there a bit higher latency should be fine. Because these delete operations at later point are causing issue in our application.

You can check mongodb doc for delete related options, but i don’t recall there’s such support.

What kind of “issues”?

So the issue that we are facing is for a very small interval like say 10/20 sec all the write operations are failing on mongo. And this is happening very randomly its not at any specific time period. Moreover after some event when higher number of documents are deleted we are seeing this issue more frequently.

Did you see any errors from mongo logs?

No not seeing any errors in mongo logs