igorkasyanchuk / rails_performance

Monitor performance of you Rails applications (self-hosted and free)
https://www.railsjazz.com/
MIT License
950 stars 53 forks source link

How does storage work? #56

Closed alexpapworth closed 11 months ago

alexpapworth commented 11 months ago

Hello, I'm testing out this gem to use in production. I'm curious to understand how storage of the data works.

After deploying I watched the Redis memory increase from 0% to 100% during 30 minutes. Once it hit 100% I expected to see an OOM message, however it appears to still be collecting requests.

Does the gem discard expensive information about older requests, or is my traffic somehow fitting just inside the available Redis memory?

alexpapworth commented 11 months ago

I suppose https://github.com/igorkasyanchuk/rails_performance/issues/46 is related, although I appear to be getting a different outcome? AKA no error.

igorkasyanchuk commented 11 months ago

If you have a lot of requests this is expected to. Redis is good option for for storage because it fast and has simple solution too expired record's.

I suggest you just to decrease duration of the collected data

igorkasyanchuk commented 11 months ago

I personally use this gem with maybe 40 rpm and duration 4 hours. And allow good. There already no other options except adding more memory or reducing duration param

alexpapworth commented 11 months ago

Sorry I should have been more clear. I expected the website to break, but it didn't.

Is this because Redis is expiring old records automatically?

igorkasyanchuk commented 11 months ago

yes, all records that I push to Redis have expiration time equal to "duration"