Forum: Ruby on Rails Rails 2.3 memcache performance drop

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9e460563f35b0b25d8671d6ef83f54ce?d=identicon&s=25 Clinton (Guest)
on 2009-04-08 09:08
(Received via mailing list)
After much effort I upgraded our fairly large Rails app from 2.1 to
2.3.  After deployment yesterday I noticed an across the board
increase in response times.  It seems that every call to memcache now
takes 10x longer than before.  Here are some example numbers from my
development log (below), with memcache running locally.  We see
similar scale of performance drop in production as well -  average
memcache call before 2ms, now 20ms.  It adds up to a significant hit.

Before Rails 2.3 upgrade:

Cached fragment hit: views/homepage_recent_blog_posts (0.00043)
Cached fragment hit: views/homepage_active_threads (0.00033)
Cached fragment hit: views/homepage_weekly_feature (0.00029)
Cached fragment hit: views/homepage_recent_approved_items (0.00036)
Cached fragment hit: views/homepage_popular_items (0.00037)
Cached fragment hit: views/number_of_members (0.00032)

After Rails 2.3 upgrade:

Cached fragment hit: views/homepage_recent_blog_posts (3.2ms)
Cached fragment hit: views/homepage_active_threads (3.5ms)
Cached fragment hit: views/homepage_weekly_feature (2.9ms)
Cached fragment hit: views/homepage_recent_approved_items (2.8ms)
Cached fragment hit: views/homepage_popular_items (3.1ms)
Cached fragment hit: views/number_of_members (6.7ms)

Before I start delving into the memcache internals in Rails 2.3, has
anyone else experienced this degradation on their apps?  Is there a
magic 'make it fast again' switch that I can flick?
B3fa87d78e54e60a0bc3ee064dee8a73?d=identicon&s=25 Ryan Allen (Guest)
on 2009-04-09 08:58
(Received via mailing list)
It turned out that the bundled memcache client that came with
ActiveSupport (1.6.5) was, for some reason, _much_ slower than the one
we were using before the Rails 2.3 upgrade (we were using fiveruns-
memcache-client (1.5.0.5), the one that has retries built in).

We've replaced the bundled memcache client with our old one, and it
performs much better.
C84986cba3a65208de336a63354e1f91?d=identicon&s=25 erik (Guest)
on 2009-05-24 19:07
(Received via mailing list)
Hi-
  Could tell me how you replaced it?  I just installed the newest gem
1.7.2 and would like to use it with rails.  What's the procedure to
remove the bundled gem?
Thanks.
Erik
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-05-25 00:39
(Received via mailing list)
On Sun, May 24, 2009 at 10:07 AM, erik <erik@carwoo.com> wrote:

> > ActiveSupport (1.6.5) was, for some reason, _much_ slower than the one
> > > increase in response times.  It seems that every call to memcache now
> > > Cached fragment hit: views/homepage_recent_approved_items (0.00036)
> > > Cached fragment hit: views/number_of_members (6.7ms)
> >
> > > Before I start delving into the memcache internals in Rails 2.3, has
> > > anyone else experienced this degradation on their apps?  Is there a
> > > magic 'make it fast again' switch that I can flick?
>

I was told by Mike Perham that Rails 2.3+ will automatically use any
memcache-client
gem you have greater than 1.6.4.

Good luck,

-Conrad
This topic is locked and can not be replied to.