|
26 | 26 | cortex_bucket_index_enabled: false,
|
27 | 27 | },
|
28 | 28 |
|
| 29 | + // We should keep a number of idle connections equal to the max "get" concurrency, |
| 30 | + // in order to avoid re-opening connections continuously (this would be slower |
| 31 | + // and fill up the conntrack table too). |
| 32 | + // |
| 33 | + // The downside of this approach is that we'll end up with an higher number of |
| 34 | + // active connections to memcached, so we have to make sure connections limit |
| 35 | + // set in memcached is high enough. |
| 36 | + |
29 | 37 | blocks_chunks_caching_config::
|
30 | 38 | (
|
31 | 39 | if $._config.memcached_index_queries_enabled then {
|
|
36 | 44 | 'blocks-storage.bucket-store.index-cache.memcached.max-async-buffer-size': '25000',
|
37 | 45 | 'blocks-storage.bucket-store.index-cache.memcached.max-async-concurrency': '50',
|
38 | 46 | 'blocks-storage.bucket-store.index-cache.memcached.max-get-multi-batch-size': '100',
|
| 47 | + 'blocks-storage.bucket-store.index-cache.memcached.max-get-multi-concurrency': 100, |
| 48 | + 'blocks-storage.bucket-store.index-cache.memcached.max-idle-connections': self['blocks-storage.bucket-store.index-cache.memcached.max-get-multi-concurrency'], |
39 | 49 | } else {}
|
40 | 50 | ) + (
|
41 | 51 | if $._config.memcached_chunks_enabled then {
|
|
46 | 56 | 'blocks-storage.bucket-store.chunks-cache.memcached.max-async-buffer-size': '25000',
|
47 | 57 | 'blocks-storage.bucket-store.chunks-cache.memcached.max-async-concurrency': '50',
|
48 | 58 | 'blocks-storage.bucket-store.chunks-cache.memcached.max-get-multi-batch-size': '100',
|
| 59 | + 'blocks-storage.bucket-store.chunks-cache.memcached.max-get-multi-concurrency': 100, |
| 60 | + 'blocks-storage.bucket-store.chunks-cache.memcached.max-idle-connections': self['blocks-storage.bucket-store.chunks-cache.memcached.max-get-multi-concurrency'], |
49 | 61 | } else {}
|
50 | 62 | ),
|
51 | 63 |
|
|
57 | 69 | 'blocks-storage.bucket-store.metadata-cache.memcached.max-async-buffer-size': '25000',
|
58 | 70 | 'blocks-storage.bucket-store.metadata-cache.memcached.max-async-concurrency': '50',
|
59 | 71 | 'blocks-storage.bucket-store.metadata-cache.memcached.max-get-multi-batch-size': '100',
|
| 72 | + 'blocks-storage.bucket-store.metadata-cache.memcached.max-get-multi-concurrency': 100, |
| 73 | + 'blocks-storage.bucket-store.metadata-cache.memcached.max-idle-connections': self['blocks-storage.bucket-store.metadata-cache.memcached.max-get-multi-concurrency'], |
60 | 74 | } else {},
|
61 | 75 |
|
62 | 76 | bucket_index_config:: if $._config.cortex_bucket_index_enabled then {
|
|
0 commit comments