# How to set resource limit for \`exporter\` container in the \`results-cache\` pod?

**URL:** <https://community.grafana.com/t/how-to-set-resource-limit-for-exporter-container-in-the-results-cache-pod/141271>\
**Category:** Grafana Loki\
**Created:** [January 26, 2025, 7:50am UTC](https://community.grafana.com/t/how-to-set-resource-limit-for-exporter-container-in-the-results-cache-pod/141271 "2025-01-26T07:50:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hongbomiao](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/hongbomiao/32/27221_2.png) [@hongbomiao](https://community.grafana.com/u/hongbomiao)\
**Post date:** [January 26, 2025, 7:50am UTC](https://community.grafana.com/t/how-to-set-resource-limit-for-exporter-container-in-the-results-cache-pod/141271/1 "2025-01-26T07:50:09Z")

</div>

This `results-cache` pod has two containers `memcached` and `exporter`.

By default, I have

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/a/7/a733354a7ecf88d861edefd81c09d80ed8c285b0.png)

This is because [here](https://github.com/grafana/loki/blob/6532b4b263deea4581699a076f244c2c818f5e8c/production/helm/loki/values.yaml#L3215-L3217),

```yaml
resultsCache:
  # -- Amount of memory allocated to results-cache for object storage (in MB).
  allocatedMemory: 1024
  # -- Resource requests and limits for the results-cache
  # By default a safe memory limit will be requested based on allocatedMemory value (floor (* 1.2 allocatedMemory)).
  resources: null

```

The memory is calculated based on `allocatedMemory` which is why got that `1953125Ki`.

If I set

```yaml
resultsCache:
  resources:
    requests:
      cpu: 100m
      memory: 128Mi
    limits:
      cpu: 200m
      memory: 256Mi

```

I can see

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/8/a/8a2b688a7153f8daf021e32d200a5dc4c18230a9.png)

`memcached` container in `results-cache` pod, the resource limit has been applied.

However, I am still not sure how to set the rest of `exporter` container CPU and memory resource limit.

Any guide would be appreciate, thanks! ☺

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [January 26, 2025, 10:38am UTC](https://community.grafana.com/t/how-to-set-resource-limit-for-exporter-container-in-the-results-cache-pod/141271/2 "2025-01-26T10:38:22Z")

</div>

> <https://github.com/grafana/loki/blob/6532b4b263deea4581699a076f244c2c818f5e8c/production/helm/loki/templates/memcached/_memcached-statefulset.tpl#L154>

---

<div class="post-metadata">

**Author:** ![hongbomiao](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/hongbomiao/32/27221_2.png) [@hongbomiao](https://community.grafana.com/u/hongbomiao)\
**Post date:** [January 27, 2025, 1:34am UTC](https://community.grafana.com/t/how-to-set-resource-limit-for-exporter-container-in-the-results-cache-pod/141271/3 "2025-01-27T01:34:22Z")

</div>

Thank @jangaraj ! I can confirm after adding

```yaml
memcachedExporter:
  resources:
    requests:
      cpu: 100m
      memory: 128Mi
    limits:
      cpu: 200m
      memory: 256Mi

```

it applies to not only. the `exporter` container in `results-cache` pod, but also `exporter` container in `chunks-cache` pods.

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/3/8/383be45d8b08c64d66b5c4a4843a0e356603783d.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [January 27, 2026, 1:34am UTC](https://community.grafana.com/t/how-to-set-resource-limit-for-exporter-container-in-the-results-cache-pod/141271/4 "2026-01-27T01:34:30Z")

</div>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
