Project

General

Profile

Redmine 2.3.3 slow on RHEL 6/Ruby 1.8.7

Added by Jakov Sosic almost 11 years ago

Hi guys.

I'm using redmine 2.3.3 on RHEL/CentOS 6.5, with Ruby 1.8.7. This is my env:

Environment:
  Redmine version                2.3.3.stable
  Ruby version                   1.8.7-p352 (2011-06-30) [x86_64-linux]
  Rails version                  3.2.13
  Environment                    production
  Database adapter               Mysql2
Redmine plugins:
  no plugin installed

I'm having issues with some pages rendering slowly, for example:

Started GET "/issues/9313" for 10.8.0.6 at Sun Jan 26 18:31:04 +0100 2014
Processing by IssuesController#show as HTML
  Parameters: {"id"=>"9313"}
  Current user: jakov.sosic (id=37)
  Rendered issues/_action_menu.html.erb (10.7ms)
  Rendered attachments/_links.html.erb (188.9ms)
  Rendered issue_relations/_form.html.erb (5.7ms)
  Rendered issues/_relations.html.erb (38.7ms)
  Rendered issues/_changesets.html.erb (559.2ms)
  Rendered issues/_history.html.erb (1226.5ms)
  Rendered issues/_action_menu.html.erb (9.4ms)
  Rendered issues/_form_custom_fields.html.erb (1.4ms)
  Rendered issues/_attributes.html.erb (1529.9ms)
  Rendered issues/_form.html.erb (1574.0ms)
  Rendered attachments/_form.html.erb (6.1ms)
  Rendered issues/_edit.html.erb (1608.5ms)
  Rendered issues/_sidebar.html.erb (38.4ms)
  Rendered watchers/_watchers.html.erb (13.3ms)
  Rendered issues/show.html.erb within layouts/base (3770.1ms)
Completed 200 OK in 4386ms (Views: 3861.4ms | ActiveRecord: 151.4ms)

Server is not loaded heavily, RAM is more then ok....
Is there a way to speed things up?


Replies (11)

RE: Redmine 2.3.3 slow on RHEL 6/Ruby 1.8.7 - Added by Najib Mestaoui almost 11 years ago

I have the same problem in

Environment:
OS Centos 6.4
Redmine version 2.3.3.stable
Ruby version 1.8.7-p352 (2011-06-30) [x86_64-linux]
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins:
menu_link 1.0.0
progressive_projects_list 0.5.1
redmine_better_gantt_chart 0.9.0
sidebar_hide 0.0.4

Hardware specs
CPU:i3
RAM:4GB
NETWORK:LAN 100MB (intranet)

Webserver : Apache + passenger 4

the concurrency to this server is 20 at max however I get the above result

  Rendered projects/index.html.erb within layouts/base (7204.8ms)
  Rendered plugins/progressive_projects_list/app/views/projects/_progressive_sidebar.html.erb (1.2ms)
  Rendered plugins/progressive_projects_list/app/views/application/_progressive_recent_projects.html.erb (3.
  Rendered plugins/sidebar_hide/app/views/sidebar/_hideButton_partial.html.erb (0.5ms)
Completed 200 OK in 7238ms (Views: 6754.2ms | ActiveRecord: 464.6ms)

I tried to restart web server but still get the same results.

RE: Redmine 2.3.3 slow on RHEL 6/Ruby 1.8.7 - Added by Najib Mestaoui almost 11 years ago

According to this link in http://stackoverflow.com/questions/15317048/diagnosing-the-cause-of-slow-view-rendering sof it is related to rails 3.2.13, it seems upgrading to 3.2.14 solves the problem I am going to perform update.

RE: Redmine 2.3.3 slow on RHEL 6/Ruby 1.8.7 - Added by Jakov Sosic almost 11 years ago

OK, please report back after update. If it fixes the problem I will perform it too ...

RE: Redmine 2.3.3 slow on RHEL 6/Ruby 1.8.7 - Added by Najib Mestaoui almost 11 years ago

I did "bundle update" and it installed 3.2.16, "bundle show" shows the rails version 3.2.16 but the problem still persists :/
I noticed that when showing all issues of all project 150 rows at once I get 100% 1 core usage! although the ActiveRecord takes only 200ms but views take 2500ms, imo I think this is not a hardware problem, there is something wrong with rendering process. or am I wrong? any one from redmine devs to tell us their opinion and advice please.

 Current user: anonymous
  Rendered queries/_filters.html.erb (140.2ms)
  Rendered queries/_columns.html.erb (3.8ms)
  Rendered issues/_list.html.erb (2509.2ms)
  Rendered issues/_sidebar.html.erb (9.1ms)
  Rendered issues/index.html.erb within layouts/base (2677.0ms)
Completed 200 OK in 2882.9ms (Views: 2512.8ms | ActiveRecord: 199.0ms)

RE: Redmine 2.3.3 slow on RHEL 6/Ruby 1.8.7 - Added by Najib Mestaoui almost 11 years ago

I changed the version of "rails" in Gemfile to 3.2.12 and launched "bundle update" in order to downgrade to 3.2.12 which seemed to be OK according to https://github.com/rails/rails/issues/9803 however still no luck, still experiencing the same delay. I am getting tired now, gonna go sleep, I hope to see some news tomorrow.

GN.

RE: Redmine 2.3.3 slow on RHEL 6/Ruby 1.8.7 - Added by Najib Mestaoui almost 11 years ago

further information, I noticed that when loading the 150 row, ruby process use about 99% of cpu!? and takes about 3s to render!?

rows: totaltime,rendertime,activerecordtime
125: 2925,2611,161
150: 3482,3019,203

you can see the huge difference for only 25 more rows, more than 400ms of processing for rendering and only 38ms more for data.
I started to believe that its a rendering problem, I can't believe that rendering 150 row in HTML would take all that power, am I right? btw CPU is an , also tried on another machine as VM and got same problem, same environment, same redmine version.

Is there a possibility that redmine is still using rails 3.2.13? maybe do I need to recompile? I don't have knowledge about ruby, I am just thinking that maybe I need to do something.

Can someone provide support please.

RE: Redmine 2.3.3 slow on RHEL 6/Ruby 1.8.7 - Added by Najib Mestaoui almost 11 years ago

I have noticed also that this slowness is impacted mainly with lists (project list, issues list ...) maybe there is some bug in iterations?

come on guys someone help here :(

RE: Redmine 2.3.3 slow on RHEL 6/Ruby 1.8.7 - Added by Pavel Potcheptsov almost 11 years ago

Hello guys.
I'd suggest you to try (nginx + {unicorn, thin, puma}).
Configuration very-very simple.
It is also better to try ruby-rvm 1.9.3.
I've huge redmine installation inside VM on CentOS6.3 and it works as rocket.

Environment:
  Redmine version                2.4.0.stable.12309
  Ruby version                   1.9.3-p327 (2012-11-10) [i686-linux]
  Rails version                  3.2.15
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.6.11
  Git                            1.7.1
  Filesystem                     
Redmine plugins:
  multi_time_tracker             0.1.0
  projects_table                 0.0.4
  redmine_drafts                 0.2.0
  redmine_fields_permissions     1.0.0
  redmine_hide_estimated_hours   1.0.3
  redmine_lightbox               0.0.1
  redmine_monitoring_controlling 0.1.1
  redmine_plugin_views_revisions 0.0.1
  redmine_timesheet_plugin       0.7.0
  redmine_xls_export             0.2.1.t4

RE: Redmine 2.3.3 slow on RHEL 6/Ruby 1.8.7 - Added by Najib Mestaoui almost 11 years ago

thanks Pavel,
I think I will try to upgrade ruby to newer version because it is the one who is causing higher CPU usage, it almost went off my head to do this upgrade, I will be reporting once done.

Thanks.

RE: Redmine 2.3.3 slow on RHEL 6/Ruby 1.8.7 - Added by Najib Mestaoui almost 11 years ago

Hello,

I updated ruby to v 2.1.0 using rvm and reinstalled gems and passenger, rails is 3.2.12 and got speed 3x fater! now pages that took 3.3s now load in only 1.1s~ I think I will update rails to newer version and try again if there is performance change.

RE: Redmine 2.3.3 slow on RHEL 6/Ruby 1.8.7 - Added by Najib Mestaoui almost 11 years ago

Hello again,

Updating to rails 3.2.16 does not make any difference compared to 3.2.12, so the solution is to move to ruby 2.1 imo.

Case resolved (partially)

    (1-11/11)