Project

General

Profile

Perf hit on cold start

Added by Hüseyin Tüfekçilerli about 13 years ago

Are there any optimizations to reduce the performance hit of the first request to redmine? I mean, I see a pattern that in the mornings when I first launch the our redmine site it takes a few seconds for the home page to come, but after that all the new page request are fast, almost instantly most of the time. The same thing occurs the other day then...Are there any settings like keep things on the memory to help it serve fast even on first requests?


Replies (7)

RE: Perf hit on cold start - Added by Felix Schäfer about 13 years ago

What server do you use? Passenger? Thin? Mongrel? Unicorn?

RE: Perf hit on cold start - Added by Hüseyin Tüfekçilerli about 13 years ago

We use Mongrel on a Windows Server 2008 R2 (x64) box.

RE: Perf hit on cold start - Added by Felix Schäfer about 13 years ago

Mmh, I don't know about mongrel on windows… Does the process run all the time, or does some web server sit in front of it and start it as needed?

RE: Perf hit on cold start - Added by Etienne Massip about 13 years ago

It's running all the time, if I remember well.

RE: Perf hit on cold start - Added by Hüseyin Tüfekçilerli about 13 years ago

It's a single server and the mongrel service/process hosting redmine runs all the time.

RE: Perf hit on cold start - Added by Felix Schäfer about 13 years ago

Mmh, I've never user mongrel, so I can't say much about it. Have you had a look at the mongrel docs? Or you could try asking on the mongrel forum or mailing list?

RE: Perf hit on cold start - Added by Hüseyin Tüfekçilerli about 13 years ago

This is logged on the production.log for a slow first request:

Processing WelcomeController#index (for 192.168.0.3 at 2011-02-04 18:57:53) [GET]
Parameters: {"action"=>"index", "controller"=>"welcome"}
Rendering template within layouts/base
Rendering welcome/index
Completed in 3469ms (View: 1031, DB: 2141) | 200 OK [http://pontus/]

And this is logged for the upcoming home page requests:

Processing WelcomeController#index (for 192.168.0.3 at 2011-02-04 19:21:08) [GET]
Parameters: {"action"=>"index", "controller"=>"welcome"}
Rendering template within layouts/base
Rendering welcome/index
Completed in 47ms (View: 31, DB: 0) | 200 OK [http://pontus/]

View and DB hit counts are significantly larger for the initial request, then cached perhaps.

    (1-7/7)