# Recommended rails performance tuning

**URL:** <https://www.ruby-forum.com/t/recommended-rails-performance-tuning/114324>\
**Category:** Rails\
**Created:** [September 11, 2007, 11:55am UTC](https://www.ruby-forum.com/t/recommended-rails-performance-tuning/114324 "2007-09-11T11:55:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [September 11, 2007, 11:55am UTC](https://www.ruby-forum.com/t/recommended-rails-performance-tuning/114324/1 "2007-09-11T11:55:54Z")

</div>

just tell me some recommended rails performance tuning if anyone knows

---

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [September 11, 2007, 12:47pm UTC](https://www.ruby-forum.com/t/recommended-rails-performance-tuning/114324/2 "2007-09-11T12:47:59Z")

</div>

Shiva K. wrote:

> just tell me some recommended rails performance tuning if anyone knows

You need to read about that 🙂

You can try to search on [google.com](http://google.com) there is alot of tips on rails  
perfermance 🙂

---

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [September 11, 2007, 4:27pm UTC](https://www.ruby-forum.com/t/recommended-rails-performance-tuning/114324/3 "2007-09-11T16:27:53Z")

</div>

On Sep 11, 2:55 am, Shiva K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ## just tell me some recommended rails performance tuning if anyone knows
> 
> Posted viahttp://www.ruby-forum.com/.

here are terms to google for:

caching  
query analysis  
profiling  
logfile analysis  
website statistics  
database indexes  
javascript/CSS file compression  
“rails go vroom”

Good luck!

---

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [September 11, 2007, 9:43pm UTC](https://www.ruby-forum.com/t/recommended-rails-performance-tuning/114324/4 "2007-09-11T21:43:44Z")

</div>

Shiva K. wrote:

> just tell me some recommended rails performance tuning if anyone knows

Courtenay of Caboo.se fame did an article on a somewhat overlapping  
topic which contains a few pointers on tuning also:

[http://www.caboo.se/articles/2007/7/29/scale-rails-from-one-box-to-three-four-and-five](http://www.caboo.se/articles/2007/7/29/scale-rails-from-one-box-to-three-four-and-five)

–  
Cheers,

- Jacob A.

---

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [September 11, 2007, 10:02pm UTC](https://www.ruby-forum.com/t/recommended-rails-performance-tuning/114324/5 "2007-09-11T22:02:51Z")

</div>

Instead of google, try searching [del.icio.us](http://del.icio.us) as well. It has tons of  
good stuff.

caching  
query analysis  
profiling  
logfile analysis  
website statistics  
database indexes  
javascript/CSS file compression  
“rails go vroom”

---

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [September 12, 2007, 8:24am UTC](https://www.ruby-forum.com/t/recommended-rails-performance-tuning/114324/6 "2007-09-12T08:24:06Z")

</div>

Hi raghu,

Thanks for your information.I have installed ruby-prof gem,but i dont  
know where to use that one and how to see the result…if you have any  
example send me…thanks once again

---

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [September 11, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/recommended-rails-performance-tuning/114324/7 "2007-09-11T17:08:02Z")

</div>

Hi shiva,

this is what i did, which i feel might help you,

1. First i installed ruby-prof(very good tool) gem, and i profiled my  
requests.  
i found that my static database table queries are consuming  
20%-30% of my response time.  
so planning to use acts\_as\_cached (which while spiking showed  
18-20% boost)

2. And i am using gettext for internationalization which was  
consuming around 20% of response time,  
as i thought, this was unnecessary for default(English)  
language. So, i wrote a wrapper for gettext, which straight away gave  
20% boost.

3. And just did some code cleanup.(refactoring).

4. And find tuned query to for faster response time.

5. And implemented file level caching logic for tables, which are  
very huge(partitioned table).(this gave 21%-25%)

As gene said planning to implement javascript/stylesheet/image  
compression/caching,  
and mongrel\_rails with apache will be better approach for production  
deployment.  
and i am still in rails 1.1.6, so upgrading to rails 1.2.3 is on the  
way.(don’t know this may give some boost, may be)

one more thing is if you are using oracle, you can cursor\_sharing,  
prefetch\_limit values in database.yml file to ‘similar’ and  
500(suitable for me).

and One more thing is Do some google on GC(Garbage Collector) of ruby,  
which you can fine tune according to your application,  
surely the above approach will give some boost.

Note:  
all these results are with respect to 10 users accessing my  
application concurrently.

Good Luck,

---

<div class="post-metadata">

**Author:** ![shiva](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/85e7bf/32.png) [@shiva](https://www.ruby-forum.com/u/shiva)\
**Post date:** [September 12, 2007, 9:16am UTC](https://www.ruby-forum.com/t/recommended-rails-performance-tuning/114324/8 "2007-09-12T09:16:24Z")

</div>

Hi shiva,

i guess this will help for sure,

> **[How to Profile Your Rails Application | CFIS](https://cfis.savagexi.com/2007/07/10/how-to-profile-your-rails-application/)**
>
> Yesterday I mentioned that ruby-prof now supports profiling rails applications. Lets see how that works. But a word of caution before beginning. Like all web applications, Rails apps are complex. They encompass many pieces - clients on remote...

On Sep 12, 11:24 am, Shiva K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
