Performance problem with keystone tokens.
I built a testing environment with a controller(4 cores, 8GB RAM, installing kestone, glance, quantum-server, cinder, nova-api), a database server(4 cores, 8GB RAM, installing mysql), a network node(4 cores, 8GB RAM, installing quantum agents), and 5 compute nodes(4x2 cores, 96GB RAM). Databases of all modules are installed on the database server.
When openstack has been running for some days, the latency of dashboard response becomes longer and longer. After checking the softwares, I found that the bottleneck was the database. The I found that, every "SELECT ... FROM token" would take more than 7 seconds. The "SELECT count(*) from token;" returns more than 170,000 records. I think this is the key point of the performance problem.
I tried to delete the expired tokens and the latency shortened. But this is not the solution. So is this a bug or not? I think more than 1 million tokens is very normal in the practical environment, but the performance is unbearable.
What should I do to speed it up?