Mongodb performance issue
Opened this issue · 5 comments
Related with #243, we are having a performance issue with Uptime/Mongodb.
We have about 130 websites being check for months. This has filled 9 millions records in the ping table of MongoDB.
Problem, when you delete a check (and then, its pings), it takes many minutes to be deleted and Mongodb uses 100% I/O ressources during this time.
Is there anything we should do in order to optimizer "delete performance against high number of ping records" ?
Thanks,
Gaetan
cc : @soullivaneuh
How about this method (not tested) ?
http://edgar.tumblr.com/post/38232292665/how-to-delete-large-amount-of-data-of-a-mongodb
Or maybe a "mongoose" way to increase performance ?
Why not "keep" pings when deleting a check? They would be deleted by "MaxAge" anyway.
This would stop locking checks deletion.
It could be a solution. Maybe add new parameters on config file for recursive pings and events delete choice.
Indeed, all the orphelan pings will be deleted btw: https://github.com/fzaninotto/uptime/blob/master/models/ping.js#L63-L66
Stop me if I'm wrong @fzaninotto, otherwise I will work for a PR.
Good idea @soullivaneuh!
Proposed PR: #247.