Project

General

Profile

Actions

Task #8555

closed

Please provide more resource to Redmine

Added by Luca Frosini over 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
_InfraScience Systems Engineer
Category:
Application
Target version:
Start date:
May 12, 2017
Due date:
% Done:

100%

Estimated time:
Infrastructure:
Production

Description

Redimine is slowing down. We should investigate where is the bottleneck and provide more resources (ram, cpu) if needed.
Please take in account that the bottleneck could be the database instance.


Files

Actions #1

Updated by Luca Frosini over 8 years ago

  • Description updated (diff)
Actions #2

Updated by Andrea Dell'Amico over 8 years ago

Yes, it's slow. The first move will be to move the database on a different server. We are going to build a dedicate postgresql instance to host all the infrastructure databases.

Actions #3

Updated by Luca Frosini over 8 years ago

Ok thanks for the prompt feedback. No problem to wait for it.

Actions #5

Updated by Luca Frosini over 8 years ago

  • Priority changed from Normal to High

Redmine performances are degrading day by day

Actions #6

Updated by Luca Frosini almost 8 years ago

  • Priority changed from High to Urgent
Actions #7

Updated by Andrea Dell'Amico almost 8 years ago

  • Status changed from New to In Progress

The service is slow, specially when acting on the 'D4Science Infrastructure' project that has a lot of users, but it's not seem a resources problem: the service has plenty of memory and the only load is caused by the ldap sync plugin.

If there are no objections, I'd start changing the cron schedule from every 10 minutes to every three hours.

Actions #8

Updated by Luca Frosini almost 8 years ago

Can we start with 45 minutes? I think 3 hours is too much.

Actions #9

Updated by Massimiliano Assante almost 8 years ago

I do have objections, the portal exports to LDAP the user and groups every 10 minutes, in my understanding if you schedule every 3 hours then then a user that register to a VRE is not going to be able to access the Redmine project associated (if any) for a very long time. On the other hand it is also true that the majority of VREs do not have a Redmine project associated. I'm not sure how is best to proceed in this case, can the LDAP plugin be selective? I mean can it just sync the groups we tell it to? If not than you can schedule every 30 minutes instead of 10 as a compromise perhaps

Actions #10

Updated by Andrea Dell'Amico almost 8 years ago

Massimiliano Assante wrote:

I do have objections, the portal exports to LDAP the user and groups every 10 minutes, in my understanding if you schedule every 3 hours then then a user that register to a VRE is not going to be able to access the Redmine project associated (if any) for a very long time. On the other hand it is also true that the majority of VREs do not have a Redmine project associated. I'm not sure how is best to proceed in this case, can the LDAP plugin be selective? I mean can it just sync the groups we tell it to? If not than you can schedule every 30 minutes instead of 10 as a compromise perhaps

I added you as a watcher because I suspected it.
The sync process cannot be more efficient than this without a rewrite, something smarter could be done from the portal maybe.
The sync activity not only adds new users, but also updates the groups of the existing ones. And the only way it can be done is by reading them all, with all their groups. They are a lot right now, each sync process lasts many minutes.
Every 30 minutes is better that every 5, we can start with that.

Actions #11

Updated by Massimiliano Assante almost 8 years ago

Yes, there is something smarter and it is the Redmine Connector for which @lucio.lelii@isti.cnr.it 7 months ago told us that it would be ready October 15th, https://support.d4science.org/issues/7353. The Redmine connector id the user does not exist could create it.

Actions #12

Updated by Andrea Dell'Amico almost 8 years ago

Massimiliano Assante wrote:

Yes, there is something smarter and it is the Redmine Connector for which @lucio.lelii@isti.cnr.it 7 months ago told us that it would be ready October 15th, https://support.d4science.org/issues/7353. The Redmine connector id the user does not exist could create it.

The users are active immediately after they appear on ldap. The synchronization is about groups, and without the groups no actions can be made by anyone.

Actions #13

Updated by Massimiliano Assante almost 8 years ago

The users are active immediately after they appear on ldap. The synchronization is about groups, and without the groups no actions can be made by anyone.

Well, the connector receives the user token, and could add the user to the group extracted from the token in redmine.

Actions #14

Updated by Andrea Dell'Amico almost 8 years ago

Massimiliano Assante wrote:

The users are active immediately after they appear on ldap. The synchronization is about groups, and without the groups no actions can be made by anyone.

Well, the connector receives the user token, and could add the user to the group extracted from the token in redmine.

That's not enough: a user can be associated to more than one VRE, and on redmine have to be added to every group.

Actions #15

Updated by Massimiliano Assante almost 8 years ago

Andrea Dell'Amico wrote:

Massimiliano Assante wrote:

The users are active immediately after they appear on ldap. The synchronization is about groups, and without the groups no actions can be made by anyone.

Well, the connector receives the user token, and could add the user to the group extracted from the token in redmine.

That's not enough: a user can be associated to more than one VRE, and on redmine have to be added to every group.

I didn't mean to remove completely the LDAP Sync plugin, but if the connector were in place than we could extend the ldap sync time to 3 hours without problems.

Actions #16

Updated by Luca Frosini almost 8 years ago

Anyway, in the mean while we can schedule every 45 minutes. What do you think?

Actions #17

Updated by Andrea Dell'Amico almost 8 years ago

Massimiliano Assante wrote:

Andrea Dell'Amico wrote:

Massimiliano Assante wrote:

The users are active immediately after they appear on ldap. The synchronization is about groups, and without the groups no actions can be made by anyone.

Well, the connector receives the user token, and could add the user to the group extracted from the token in redmine.

That's not enough: a user can be associated to more than one VRE, and on redmine have to be added to every group.

I didn't mean to remove completely the LDAP Sync plugin, but if the connector were in place than we could extend the ldap sync time to 3 hours without problems.

Yes, that could work. @lucio.lelii@isti.cnr.it so you don't need any additional information

Actions #18

Updated by Andrea Dell'Amico almost 8 years ago

Luca Frosini wrote:

Anyway, in the mean while we can schedule every 45 minutes. What do you think?

I already moved it to 30 minutes. Later today I'll change some postgresql options so that we will start logging some slow queries, if there are any.

Actions #19

Updated by Lucio Lelii almost 8 years ago

The additional information is that it is written in Ruby on Rails, It is a new language for me. I don't thing it will be immediate to realize and I also don't know if it is feasible to skip the authentication System used by redmine.

Actions #20

Updated by Andrea Dell'Amico almost 8 years ago

Andrea Dell'Amico wrote:

I'll change some postgresql options so that we will start logging some slow queries, if there are any.

I just modified the postgresql configuration and lowered the redmine log level, that was very verbose.

Actions #21

Updated by Andrea Dell'Amico almost 8 years ago

It's more and more something that's caused by some plugin to me. This page: https://support.d4science.org/s2b_issues/index?project_id=d4science is rendered after many seconds (it remained completely void for at least 15 seconds, to me). In that time, no postgresql query lasted more than 1000ms (the limit I set for the query logger), and the load on the server didn't grow in a significant way.

Actions #22

Updated by Luca Frosini almost 8 years ago

Redmine is continuing to degrade. Please find attached the image containing the complete list of installed Redmine plugins.

My opinion is that the following plugins has never been used or are not used anymore (but I can be wrong). The rest of the plugins provide wanted functionality

  • Advanced roadmap & milestones plugin
  • Progressive Projects List plugin
  • Recurring Tasks (Issues)
  • Redmine Better Gantt Chart plugin (is this needed?)
  • Redmine Code Review plugin (is anyone using this?)
  • Redmine Graphs plugin (what is this?)
  • Redmine Hotkeys Js plugin
  • Issue To-do Lists Plugin (Andrea do you need it?)
  • Redmine Login Audit plugin (is this needed)

@pasquale.pagano@isti.cnr.it any objection?

Actions #23

Updated by Andrea Dell'Amico almost 8 years ago

Luca Frosini wrote:

Redmine is continuing to degrade. Please find attached the image containing the complete list of installed Redmine plugins.

  • Issue To-do Lists Plugin (Andrea do you need it?)
  • Redmine Login Audit plugin (is this needed)

Those ones are needed

Actions #24

Updated by Pasquale Pagano almost 8 years ago

I believe that any plugin that was installed and then not used intensively can be undeployed.

One that should be quite invasive is Scrum2B. Nice to have but we not using it. So, I would remove it as well.

The GANTT is used but I don't know what the plugin you mention add to it.

I would proceed incrementally to see if things change by undeploying plugins.

Actions #25

Updated by Luca Frosini almost 8 years ago

@pasquale.pagano@isti.cnr.it if we remove scrum2B we remove the sprints. Even we don't use sprints in the proper way, we use them.

Are you really sure that you want to remove scrum2B plugin?

If yes, we have to find some solution to group tickets, the category is not enough. Please note that the solution to have one master ticket is not always usable.

Actions #26

Updated by Pasquale Pagano almost 8 years ago

in that case we cannot remove it.

Actions #27

Updated by Andrea Dell'Amico almost 8 years ago

  • % Done changed from 0 to 40

I just removed the following plugins:

  • Advanced roadmap & milestones plugin
  • Recurring Tasks (Issues)
  • Redmine Code Review plugin (is anyone using this?)
  • Redmine Hotkeys Js plugin
  • clipboard_image_paste
  • usability

I also removed and added again the other plugins from Luca's list, but they had zero impact on the performances.
I also spent a couple of hours logging the postgresql queries and I've found that the real abusers are:

  • clipboard_image_paste
  • usability

and much more than all the others:

  • Global Roles plugin

It sends a query for each user and for each role for that users, on all the involved users for the requested webpage (all the theorical users, so all the users that belong to the running project) . This also explains the fact that the performances are so different between the various projects, with D4Science Infrastructure the worst performer.

I didn't remove that plugin because I don't know how we rely on it. The users with a global role are a few, listed below:

Roberto Cirillo
Claudio Atzori
Alessia Bardi
Pasquale Pagano
Luca Frosini
Michele Artini
Paolo Manghi
Andrea Dell'Amico
Tommaso Piccioli

We can test the plugin removal the next downtime, if you don't find any reason to live with it.

It's impossible to examine the query logs over the working hours because there's too much noise. Today I was able to isolate my requests.

Actions #28

Updated by Luca Frosini almost 8 years ago

Do you remember why we installed the Global Roles plugin.

Actions #29

Updated by Andrea Dell'Amico almost 8 years ago

I cannot find a related ticket. There was a spreadsheet with a list of potential plugins at some point, but I cannot find it anymore.

Actions #30

Updated by Andrea Dell'Amico almost 8 years ago

I just removed the plugin on the redmine dev instance, https://redmine-d.d4science.org without any apparent loss of functionalities.

Actions #32

Updated by Luca Frosini almost 8 years ago

I just remember that we installed such a plugin to avoid to grant them admin role to people which has to be manager in many projects and especially to avoid to add them every time we create a project.
I think that we can remove the plugin and we will evaluate how to behave for each person.

In particular we have to evaluate:
Roberto Cirillo
Claudio Atzori
Alessia Bardi
Michele Artini
Paolo Manghi

Instead the following the has to be admin
Pasquale Pagano
Luca Frosini
Andrea Dell'Amico
Tommaso Piccioli

Actions #33

Updated by Andrea Dell'Amico almost 8 years ago

Luca Frosini wrote:

Instead the following the has to be admin
Pasquale Pagano
Luca Frosini
Andrea Dell'Amico
Tommaso Piccioli

The admins are managed by the ldap group redmine_admins and they currently are:

Pasquale Pagano
Luca Frosini
Andrea Dell'Amico
Tommaso Piccioli
Leonardo Candela
Massimiliano Assante
Actions #34

Updated by Luca Frosini almost 8 years ago

So I think we cam manage the rest of the people manually.

Actions #35

Updated by Andrea Dell'Amico almost 8 years ago

OK, I'll do it at the start of the downtime window.

Actions #36

Updated by Andrea Dell'Amico almost 8 years ago

  • % Done changed from 40 to 60

Removed. It's still very slow, but I'll need some quiet hours to examine the postgresql queries again.

Actions #37

Updated by Luca Frosini almost 8 years ago

@andrea.dellamico@isti.cnr.it Repository tab in gcube project seems not working properly anymore. The revision and the comment are not displayed (only last commit time) so the commit is not linked to ticket. Do you have any ideas?

Actions #38

Updated by Andrea Dell'Amico almost 8 years ago

Luca Frosini wrote:

Repository tab in gcube project seems not working properly anymore. The revision and the comment are not displayed (only last commit time) so the commit is not linked to ticket. Do you have any ideas?

Nope. Any of the removed plugins, even if there seems not to be a direct link? I can reinstall

  • Advanced roadmap & milestones plugin
  • Redmine Code Review plugin (is anyone using this?)

anyway, we've seen that don't make a difference.

Actions #39

Updated by Andrea Dell'Amico almost 8 years ago

I added again Redmine Code Review plugin. While the other one was already installed.

Actions #40

Updated by Andrea Dell'Amico almost 8 years ago

But I think I've found the culprit: http://www.redmine.org/issues/14906
I think we can live without that.

Actions #41

Updated by Andrea Dell'Amico almost 8 years ago

I just applied the fix suggested here: http://www.redmine.org/issues/17700

Actions #42

Updated by Andrea Dell'Amico almost 8 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 60 to 80

Things seem slightly better now. I would not say that's fast now, but better.

Actions #43

Updated by Andrea Dell'Amico almost 8 years ago

I also see that we are using both the problematic configurations reported in the ticket:

  • Allow issue assignment to groups
  • a custom field with user format
Actions #44

Updated by Andrea Dell'Amico almost 8 years ago

I added again the global_roles plugin too, btw.

Actions #45

Updated by Massimiliano Assante almost 8 years ago

I confirm it is better now, I think we reduced the waiting time of 50% in average

Actions #46

Updated by Andrea Dell'Amico almost 8 years ago

  • % Done changed from 80 to 100

I think we can close this one. There's space for more optimisations but we should disable some features we rely on. Any objections?

Actions #47

Updated by Andrea Dell'Amico almost 8 years ago

  • Status changed from Feedback to Closed

Closing. Open another one if you want to try to disable the two configuration settings listed in https://support.d4science.org/issues/8555#note-43

Actions #48

Updated by Luca Frosini almost 8 years ago

ok

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 8.91 MB)