Performance issues
We're experiencing performance issues when using this gem.
We have built rails app only using this gem as cache dashboard.
On staging where cache store is not that big, it's working fine, but in production where we have bigger cache it's crashing every few clicks, even on instance with alot of resources.
Is this something you're aware of? Is there anything we're doing wrong or gem is lacking performance on bigger cache stores?
Hi @hmatic, thanks for getting in touch. What cache store are you using? And approximately how many entries do you have in production? There are teams using Fastentry in production with thousands of entries and it performs well.
We're using memcached and we have approx 470k entries.
Thanks for the info @hmatic. Let me take a look and try to reproduce locally with a heavier load of entries.
You mentioned that it's crashing every few clicks. What kind of crashes are you experiencing? Also, is it related to a particular action?
We're running it on AWS ECS inside docker containers. For example on container with 512cpu/1024memory it could only load initial dashboard, after trying to change page, it simply crashed container. When I increased it to 1024/2048, it's not longer crashing, but it's extremely slow. Loading single entry is ok, but all "index" actions are really slow.
Got it, that's very helpful. I'll try to reproduce and mitigate the performance issues.
Quick question @hmatic, are you using Rails 5 or 4?
Rails 5.2
@hmatic could you try with version on branch optimize-cache-access?
To install please add this to the gemfile: gem 'fastentry', :git => "git://github.com/alvesjtiago/fastentry.git", :branch => "optimize-cache-access" and run bundle install.
I've made some improvements to minimize access to memcached directly.
@hmatic were you able to test this? Let me know when you get a chance to try it and if it fixes the issue for you.
@alvesjtiago sorry, I'll be able to test it tomorrow
No problem at all @hmatic. Thanks
This did not help at all :(
I have even managed to crash app while clicking through pages.
Ok @hmatic, I'll continue investigating. Unfortunately with memcached it might not be possible to go through every key without indexing them with another system. For now, I'd recommend not using Fastentry with memcached in production for large datasets. I'll add a note to the repo.