If you are using PKI for the session tokens for openstack to use then you will find out that it is recommended to use memcache to store these tokens as the MySQL database can bog down if you try to deploy 100 – 300 instances at once.
Modify the /etc/keystone/keystone.conf
| ################ CODE #####################
[token] # Provides token persistence. # driver = keystone.token.backends.sql.Token #driver = keystone.token.backends.sql.Token driver = keystone.token.backends.memcache.Token ################ CODE #####################
################ CODE ##################### [cache] enabled = True config_prefix = cache.keystone expiration_time = 300 backend = dogpile.cache.memcached backend_argument = url:localhost:11211 use_key_mangler = True debug_cache_backend = False ################ CODE ##################### |
Restart keystone
| service openstack-keystone restart |
Make sure memcache is working ok during a test case to start 50+ instances. Watch the cache hits
| watch -d -n 1 ‘memcached-tool 127.0.0.1:11211 stats’ |
本文介绍如何通过配置Keystone使用Memcache来优化OpenStack中的会话令牌存储,减轻MySQL数据库的压力,并提高大规模实例部署时的性能。
706

被折叠的 条评论
为什么被折叠?



