low performance with SQL token backends

Bug #1168399 reported by Sylvain Afchain
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Sylvain Afchain

Bug Description

I'm currently using the SQL token backends, and i have poor performances with a not so high number of tokens. It seems there is no index on the table.

Changed in keystone:
assignee: nobody → Sylvain Afchain (sylvain-afchain)
summary: - low performance with SQL token backend
+ low performance with SQL token backends
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/26845

Changed in keystone:
status: New → In Progress
Revision history for this message
Brant Knudson (blk-u) wrote :

Interestingly, I was working on a system where this fix would have been useful (as a workaround) today.

The test was for stability/scalability, so it was running for several hours booting instances. Keystone's token table got to about 1 million rows, mostly because nova using quantum creates a new token for every quantum op as far as I can tell.

Eventually, getting the revoked tokens list takes ~9 seconds, and then nova fails because quantum's getting token times out (so they blame Keystone of course).

Creating the index made it so that the query to get the revoked tokens list now takes < 1 second again.

Of course, the real fix is that nova/quantum should re-use its token rather than getting a new one every time.

Revision history for this message
Malini Bhandaru (malini-k-bhandaru) wrote :
Changed in keystone:
assignee: Sylvain Afchain (sylvain-afchain) → Adam Young (ayoung)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/30749

Changed in keystone:
assignee: Adam Young (ayoung) → Sylvain Afchain (sylvain-afchain)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/30753

Changed in keystone:
assignee: Sylvain Afchain (sylvain-afchain) → Dolph Mathews (dolph)
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → High
Dolph Mathews (dolph)
Changed in keystone:
assignee: Dolph Mathews (dolph) → Sylvain Afchain (sylvain-afchain)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/30749
Committed: http://github.com/openstack/keystone/commit/2879d42de12cfb5a141197debbf7eaa53cd6750f
Submitter: Jenkins
Branch: master

commit 2879d42de12cfb5a141197debbf7eaa53cd6750f
Author: Sylvain Afchain <email address hidden>
Date: Tue May 28 17:45:04 2013 +0200

    Add index on expires column of the SQL token Backend

    Add migration script to add the index.

    bp index-token-expiry

    Change-Id: I36934c18979df5037d606d4846b29194750847af
    Fixes: bug #1168399

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → havana-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/30753
Committed: http://github.com/openstack/keystone/commit/9faf255cf54c1386527c67a2d75074c547aa407a
Submitter: Jenkins
Branch: master

commit 9faf255cf54c1386527c67a2d75074c547aa407a
Author: Sylvain Afchain <email address hidden>
Date: Tue May 28 17:54:23 2013 +0200

    Add index on valid column of the SQL token Backend

    Add migration script to add the index

    Change-Id: I0d7e231b32040dfb57c2e8023a7f45d65416763c
    Fixes: bug #1168399

Thierry Carrez (ttx)
Changed in keystone:
milestone: havana-1 → 2013.2
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.