Forum: Ruby on Rails tailing the prod log: 2 req/sec

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
181976602397443ce119909b9d82cae2?d=identicon&s=25 blinking bear (Guest)
on 2007-02-26 23:06
(Received via mailing list)
can someone break down the req/sec part of the production log.  I
consistently see about 60% rendering, 20%db.  First question, where is
other 20%?  Second question, does this mean that database performance
wouldn't help, how would I speed up 'rendering'?

Aa9467ff6b698dce20d0d7252e5a268f?d=identicon&s=25 Joram (Guest)
on 2007-02-26 23:37
(Received via mailing list)
The reason why it's not 100% is something I also found strange.

In my experience, the database is mostly slower then the rendering (in
my application that is).
I got my rendertime down by caching what could be cached.
I got a huge list which was rendered by partials and it took quite
some time.
After caching this page, it was almost instantaneous.
181976602397443ce119909b9d82cae2?d=identicon&s=25 blinking bear (Guest)
on 2007-02-26 23:52
(Received via mailing list)
Yeah - there is no caching now.  Everything is dynamic down to the
obligatory time_ago_in_words...Theres a lot of avatars and stuff that
be able to be optimized.
E3640176765dae2465d33ef6eb114691?d=identicon&s=25 Bala Paranj (Guest)
on 2007-02-27 00:50
(Received via mailing list)
You can cache static pages by using caches_page class method of Action
Controller. It is also possible to cache only part of the page that is
static while leaving the dynamic sections out by using fragment
caching in Rails.

When you are under situations where you cannot cache due to security
reasons you can use Action caching, this will be slower but that is
the price to pay for enforcing security. Another cool way to speed up
is to use memcached. You basically use a machine with lot of free
memory as your cache server by installing memcached. The client must
also be setup to connect to your server.

All these tricks are explained in Rails Cookbook.
This topic is locked and can not be replied to.