Comment 3 for bug 1182481

Revision history for this message
Adam (adam500) wrote :

Claudio,

This has helped. First I cleared the database of all the tokens older than 1 day and this made it snappy again. Then I tuned the my.cnf and added innodb_buffer_pool_size and I have not been seeing any slow queries.

Now note that my token table is only 70K rows right now. When I was having the issue it was over 250K. I will update this once I get back to 250K or greater rows.

Just seems that with the default mysql settings keystone will hang now that the tokens are encrypted in the database.

===============
I have tuned my /etc/mysql/my.cnf with the following:

key_buffer = 2048M
max_allowed_packet = 2048M
thread_stack = 512M
thread_cache_size = 1024
query_cache_limit = 2048M
query_cache_size = 128M
innodb_buffer_pool_size = 2048M

restart mysql after making the changes

This has helped greatly.

I also found that flushing the keystone tokens and only keeping ones that are less than a day old helped out.

Here is the mysql command:
USE keystone ; DELETE FROM token WHERE NOT DATE_SUB(CURDATE(),INTERVAL 1 DAY) <= expires;'