Score:0

Requesting access token through OpenStack Keystone very slow

kz flag

I have been trying to figure out why requesting an access token through OpenStack Keystone is relatively slow (lowest is about 400 ms to in some cases more than a second).

To get down to the cause I used OSProfiler and it seems most of the time is spend in talking to the database. I can see Keystone doing about a hundred database calls when requesting a token. The individual calls to the database are relatively quick (between 2-6 ms) but doing that times 100 can easily result in 500 ms of latency just in database requests.

Right now the database is accessed via the network (there's about 0.3 ms in network roundtrip times). The time for each database query makes sense when looking at TCP and MySQL overhead so isn't that crazy.

The main thing I'm wondering about is whether this is expected behaviour, is it normal for Keystone to do this many queries to request a token. Caching is enabled and I do know caching is working as I can see Keystone using the database and when debugging the caching library it does in fact indicate it gets hits when reaching out to the cache.

Right now the only option I see is to completely eliminate the network and move the database to the same machine as the Keystone API.

Update: This is on Ussuri using Fernet tokens

Wilson Hauck avatar
jp flag
What is your Version of openstack-keystone?
Wilson Hauck avatar
jp flag
Could you post your request? Could you post a General Log for one of these access token requests so we can see the activity being caused?
in flag
I need to check this when I'm back at work on Monday, but I had a similar problem when the ticket database got too large because old tickets didn't get deleted.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.