From fb1c71d6aefa0ef16c58ac57abf3297fdbcfaca3 Mon Sep 17 00:00:00 2001 From: Brant Knudson Date: Thu, 18 Aug 2016 13:40:03 -0500 Subject: [PATCH] Correct help text for backend option The help for the backend option said that the memcache_pool backend is recommended. memcache_pool is there to keep a limited number of thread-associated connections open rather than a connection for every thread. If you don't have a huge number of threads it doesn't offer anything. Keystone is an example of a service where memcache_pool doesn't improve things -- eventlet isn't supported anymore and more threads is not useful due to GIL. As such, the help text is corrected to say to use memcache_pool for eventlet and dogpile.cache.memcached for servers like keystone. The help text also mentioned devstack. This is removed because devstack is a developer tool so shouldn't be mentioned in text targeted to operators. Also, fixed the preceeding comment to remove redundant information and to not mention keystone since this code isn't in keystone anymore. Change-Id: I1ffbf23feac623fe0bfbbe49fb3e0159dedf4cfe --- oslo_cache/_opts.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/oslo_cache/_opts.py b/oslo_cache/_opts.py index 5e24f4d9..07091d84 100644 --- a/oslo_cache/_opts.py +++ b/oslo_cache/_opts.py @@ -29,22 +29,20 @@ FILE_OPTIONS = { 'the dogpile.cache region. This applies to any ' 'cached method that doesn\'t have an explicit ' 'cache expiration time defined for it.'), - # NOTE(morganfainberg): the dogpile.cache.memory acceptable in devstack - # and other such single-process/thread deployments. Running - # dogpile.cache.memory in any other configuration has the same pitfalls - # as the KVS token backend. It is recommended that either Redis or + # NOTE(morganfainberg): It is recommended that either Redis or # Memcached are used as the dogpile backend for real workloads. To # prevent issues with the memory cache ending up in "production" - # unintentionally, we register a no-op as the keystone default caching - # backend. + # unintentionally, we register a no-op as the default caching backend. cfg.StrOpt('backend', default=_DEFAULT_BACKEND, help='Dogpile.cache backend module. It is recommended ' - 'that Memcache with pooling ' - '(oslo_cache.memcache_pool) or Redis ' - '(dogpile.cache.redis) be used in production ' - 'deployments. Small workloads (single process) ' - 'like devstack can use the dogpile.cache.memory ' - 'backend.'), + 'that Memcache or Redis (dogpile.cache.redis) be used ' + 'in production deployments. For eventlet-based or ' + 'highly threaded servers, Memcache with pooling ' + '(oslo_cache.memcache_pool) is recommended. For low ' + 'thread servers, dogpile.cache.memcached is ' + 'recommended. Test environments with a single ' + 'instance of the server can use the ' + 'dogpile.cache.memory backend.'), cfg.MultiStrOpt('backend_argument', default=[], secret=True, help='Arguments supplied to the backend module. ' 'Specify this option once per argument to be '