使用memcached 加快openstack keystone的速度

本文介绍如何通过配置Keystone使用Memcache来优化OpenStack中的会话令牌存储,减轻MySQL数据库的压力,并提高大规模实例部署时的性能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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、付费专栏及课程。

余额充值