使用memcached 加快openstack keystone的速度

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’

 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值