low performance with SQL token backends

Bug #1168399 reported by Sylvain Afchain on 2013-04-12
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
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

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

Changed in keystone:
status: New → In Progress
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.

Changed in keystone:
assignee: Sylvain Afchain (sylvain-afchain) → Adam Young (ayoung)

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

Changed in keystone:
assignee: Adam Young (ayoung) → Sylvain Afchain (sylvain-afchain)

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) on 2013-05-28
Changed in keystone:
importance: Undecided → High
Dolph Mathews (dolph) on 2013-05-28
Changed in keystone:
assignee: Dolph Mathews (dolph) → Sylvain Afchain (sylvain-afchain)

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) on 2013-05-29
Changed in keystone:
milestone: none → havana-1
status: Fix Committed → Fix Released

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) on 2013-10-17
Changed in keystone:
milestone: havana-1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers