Project

General

Profile

Redmine 2.0.2 performance tuning and install under Windows

Added by Winston Feng over 12 years ago

After upgrade Redmine to v2.0.2, I found it apparently slower than v1.4.1. After researched for a few days, I finnally made Redmine faster than ever. Here's what I found:
  • Ruby 1.9.3-p194 is 2x slower than 1.9.3-p125. I wonder why...
  • Tuning MySQL is absolutely necessary and easy. Just copy and use the sample configuration file with MySQL.
  • Remember to clear cache after upgrade:
    rake tmp:cache:clear
    rake tmp:sessions:clear
  • Thin web server is good for Redmine 2.x + Rails 3.x + Ruby 1.9.3 + Windows. Thin can only work under Ruby 1.9.3-p125. To install Thin:
    1. Install Ruby 1.9.3-p125 and DevKit. Run following commands in cmd window:
    2. DevKit\devkitvars.bat
    3. call gem install eventmachine --no-ri --no-rdoc --pre
    4. call gem install thin -v 1.3.1 --no-ri --no-rdoc
  • I found Puma web server may cause weird file download problem, so I recommend Thin now.

Replies (11)

RE: Redmine 2.0.2 performance tuning and install under Windows - Added by Steven Martins over 12 years ago

Thanks Winston for your thoughts. I've also just upgraded to 2.0.2 and spent a few hours trying to find a replacement for mongrel which doesn't seem to work with 2.x.

I've started using Puma but it seems that either the web server or Redmine 2.x is slower than the previous 1.3.x version I had installed.

Can you please explain in more detail what you mean by "tunning MySQL" and what sample configuration file you were referring to?

RE: Redmine 2.0.2 performance tuning and install under Windows - Added by valentin polozov over 12 years ago

I have a similar problem. Using puma web server doesn't solve the problem. Db=postegreDB

RE: Redmine 2.0.2 performance tuning and install under Windows - Added by Winston Feng over 12 years ago

To Steven Martins and valentin polozov:
  • Installing Ruby 1.9.3-p125 instead of 1.9.3-p194 is the key, about 70% performance gained by this one.
  • Under MySQL folder, there are more configuration files like "my-huge.ini". Merge it into your my.ini, and uncomment the InnoDB parts. This can hugely improve ActiveRecord fetching performance, about 20% of total page loading time.
  • Puma won't improve much performance for Redmine. It's just a web server choice for Redmine 2.x + Windows. Another substitute is thin, which can only work under Ruby 1.9.3-p125.

RE: Redmine 2.0.2 performance tuning and install under Windows - Added by Steven Martins over 12 years ago

Thanks, Installing Ruby 1.9.3-p125 increased speed a lot.

RE: Redmine 2.0.2 performance tuning and install under Windows - Added by Ki Won Kim over 12 years ago

Thanks for your article.
Then I have a question. what's your Ruby Environments or gems.
RubyGem version. Gem list, and so on...

RE: Redmine 2.0.2 performance tuning and install under Windows - Added by Winston Feng over 12 years ago

To Ki Won Kim:
My ruby environment is for Redmine only, nothing fancy. After install Ruby 1.9.3p125 and DevKit(under ruby193\DevKit), I use the following script to install everything:

::Find Ruby dir
@for /f "tokens=* delims=." %%p in ('where ruby') do set ruby=%%p
@set rubyDir=%ruby:\bin\ruby.exe=%

::Use Ruby DevKit
@set rubyDevKitVarsBat=%rubyDir%\DevKit\devkitvars.bat
@if exist %rubyDevKitVarsBat% call "%rubyDevKitVarsBat%" 

::Copy libmysql.dll to ruby\bin
@copy /y "%~dp0CopyToRubyBinIfMysqlError\libmySQL.dll" "%rubyDir%\bin" 

call gem install bundler --no-ri --no-rdoc
call bundle install --without development test rmagick postgresql sqlite

call gem install eventmachine --no-ri --no-rdoc --pre
call gem install thin -v 1.3.1 --no-ri --no-rdoc

libmySQL.dll is downloaded from http://www.mysql.com/downloads/connector/c/

RE: Redmine 2.0.2 performance tuning and install under Windows - Added by Winston Feng over 12 years ago

I updated thin install command to stick to v1.3.1, since the latest v1.4.1 reports error.

RE: Redmine 2.0.2 performance tuning and install under Windows - Added by Ki Won Kim over 12 years ago

Thank you Winston Feng.
My successful environment were

Redmine 1.4.4
Ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
Rails 2.3.14
RubyGems 1.8.24

By the way, about how to increase the speed of svn? :)

RE: Redmine 2.0.2 performance tuning and install under Windows - Added by Steven Wong over 12 years ago

Nice!
Thanks.
I used ruby 1.8.7.

any solution for thin server performance tuning?

RE: Redmine 2.0.2 performance tuning and install under Windows - Added by Winston Feng over 12 years ago

Ki Won Kim wrote:

By the way, about how to increase the speed of svn? :)

Svn is really slow. I use Git now. Git is good for programmer, but not friendly enough for other people. Need some script work.

    (1-11/11)