Bad performance when editing project members

Bug #1278920 reported by Guilherme Lazzari
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Rodrigo Duarte
OpenStack Identity (keystone)
Invalid
Undecided
Unassigned

Bug Description

In an envrionment with where there are more than 1000 users, edito project members dialog performs a query for each user to get its roles, which results in a bad performance. There are some alternatives to fix in the UI side, but we could also fix in keystone with an extension, for example. Please reassign to keystone if needed.

In the best scenario, Horizon takes 8 secs to render the UI with 1000 users and 2 assigned users.
On the other hand, it takes 1 min to show the UI with 1000 users and 1000 assigned users.

Tags: performance ux
Changed in horizon:
status: New → Confirmed
tags: added: performance
description: updated
Revision history for this message
Dolph Mathews (dolph) wrote :

On the keystone side, this is specifically addressed by https://blueprints.launchpad.net/keystone/+spec/list-limiting

On the horizon side, horizon should issue queries to keystone with as many filters as reasonably possible to avoid hitting the truncation behavior implemented above.

Changed in keystone:
status: New → Invalid
Revision history for this message
Giulio Fidente (gfidente) wrote :

One more things affecting the "edit project" performances (not speed related but more about usability) is that the user list should be either paged or limited to just a few users with a pointer to the filtering field.

Currently it is providing a single, unsorted list, of all users which isn't of great help I think.

Matthias Runge (mrunge)
Changed in horizon:
importance: Undecided → Medium
tags: added: ux
Matthias Runge (mrunge)
Changed in horizon:
milestone: none → next
Revision history for this message
Rodrigo Duarte (rodrigodsousa) wrote :

This issue is due to single calls triggered for each user that has a role in a project: https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/admin/projects/workflows.py#L209

And it can be easily addressed by fetching all roles in a project scope using just a single API call: /v3/role_assignments?scope.project.id=<project_id>. But, the /v3/role_assignments endpoint is not supported by OSC yet, therefore is not implemented at keystoneclient: https://bugs.launchpad.net/python-keystoneclient/+bug/1246310

About usability issues, maybe is better to open another bug/blueprint related just to UI usability improvement?

What do you think?

Revision history for this message
Dolph Mathews (dolph) wrote :

Rodrigo: this bug doesn't seem to concern anything but performance & user experience - what do you want to track that's separate from that and bug 1246310?

Revision history for this message
Rodrigo Duarte (rodrigodsousa) wrote :

Although this bug can address both performance & user experience, the problems cited by Giulio seems to have a different scope?
My thoughts are to attack https://bugs.launchpad.net/python-keystoneclient/+bug/1246310 first and than resolve this bug. Makes sense?

Revision history for this message
Dolph Mathews (dolph) wrote :

Agree it makes sense to address bug 1246310 first, and then utilize that in horizon to address the concerns here.

Revision history for this message
Rodrigo Duarte (rodrigodsousa) wrote :
Changed in horizon:
assignee: nobody → Rodrigo Duarte (rodrigodsousa)
Revision history for this message
Rodrigo Duarte (rodrigodsousa) wrote :

Image without the fix applied as attachment.

Revision history for this message
Rodrigo Duarte (rodrigodsousa) wrote :

Image with the fix applied as attachment.

Changed in horizon:
status: Confirmed → In Progress
David Lyle (david-lyle)
Changed in horizon:
milestone: next → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/92412
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=ed43be0a0f40c4b065472da27e6ef6e59a6789ca
Submitter: Jenkins
Branch: master

commit ed43be0a0f40c4b065472da27e6ef6e59a6789ca
Author: Rodrigo Duarte Sousa <email address hidden>
Date: Tue Jun 10 10:22:51 2014 -0300

    Fixes bad performance when editing project members

    The bug is caused by consecutive client calls when
    fetching users' roles in a project.

    The fix was to use the /v3/role_assignments endpoint.
    Which retrieves all roles in a single client call
    (dashboards/admin/projects/workflows.py:
    UpdateProjectGroupsAction and UpdateProjectUsersAction).

    The compatibility to the previous keystoneclient version
    is maintained.

    In a scenario with 1000 users with a role in a project
    (using devstack), the time to render the Modify Users
    page dropped from 45s to 2.5s

    Change-Id: Ic72ebea0db226faf98c5e04d00d76dedd1fb01c1
    Closes-bug: #1278920

Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
status: Fix Committed → Fix Released
Justin Pomeroy (jpomero)
tags: added: icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/110136

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (stable/icehouse)

Change abandoned by Justin Pomeroy (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/110136
Reason: The keystoneclient requirement means we can't back port this easily.

Julie Pichon (jpichon)
tags: removed: icehouse-backport-potential
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-2 → 2014.2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Justin Pomeroy (<email address hidden>) on branch: stable/icehouse
Review: https://review.openstack.org/110136
Reason: I don't think this is going to be accepted for icehouse. No reason to keep it hanging around.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.