How to Reduce cpu and memory utilization

I have created a web admin panel using ROR when i run my application the
mogrel server utilizes more CPU and memory? How to reduce the cpu
utilization and memory utilization in general?

Just for a simple add, remove, modify functionality the cpu and memory
goes beyond 30% utilization. How to reduce it?

Thanks in advance

Jose Martin

For production you can try using ruby enterprise (
This should reduce your resources (RAM) usage down about 30%

use nginx+thin/nginx+passenger will definitely reduce memory utilization.

I hope the configurations are done properly to server appropriate
requests from Apache (web server) to application server, check the
same thing doing webrick.
If it is the same, then possibly you may need to look in your SQL
queries or Code optimizations.

there are many optimization available:

1) try to use passenger (or thin)
2) try different ruby VM ( jruby , RubyEE , ruby 1.9) and find which
work best with your application.
3) look for memory leakage in your application
4) Use some tool like New Relic for fine tuning performance
5) Try to move some computation away from the server into the client
using Javascript ( example for sorting a table of result)