Hi All, I''m trying to decipher some of the performance issues and tuning options in Ruby On Rails. I''ve done a couple of quick tests using WEBrick and the simple Recipe/XUL app as a baseline test. Here''s the configuration as a refresher: 1. WEBrick running on localhost. 2. SQLite as the database. 3. Using httperf to get a sense of the metrics. 4. Clients running on the same machine as the server. 5. The configuration is set to "production" mode with the ''-e production'' command line option to the server script, and the logging level is forced to WARN in environment.rb. 6. The three URI''s tested are /index.html, /recipe/list, and /category/list with 6 recipes and 4 categories. 7. The relationship between Category and Recipe is one-to-many (one Category has many Recipes). 8. The code is available at http://www.zedshaw.com/projects/cookbooxul/ as before. This is just a preliminary test, and I''m only comparing the RoR application''s ability to serve pages as compared with WEBrick serving the default /index.html file in the exact same situation. This is a relative performance test with the /index.html static file as a baseline. I used the following httperf command line to test the performance: httperf --client 0/1 --num-conns 100 --server 127.0.0.1 --port 3000 --uri /recipe/list --rate 7 | grep "Request rate:" | cut -d '' '' -f 3 >> recipe_measure.tab This simply gets the request rate from httperf and writes it to recipe_measure.tab. I ran this in a loop with a 1 second sleep between each test for 22 tests, and I varied the rate against each URI until I reached a point where the rate caused wild variation, then backed it up to the edge as the peak. After finding the peak I ran the test 22 times to produce a data set for each URI. The results are as follows: category recipe raw Min. : 7.50 Min. :4.700 Min. :49.00 1st Qu.:14.90 1st Qu.:5.450 1st Qu.:50.02 Median :15.00 Median :5.700 Median :50.30 Mean :14.34 Mean :5.618 Mean :50.05 3rd Qu.:15.10 3rd Qu.:5.800 3rd Qu.:50.30 Max. :15.10 Max. :6.000 Max. :50.30 And you can see a boxplot of the data at http://www.zedshaw.com/boxplot.png as a visual interpretation. This brings up three important questions: 1. Why is the performance if WEBrick running a simple Rails app so poor when compared with it''s ability to serve raw files? 2. Why is the reported performance of FCGI closer to the raw performance of WEBrick? 3. Are there some specific configuration settings which can be set to improve the performance so that it matches closer with the raw WEBrick performance? Thanks for your time, and please feel free to discuss the results. -- Zed A. Shaw http://www.zedshaw.com/